agentleFS
milad-ahmdmilad-ahmd/agent-skills/skills/skills-doctor/SKILL.md

skills-doctor

Skill5 starsChanged 19 days agoMITView on GitHub

Audits installed Agent Skills (SKILL.md) for problems that stop them from working, such as invalid or missing frontmatter, name and folder mismatches, vague or overlapping descriptions that never trigger or trigger wrongly, oversized files, missing referenced scripts, and possible embedded secrets, using a linter script, then proposes fixes. Use when the user asks to lint, check, debug, clean up, or audit their skills or a skills folder such as ~/.claude/skills, or asks why a skill isn't triggering.

  • Reads credentials

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never delete a skill without confirmation.

    line 56
  2. Distinctive:

    Never print the full value of a detected secret.

    line 57

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skills Doctor 🩺

Diagnose why skills don't trigger, trigger at the wrong time or conflict with each other.

1. Scan

python3 scripts/skills_doctor.py                          # ~/.claude/skills + ./.claude/skills
python3 scripts/skills_doctor.py path/to/skills-dir ...   # custom locations
python3 scripts/skills_doctor.py --strict skills/         # CI: also fail on warnings/overlaps

Exit codes: 0 clean · 1 errors · 2 warnings or overlaps (only with --strict).

The checks:

  • Frontmatter: present and valid, including folded (>), literal (|) and quoted multi-line descriptions.
  • Name: matches its folder and is kebab-case.
  • Description: exists, isn't too short or too long, and has "Use when…" trigger language.
  • File size, and scripts that are referenced but missing.
  • Secrets: both known key shapes (AKIA…, sk-…, ghp_…, private keys) and generic assignments like *_SECRET*=, *PASSWORD*=, *TOKEN*=, *API_KEY*=, plus credentials inside URLs (scheme://user:pass@host).
  • Overlap: pairs of skills whose whole descriptions (Jaccard ≥ 0.20) or "Use when…" clauses (≥ 0.30) overlap. The trigger clause is where conflicts actually happen.

CI: --format github turns each issue into a PR annotation (file, line) and, when $GITHUB_STEP_SUMMARY is set, appends a summary table. In a GitHub workflow, use the Action instead of copying the script:

- uses: actions/checkout@v4
- uses: milad-ahmd/skills-doctor@v1   # auto-detects skills/, .claude/skills, .agents/skills

Limits: the secret scan is heuristic. It catches common leak patterns but not every secret format, so it never proves a skill is safe. For anything you'll publish, also run a dedicated scanner (gitleaks, trufflehog) and read the scripts yourself.

2. Interpret

  • ❌ Errors break loading. Fix them first.
  • ⚠️ Warnings hurt triggering or quality.
  • 🔀 Overlaps: decide whether to merge the skills, sharpen both descriptions with distinct triggers, or uninstall one.
  • 📏 Closest pairs: the summary always shows the highest description and trigger-clause scores, with their distance to the threshold. "0 overlaps" only means nothing crossed the line. A pair marked close: review (within 0.05) is one new similar skill away from conflicting, so mention it to the user.

3. Fix (with user approval)

Propose exact edits: rewritten descriptions (<what it does>. Use when the user asks to …), renames, splitting oversized skills into references/, and removing secrets (then rotate them).

Re-run with --strict until it exits 0, meaning no errors, no warnings and no overlaps. "No errors" alone is not a clean bill of health. Read every warning, and if you believe one is a false positive, tell the user why instead of silently ignoring it.

4. Trigger test

For each important skill, write 3 prompts that should trigger it and 2 that should not, then check the descriptions against them.

Rules

  • Never delete a skill without confirmation. Back up before bulk edits.
  • Never print the full value of a detected secret.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.