janitor-fix

本条目收录公开技能“janitor-fix”,归入 Skillπ「系统管理」使用场景,并关联「软件开发与 IT」职业。目录标签:ai-lab、技能维护、自动修复、符号链接。此页用于按任务发现相关资源;请通过固定原站版本核对实际能力、依赖环境和所需权限。本站仅提供独立目录介绍与原站入口,原始文件和附件依各自许可开放。

仓库
jeremylongshore/tons-of-skills-marketplace

安装方式

先用 Prompt 核对来源,也可切换到安装命令或下载可用的安装包。

安装方式

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "janitor-fix":https://skillpi.com/zh/skills/deepskill-7ee7d688d17b0fdd4c81e8542205db8f4989875a12dfd3e5762b68629cd4ace4。安装前核对上游来源和版本:https://github.com/jeremylongshore/tons-of-skills-marketplace/blob/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/community/skills-janitor/skills/janitor-fix/SKILL.md。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

此命令从 GitHub 来源仓库获取指定技能。运行前请先查看源文件。

运行工具
npx skills add https://github.com/jeremylongshore/tons-of-skills-marketplace/tree/6ea46b08dce892944db7c16f28d0b5308d402402/plugins/community/skills-janitor/skills/janitor-fix --skill janitor-fix
许可协议: —

来源与配置

查看 GitHub 源码

jeremylongshore/tons-of-skills-marketplace固定提交 6ea46b08dce892944db7c16f28d0b5308d402402

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

本条目收录公开技能“janitor-fix”,归入 Skillπ「系统管理」使用场景,并关联「软件开发与 IT」职业。目录标签:ai-lab、技能维护、自动修复、符号链接。此页用于按任务发现相关资源;请通过固定原站版本核对实际能力、依赖环境和所需权限。本站仅提供独立目录介绍与原站入口,原始文件和附件依各自许可开放。

↓ 0 下载 ↗ 0 分享点击

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
---
name: janitor-fix
description: "Automatically fix skill problems (safe preview first). Also use with --prune to find and remove broken symlinks, empty directories, and orphaned skills. Trigger with '/janitor-fix'."
allowed-tools: Read, Bash(bash:*)
argument-hint: "[--apply] [--prune]"
version: 1.5.1
author: Krzysztof Hendzel <krzysztoff.hendzel@gmail.com>
license: MIT
compatibility: Designed for Claude Code. Requires bash 3.2+ (macOS default works). Modifies only user/project/codex-scope skill files, never plugin content.
tags:
  - skills
  - auto-fix
  - cleanup
  - symlinks
  - maintenance
---

# Auto-Fix

Automatically fix common skill issues. Dry-run by default — shows what would change without modifying files.

## Overview

Repairs frontmatter problems (missing delimiters, empty descriptions, missing version fields) across user, project, and codex-scope skills, and — in `--prune` mode — removes broken symlinks and empty skill directories. Plugin/marketplace skills are never modified (changes would be overwritten on update).

## Prerequisites

- Claude Code with the skills-janitor plugin installed (provides `scripts/fix.sh`)
- bash 3.2+ (the stock macOS bash works; no external dependencies)
- Write access to the user's own skill directories (`~/.claude/skills`, `./.claude/skills`, `~/.agents/skills`)

## Instructions

### Step 1: Preview first (always)

```bash
bash ~/.claude/skills/skills-janitor/scripts/fix.sh            # preview fixes
bash ~/.claude/skills/skills-janitor/scripts/fix.sh --prune    # preview broken/orphaned removals
```

### Step 2: Show the user the preview and confirm

Never jump straight to `--apply`. Present the `[DRY RUN]` lines and ask before writing.

### Step 3: Apply

```bash
bash ~/.claude/skills/skills-janitor/scripts/fix.sh --apply           # apply fixes
bash ~/.claude/skills/skills-janitor/scripts/fix.sh --prune --apply   # remove broken skills
```

What it fixes:

- Adds missing frontmatter delimiters (`---`)
- Fills empty `description` fields with a template
- Adds missing `version` field (defaults to "1.0.0")
- Generates template descriptions using the skill folder name

Prune mode finds and removes:

- **Broken symlinks** — skill folder points to deleted source
- **Empty directories** — skill folder with no SKILL.md
- **Orphaned skills** — user-scope copies of plugin skills

Safety model: dry-run by default (must pass `--apply` to write), skips plugin/marketplace skills, logs ALL changes with timestamps to `data/changelog.log`, always asks for confirmation before removing.

## Output

Per-skill action lines (`[DRY RUN]` / `[FIXED]` / `[PRUNED]` / `[SKIP]`) followed by a summary of fixable issues, skipped items, and prunable entries. In dry-run mode the summary ends with "Run with --apply to make these changes."

## Error Handling

1. **Error**: A fix produced an unexpected result in a SKILL.md
   **Solution**: Every applied change is logged in `data/changelog.log` with a timestamp — show the log entry and restore the affected field manually; template descriptions are meant to be replaced by the author.

2. **Error**: `[SKIP] Plugin/marketplace skill - don't modify`
   **Solution**: Expected behavior, not an error. Plugin content is fixed upstream — suggest the user report the issue to the plugin author instead.

3. **Error**: Prune lists a skill the user wants to keep
   **Solution**: Do not run `--apply`. A "broken symlink" that should be kept means its target moved — recreate the link (`ln -sfn <new-target> <link>`) instead of pruning.

## Examples

### Example 1: Safe fix cycle

**Input**: "Fix my skills."

**Output**: Run the dry-run, present the `[DRY RUN]` list ("3 fixable: 2 missing descriptions, 1 missing version"), ask for confirmation, then run `--apply` and report the `[FIXED]` lines.

### Example 2: Cleanup of broken leftovers

**Input**: "Remove broken skills."

**Output**: Run `--prune` (dry-run), show what would be removed and why (broken symlink targets, empty dirs), confirm, then `--prune --apply` and report the `[PRUNED]` lines.

## Resources

- Fix script (plugin-relative): `{baseDir}/../../scripts/fix.sh`
- Change log of applied fixes: `data/changelog.log` in the plugin directory
- For finding issues: `/janitor-report`
- For usage + token cost: `/janitor-value`

当前收录版本

1.5.1

核对来源版本 ↗

质量评测

满分 100。前四项来自 DeepSkill 收录的质量报告。

场景价值85/100
评分依据

提供自动修复技能问题的实用功能,涵盖 frontmatter 修复、损坏符号链接清理等常见维护任务

触发精准95/100
评分依据

触发词 '/janitor-fix' 明确,参数 '[--apply] [--prune]' 清晰,边界清晰

结构规范95/100
评分依据

Phase/步骤清晰(Step 1: Preview, Step 2: Confirm, Step 3: Apply),有出口条件,含端到端示例,frontmatter 完整

执行可靠90/100
评分依据

工具来源明确,参数正确,覆盖主要异常,不可逆操作有确认机制(dry-run 默认,需 --apply 才写入)

证据可验 (前四项均值)91/100
计算方式

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

risk · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。

来源与使用声明 SkillPi 的部分技能资料来自公开来源或创作者提交。第三方内容的权利归各自权利人所有。安装或运行前,请查看原站的许可、权限要求和使用风险。

来源与使用

请按详情页的作者、原始来源和许可证核对使用条件,运行前检查技能需要的权限。目录收录不等于已验证安装或安全性。