Agent skill · software engineering · jeremylongshore
janitor-fix
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'.
Why this skill is useful
Adds a script for automated skill maintenance and cleanup that the AI wouldn't reliably generate on its own.
What it needs
Requires bash installed locally. About 2k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
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) 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 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. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/janitor-fix