⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.5.1

janitor-fix

khendzel@khendzel⭐ 125 stars· last commit 1mo ago· 1 open issues

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'.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐ 125 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Skills Janitor

Tinder for your Claude Code skills. Swipe through your collection and delete what's wasting context, in seconds.

Works with Claude Code and OpenAI Codex. 6 commands, zero dependencies.

/janitor-swipe — swipe keep / delete / skip through every installed skill

Status (v1.8, September 2026): maintenance mode. Claude Code now does the core of this natively.

When this project started, nothing in Claude Code told you which skills were eating your context. Now it does:

  • /skill-doctor shows what each skill costs in context and how often it gets used, and flags the ones never invoked
  • /doctor finds unused skills, MCP servers and plugins against their context cost, and fixes them after asking
  • /doctor prompt-audit audits your CLAUDE.md files, skills, agents and commands for outdated or conflicting instructions
  • /skills sorts by token count (t) and hides a skill with Space

If you only use Claude Code and only want to trim context, use those. They see real usage from inside the harness, which a plugin never can.

The janitor stays useful for what still isn't built in: security scanning (/janitor-security, plus a pre-install check in /janitor-discover), duplicate detection across skills, OpenAI Codex support, and actually deleting broken symlinks and dead skill folders. Bug fixes and PRs are still welcome. No new features are planned.

Thanks to everyone who installed it, filed issues and sent fixes: #4 of the day on Product Hunt, 120+ stars, and PRs from @nshonda, @lulzpid and @jerryhuangzq-lang. We were early, and now it's native. That's a good ending for a janitor.

Scans every place a skill lives: user, project, codex, and every skill installed via /plugin install — plus your subagents and MCP servers. Surfaces duplicates, broken symlinks, unused skills, and connected-but-never-called MCP servers cluttering your context. Usage counts come from real session transcripts, including skills Claude auto-triggered.

Commands

CommandWhat it does
/janitor-reportHealth check: inventory, duplicates, broken skills. --brief for inventory only.
/janitor-fixAuto-fix issues. --prune removes broken symlinks and empty dirs.
/janitor-valueHonest token costs (always-loaded descriptions vs on-demand bodies) + usage, skills and subagents.
/janitor-securityHeuristic scan for prompt injection, hidden instructions, and dangerous script patterns. (v1.6+)
/janitor-discoverSearch GitHub for skills, or check a URL before installing — now including a pre-install security scan.
/janitor-swipeInteractive TUI — swipe keep/delete/skip through skills AND MCP servers, sorted most-likely-waste first. (v1.4+)

Each has its own slash command. Or use natural language: "check my skills", "which skills are wasting context?", "find an n8n skill".

Install

/plugin marketplace add khendzel/skills-janitor
/plugin install skills-janitor

Or via skills.sh:

npx skills add khendzel/skills-janitor

Or clone directly:

git clone https://github.com/khendzel/skills-janitor ~/.claude/skills/skills-janitor

Security scan (v1.6)

A skill is text your agent trusts. Public research found prompt injection in roughly a third of tested community skills — so the janitor now scans for the known bad shapes: instruction-override phrases, "don't tell the user" directives, instructions hidden in HTML comments or zero-width unicode, smuggled base64 payloads, and scripts that pipe the network into a shell or read credential stores.

/janitor-security          # audit everything installed
/janitor-discover <url>    # overlap + security check BEFORE installing

Verdicts are honest heuristics (PASS / REVIEW / RISK): a RISK means "read this before trusting it", not "malware". Calibrated for low noise — on a real 178-skill machine it flags 2, both genuinely worth reading.

Swipe through your skills (v1.4)

Tinder-style triage for your skill collection. The deck is sorted heaviest-and-least-used first, so most users hit ← delete through the top 5–10 cards and quit before reviewing everything.

!bash ~/.claude/skills/skills-janitor/scripts/swipe.sh

(The ! prefix runs in your terminal, not the Claude Code Bash tool — the TUI needs a real interactive stdin.)

Controls: ← delete, → keep, ↓ skip, u undo, i inspect full description, q quit.

Plugin skills are flagged for review (you can't rm individual plugin skills — they belong to a plugin). User-scope skills stage for actual deletion, applied on y confirmation at the end.

Since v1.7 the deck also includes your MCP servers — see MCP server triage.

MCP server triage (v1.7)

Skills aren't the only thing renting space in your context. Every connected MCP server loads its tool schemas on every request, whether you call it or not.

The janitor inventories every configured server — user ~/.claude.json, per-project entries, project .mcp.json, and plugin-bundled — then cross-references real usage from your session transcripts (mcp__server__tool records):

=== Skills Janitor - MCP Servers ===
Usage window: last 8 weeks of session transcripts

  Server                       Scope         Calls  Tools Last Used   Origin
  ──────────────────────────── ──────────── ────── ────── ─────────── ────────────
  design-tool                  mcp-user          0      0 never       ~/.claude.json
  deploy-tool                  mcp-plugin        0      0 never       plugin:deploy
  cms                          mcp-project      41      4 2026-07-02  ~/.claude.json

--- Unused in 8 weeks (2) ---
  design-tool (mcp-user) — configured in ~/.claude.json
  deploy-tool (mcp-plugin) — configured in plugin:deploy

No invented token numbers — MCP schemas live server-side, so the janitor reports only what it can prove: where the server is configured, how many distinct tools you actually called, how often, and when last. Servers seen in transcripts but no longer configured are listed separately.

Unused servers rank high in the swipe deck. Swiping one left removes the entry from its config file with a timestamped .bak backup. Plugin-bundled servers are flagged for plugin review instead.

Duplicate detection

The duplicate detector flags cross-scope overlaps, including plugins that re-implement a skill you already had standalone:

=== Skills Janitor - Duplicate Detection ===

--- Description Overlap (Jaccard > 30%) ---

  [98%] marketing-seo-audit <-> marketing-skills:seo-audit
        Scopes: user / plugin

  [100%] marketing-content-strategy <-> marketing-skills:content-strategy
        Scopes: user / plugin

Overlap is scored on descriptions (Jaccard), so it catches re-implementations that share no filename and live in different scopes.

Upgrading from v1.2

The five v1.2 aliases were removed in v1.5. Renames:

v1.2now
/janitor-audit/janitor-report --brief
/janitor-usage/janitor-value
/janitor-tokens/janitor-value
/janitor-search/janitor-discover
/janitor-precheck/janitor-discover <url>

Full release notes: CHANGELOG.md.

Requirements

Bash, Python 3, curl. No pip installs, no node modules.

Contributing

PRs welcome. Each command is self-contained in skills/janitor-*/SKILL.md plus a sibling script in scripts/.

License

MIT

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/janitor-fix/SKILL.md4.2 KBupstream ↗
    ---
    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 <[email protected]>
    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`
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/khendzel-skills-janitor-skills-janitor-fix.md

// REPO STATS

125 stars
1 open issues
Last commit: 1mo ago