janitor-report
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHealth Report
健康报告
Generate a comprehensive health report combining inventory, quality checks, duplicate detection, and broken skill findings.
生成一份结合清单、质量检查、重复项检测和失效技能排查的综合健康报告。
Overview
概述
One report covering every place a skill lives: user, project, codex, plugin, and source scopes. Plugin skills appear with their full invocation name (e.g. , ) — these were invisible to the v1.2 report. The scan JSON also includes an array (subagents from — their descriptions are always-loaded too) and per-plugin (installed commit vs marketplace HEAD) — surface stale plugins and heavy agents in the report.
marketing-skills:imagefigma:figma-useagents~/.claude/agentsupdate_availableModes:
- (default) — full health check: inventory + lint + duplicates + broken
/janitor-report - — inventory only (replaces the old
/janitor-report --brief)/janitor-audit
一份报告覆盖技能所在的所有位置:用户、项目、代码库、插件和源范围。插件技能会显示完整调用名称(例如 、)——这些在v1.2版本的报告中是不可见的。扫描JSON还包含一个 数组(来自 的子代理——它们的描述也会始终加载)以及每个插件的 字段(已安装提交版本 vs 市场最新版本)——在报告中显示过时插件和占用资源较多的代理。
marketing-skills:imagefigma:figma-useagents~/.claude/agentsupdate_available模式:
- (默认)——全面健康检查:清单 + 代码检查 + 重复项检测 + 失效技能排查
/janitor-report - ——仅生成清单(替代旧的
/janitor-report --brief)/janitor-audit
Prerequisites
前提条件
- Claude Code with the skills-janitor plugin installed (provides ,
scripts/scan.sh,lint.sh)detect_dupes.sh - bash 3.2+ (the stock macOS bash works; no external dependencies)
- Read access to ,
~/.claude/skills, and installed plugin metadata~/.claude/agents - No authentication or API keys required — the scripts read local files only
- 安装了skills-janitor插件的Claude Code(提供 、
scripts/scan.sh、lint.sh)detect_dupes.sh - bash 3.2+(macOS自带的bash即可;无需外部依赖)
- 拥有 、
~/.claude/skills和已安装插件元数据的读取权限~/.claude/agents - 无需身份验证或API密钥——脚本仅读取本地文件
Instructions
操作步骤
Step 1: Run the scripts
步骤1:运行脚本
Full report:
bash
bash ~/.claude/skills/skills-janitor/scripts/scan.sh
bash ~/.claude/skills/skills-janitor/scripts/lint.sh
bash ~/.claude/skills/skills-janitor/scripts/detect_dupes.shBrief mode (inventory only):
bash
bash ~/.claude/skills/skills-janitor/scripts/scan.sh完整报告:
bash
bash ~/.claude/skills/skills-janitor/scripts/scan.sh
bash ~/.claude/skills/skills-janitor/scripts/lint.sh
bash ~/.claude/skills/skills-janitor/scripts/detect_dupes.sh简洁模式(仅清单):
bash
bash ~/.claude/skills/skills-janitor/scripts/scan.shStep 2: What each script covers
步骤2:各脚本覆盖范围
- Inventory (scan.sh) — all skills across scopes, symlink status, frontmatter fields, line counts; and
agents(withplugins) arrays;update_availablecount.broken_symlinks - Quality checks (lint.sh) — Critical: broken symlinks, missing SKILL.md, missing frontmatter. Warning: missing/empty name or description, description too short/long, missing version. Info: no body content, no Gotchas section, large files.
- Duplicate detection (detect_dupes.sh) — name collisions (two distinct skills with the same qualified name at different paths) and description overlap (Jaccard similarity >30%), with cross-scope user-vs-plugin pairs explicitly surfaced (e.g. (user) ↔
marketing-seo-audit(plugin)).marketing-skills:seo-audit
- 清单(scan.sh)——所有范围的技能、符号链接状态、前置元数据字段、行数;和
agents(包含plugins)数组;update_available计数。broken_symlinks - 质量检查(lint.sh)——严重问题:失效符号链接、缺失SKILL.md、缺失前置元数据。警告:名称或描述缺失/为空、描述过短/过长、缺失版本。信息:无主体内容、无Gotchas章节、文件过大。
- 重复项检测(detect_dupes.sh)——名称冲突(不同路径下两个不同技能具有相同限定名称)和描述重叠(杰卡德相似度>30%),同时明确显示跨范围的用户与插件配对(例如 (用户)↔
marketing-seo-audit(插件))。marketing-skills:seo-audit
Step 3: Present a unified report
步骤3:生成统一报告
Merge the three outputs into one table with severity levels, then recommend actions.
将三个输出合并为一个带有严重级别的表格,然后给出操作建议。
Output
输出示例
| Skill | Scope | Status | Issues |
|----------------------------------|----------|-------------|------------------------------------------|
| marketing-copywriting | user | DUPLICATE? | 90% overlap with marketing-skills:copywriting |
| seo-audit | user | WARNING | Description too short |
| old-deploy-helper | user | CRITICAL | Broken symlink |
| figma:figma-use | plugin | OK | - |Recommended actions per issue type:
- Broken symlinks →
/janitor-fix --prune - Quality issues →
/janitor-fix - User-vs-plugin duplicates → uninstall the user-scope copy and rely on the plugin (or vice versa)
- Stale plugins () →
update_available: true/plugin update <name> - Token waste →
/janitor-value - Suspicious content (injection phrases, dangerous scripts) →
/janitor-security
| 技能名称 | 范围 | 状态 | 问题描述 |
|----------------------------------|----------|-------------|------------------------------------------|
| marketing-copywriting | user | 疑似重复? | 与marketing-skills:copywriting有90%内容重叠 |
| seo-audit | user | 警告 | 描述过短 |
| old-deploy-helper | user | 严重 | 符号链接失效 |
| figma:figma-use | plugin | 正常 | - |针对不同问题类型的建议操作:
- 失效符号链接 →
/janitor-fix --prune - 质量问题 →
/janitor-fix - 用户与插件重复项 → 卸载用户范围的副本,使用插件版本(反之亦然)
- 过时插件()→
update_available: true/plugin update <name> - 令牌浪费 →
/janitor-value - 可疑内容(注入语句、危险脚本)→
/janitor-security
Error Handling
错误处理
-
Error:Solution: The plugin is installed under a different root. Locate it with
scan.sh: No such file or directoryor check the plugin cache, then run the scripts from their actual location.ls ~/.claude/skills -
Error: Scan output is not valid JSON Solution: Re-run with stderr visible (drop any) and report the failing line; a skill directory with unusual characters is the usual cause.
2>/dev/null -
Error:array is empty despite installed plugins Solution:
pluginsis missing or in an unknown format — report which Claude Code version is in use.~/.claude/plugins/installed_plugins.json
-
错误:解决方案:插件安装在不同根目录下。使用
scan.sh: No such file or directory定位或检查插件缓存,然后从实际位置运行脚本。ls ~/.claude/skills -
错误:扫描输出不是有效的JSON 解决方案:重新运行并显示stderr(移除任何),报告出错行;通常是包含特殊字符的技能目录导致的。
2>/dev/null -
错误:已安装插件但数组为空 解决方案:
plugins缺失或格式未知——报告当前使用的Claude Code版本。~/.claude/plugins/installed_plugins.json
Examples
示例
Example 1: Full health check
示例1:全面健康检查
Input: "Check my skills for problems."
Output: Run all three scripts, merge into the severity table, and lead with counts: "175 skills scanned: 2 critical (broken symlinks), 5 warnings, 3 likely duplicates, 2 plugins have updates available."
输入:"检查我的技能是否存在问题。"
输出:运行所有三个脚本,合并为严重级别表格,并以统计数据开头:"已扫描175个技能:2个严重问题(失效符号链接),5个警告,3个疑似重复项,2个插件有可用更新。"
Example 2: Inventory only
示例2:仅生成清单
Input: "/janitor-report --brief"
Output: Run only and present the inventory grouped by scope with per-scope counts.
scan.sh输入:
/janitor-report --brief输出:仅运行 ,按范围分组展示清单并显示各范围的技能数量。
scan.shResources
相关资源
- Scripts (plugin-relative): ,
{baseDir}/../../scripts/scan.sh,lint.shdetect_dupes.sh - — auto-fix the issues this report finds
/janitor-fix - — token cost + usage (combined)
/janitor-value - — find or evaluate new skills
/janitor-discover
- 脚本(插件相对路径):、
{baseDir}/../../scripts/scan.sh、lint.shdetect_dupes.sh - ——自动修复此报告发现的问题
/janitor-fix - ——令牌成本 + 使用情况(合并统计)
/janitor-value - ——查找或评估新技能
/janitor-discover