agentleFS
nainishshafinainishshafi/developer-productivity-skills/.github/skills/skill-doctor/SKILL.md

skill-doctor

Skill1 starsChanged todayMITView on GitHub

Reads unprocessed learnings from project-memory (journal and ledger), triages whether each lesson should update an existing skill, scaffold a new skill via skill-creator, or be skipped, applies anti-bloat edits to the right skill module, audits and optimizes existing skills (diagnosing vague triggers, bloated instructions, orphan assets, edge-case blind spots, and missing verification steps to propose targeted patches), and marks learnings as promoted. Runs periodically inside software-factory-agent or on demand. Use when asked to "skill doctor", "run skill doctor", "update skills from memory", "evolve skills from learnings", "heal skills", "promote learnings to skills", "audit skill health", "audit skill", "optimize skill", or "inspect skill quality".

29 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use herdr, diagnosing-bugs and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ninehillsSkill

    herdr

    Control herdr from inside it. Manage workspaces and tabs, split panes, run commands, read output, and wait for state changes — all via CLI commands that talk to the running herdr instance over a local unix socket. Use when running inside herdr (HERDR_ENV=1).

    Also in 3 projects that use this

  • GoogleSkill

    diagnosing-bugs

    Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

    Also in 3 projects that use this

  • NVIDIASkill

    research

    Before designing a feature, research how comparable libraries solve the problem, check best practices, known pitfalls, and upstream changes. Use when starting a new feature, investigating an unfamiliar area, or the user asks to research something.

    Also in 4 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 3 projects that use this

  • GoogleSkill

    grill-me

    A relentless interview to sharpen a plan or design.

    Also in 4 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 3 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 25 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After debugging a tricky platform, security, framework, or tooling trap that future sessions must not repeat.

    line 17
  2. Very specific:

    When auditing or optimizing an existing skill's SKILL.md, references/, and scripts/ for vague triggers, instruction bloat, edge-case blind …

    line 18
  3. Very specific:

    When asked to "run skill doctor", "update skills from memory", "evolve skills from learnings", "promote learnings to skills", "audit skill …

    line 19
  4. Very specific:

    If 0 pending learnings exist, run audit-skills to verify repository health and exit cleanly.

    line 35
  5. Very specific:

    Add new pitfalls, patterns, or guardrails to the matching topical submodule (core/, runtime-and-memory/, concurrency/, security/, testing/, …

    line 55
  6. Very specific:

    Update the relevant section (## Workflow, ## Common Pitfalls, or references/*.md), or harden helper scripts in scripts/.

    line 57
  7. Very specific:

    Never embed local user directory paths (C:\Users\..., /home/...) or secrets in skill docs or scripts.

    line 59
  8. Very specific:

    When CREATE_NEW_SKILL is selected:

    line 67
  9. Distinctive:

    Run the skill health audit:

    line 82
  10. Very specific:

    If any Python/JS/TS scripts were created or modified, verify low over-engineering risk (score < 40):

    line 90
  11. Distinctive:

    Use this mode when asked to audit, diagnose, or optimize an existing skill (or all skills):

    line 100
  12. Very specific:

    Read the target skill's SKILL.md, references/*.md, and scripts/*, evaluating against references/skill-evolution-rubric.md:

    line 108

“Common” is measured: kept by at least 6 in 10 of the 25 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

Skill Doctor

Closed-loop continuous improvement skill that converts hard-won project-memory learnings into durable repository skills—updating existing skill modules, creating new skills when recurring capability gaps emerge, and auditing all skill health.


When to Use This Skill

  • Periodically at the end of a software-factory-agent run (when >= 3 unprocessed learnings accumulate or Phase 8 remediation was triggered).
  • After debugging a tricky platform, security, framework, or tooling trap that future sessions must not repeat.
  • When auditing or optimizing an existing skill's SKILL.md, references/, and scripts/ for vague triggers, instruction bloat, edge-case blind spots, or missing verification steps.
  • When asked to "run skill doctor", "update skills from memory", "evolve skills from learnings", "promote learnings to skills", "audit skill health", or "optimize skill <name>".

Mode A — Memory-Driven Skill Evolution

Step 1 — Harvest Unprocessed Learnings

Retrieve pending journal and ledger learnings via the project-memory MCP tool get_unprocessed_learnings, or run the diagnostic CLI:

.\.venv\Scripts\python.exe .github/skills/skill-doctor/scripts/skill-doctor.py diagnose

(On POSIX, substitute .\.venv\Scripts\python.exe with .venv/bin/python.)

If 0 pending learnings exist, run audit-skills to verify repository health and exit cleanly.


Step 2 — Triage & Route Each Learning

Consult references/skill-evolution-rubric.md and classify each pending memory into one of three actions:

ClassificationCriteriaAction
UPDATE_EXISTING_SKILLMatches an existing skill domain and adds a reusable pitfall, guardrail, command convention, or pattern not yet documented.Edit the target skill module (or SKILL.md / references/) and mark promoted.
CREATE_NEW_SKILL>= 2 learnings cluster around a repeatable technology, workflow, or domain not covered by any existing skill.Scaffold via skill-creator, populate modules, register in factory/orchestrator/README, and mark promoted.
SKIP_TRANSIENTAlready documented in the target skill (ALREADY_COVERED) or one-off task/ticket state (SKIP_TRANSIENT).Do not bloat skills; mark skipped so it is not re-triaged.

Step 3 — Apply Skill Updates Safely (Anti-Bloat Guardrails)

  1. Modular Knowledge-Pack Skills (e.g., java-developer, python-developer, typescript-developer, react-developer, csharp-developer, powershell-writer):
    • NEVER bloat the lean SKILL.md router (keep under 60 lines).
    • Add new pitfalls, patterns, or guardrails to the matching topical submodule (core/, runtime-and-memory/, concurrency/, security/, testing/, etc.) or references/.
  2. Task / Reference Skills:
    • Update the relevant section (## Workflow, ## Common Pitfalls, or references/*.md), or harden helper scripts in scripts/.
  3. Zero Personal Paths & Secret Hygiene:
    • Never embed local user directory paths (C:\Users\..., /home/...) or secrets in skill docs or scripts.
  4. Bump Semantic Version:
    • Increment version in the updated SKILL.md frontmatter (PATCH for pitfalls/clarifications; MINOR for new sections or scripts).

Step 4 — Scaffold New Skills (When Warranted)

When CREATE_NEW_SKILL is selected:

  1. Run skill-creator scaffolding:
    node .github/skills/skill-creator/scripts/scaffold-skill.js <skill-name> .github/skills [--modular]
  2. Populate SKILL.md (with 5–8 realistic trigger phrases in description) and supporting modules/references/scripts using the harvested learnings.
  3. Register the new skill in:
    • .github/agents/software-factory-agent.md (skill count + routing matrix)
    • .github/skills/agent-orchestrator/scripts/orchestrator-context-manager.py (stage mapping if applicable)
    • README.md (Skills Catalog table, category section, and directory tree)

Step 5 — Validate & Mark Learnings Promoted

  1. Run the skill health audit:
    .\.venv\Scripts\python.exe .github/skills/skill-doctor/scripts/skill-doctor.py audit-skills
  2. Validate all SKILL.md frontmatter and YAML files:
    npm run validate:skills --prefix mcp/sql-connector
  3. If any Python/JS/TS scripts were created or modified, verify low over-engineering risk (score < 40):
    .\.venv\Scripts\python.exe .github/skills/agent-orchestrator/scripts/orchestrator-context-manager.py check-overengineering --file <modified-script>
  4. Mark processed memory IDs via project-memory MCP mark_learning_promoted (or CLI skill-doctor.py mark --ids <id1,id2> --status promoted --target-skill <skill>).

Mode B — Skill Auditor & Optimizer

Use this mode when asked to audit, diagnose, or optimize an existing skill (or all skills):

  1. Run Static Quality & Structural Audit:
    .\.venv\Scripts\python.exe .github/skills/skill-doctor/scripts/skill-doctor.py audit-skills --skill <skill-name>
    (Omit --skill <skill-name> to audit the entire .github/skills/ catalog; add --strict to fail on warnings.)
  2. Inspect Skill Files & Diagnose Semantic Weaknesses: Read the target skill's SKILL.md, references/*.md, and scripts/*, evaluating against references/skill-evolution-rubric.md:
    • Vague Trigger Descriptions: Missing concrete "Use when..." scenarios or 5–8 quoted trigger phrases.
    • Bloated / Noisy Instructions: Modular SKILL.md routers exceeding ~65 lines, redundant prose, or unlinked orphan files in references/ / scripts/.
    • Edge-Case Blind Spots: Bare python/py calls instead of .venv, unsafe shell quoting, or missing platform caveats (Windows vs POSIX).
    • Missing Verification Steps: Task skills with scripts/ lacking expected output, exit-code, or post-edit validation commands (and run check-overengineering on scripts).
  3. Propose & Apply Targeted Patches:
    • Present or apply minimal, localized diffs (do not rewrite working sections from scratch), bump version in SKILL.md frontmatter, and re-run audit-skills --skill <skill-name> + npm run validate:skills --prefix mcp/sql-connector to verify zero errors.

Additional Resources

  • Skill Evolution Rubric — Triage decision matrix, deduplication rules, modular router protection, and versioning guide.
  • Skill Doctor CLI — Automated diagnostic, schema migration, skill audit, and promotion-marking script.

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.