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'.
npx skills add https://github.com/khendzel/skills-janitor --skill janitor-fix
Automatically fix common skill issues. Dry-run by default — shows what would change without modifying files.
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).
scripts/fix.sh)~/.claude/skills, ./.claude/skills, ~/.agents/skills)bash ~/.claude/skills/skills-janitor/scripts/fix.sh # preview fixes
bash ~/.claude/skills/skills-janitor/scripts/fix.sh --prune # preview broken/orphaned removals
Never jump straight to --apply. Present the [DRY RUN] lines and ask before writing.
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:
---)description fields with a templateversion field (defaults to "1.0.0")Prune mode finds and removes:
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.
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."
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.
[SKIP] Plugin/marketplace skill - don't modifySolution: Expected behavior, not an error. Plugin content is fixed upstream — suggest the user report the issue to the plugin author instead.
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.
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.
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.
{baseDir}/../../scripts/fix.shdata/changelog.log in the plugin directory/janitor-report/janitor-valueCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
Replace with description of the skill and when Claude should use it.
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Use when creating new skills, editing existing skills, or verifying skills work before deployment
Take khendzel/janitor-fix from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.