Agent skill

Skill Ecosystem Doctor

by majiayu000 in majiayu000/spellbook

Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

MITAuto-check passedAgent Workflows

Install Skill Ecosystem Doctor

skills CLI
$ npx skills add majiayu000/spellbook --skill skill-ecosystem-doctor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook skill-ecosystem-doctor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/skill-ecosystem-doctor .claude/skills/skill-ecosystem-doctor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
skill-ecosystem-doctor
GitHub stars
287
Token cost
~3k tokens
SKILL.md length
1,449 words
Files
21 (incl. scripts, references, assets)
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

  • Works in 6 steps: Discover before creating → Run the deterministic audit → Classify findings → …
  • Auditing which Skill definitions are canonical versus duplicated across runtimes
  • SKILL.md covers Trigger boundary, Select the mode, Operating Contract and 1. Discover before creating, plus 7 more sections
  • Runs Python scripts from its folder; calls python3 and git

What it does

The skill treats agent Skills as a governed supply chain: audit first, plan repairs from evidence, apply only authorized changes, then verify and hand off. It stays out of project-local questions about whether a tool already loaded a Skill, sending those to that tool's own setup, and engages only for cross-runtime ownership, exposure or repair governance. Five modes are selected from intent: audit for read-only inspection, plan for explaining a change with no mutation, repair for fixing or retiring with an explicit scope and rollback, verify for rechecking a governance file, and an external-action mode for anything needing the action granted first. A mixed request runs audit before repair.

Before creating anything, the agent searches active roots and source repositories, locates every applicable AGENTS.md before editing a source repository, and classifies each path as a canonical source, a managed projection, a generated cache or unknown using a runtime-contracts reference. Direct actions are limited to read-only discovery, deterministic audits, report drafts and local validation, while destructive changes, credential actions, history rewriting or remote publication require escalation. The toolkit includes several scripts for checks, exposure, governance and modeling, plus references on governance schema, lifecycle drift and a remediation playbook.

When your agent uses it

  • Auditing which Skill definitions are canonical versus duplicated across runtimes
  • Planning a cross-runtime consolidation of Skills before touching anything
  • Quarantining or retiring a Skill with an explicit rollback plan
  • Rechecking a saved governance file after a previous repair

Example prompts

  • “Audit our Skill collection and tell me which copies are canonical.”
  • “Plan how to unify the duplicated review skill across Codex and Claude Code, but don't change anything yet.”
  • “Verify the governance file we saved last week still matches the current layout.”

Requirements

  • Python, with the packages listed in requirements.txt

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Discover before creating
  2. Run the deterministic audit
  3. Classify findings
  4. Produce a repair plan
  5. Apply only approved repairs
  6. Verify and hand off

What it can do on your machine

Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Skill Ecosystem Doctor loads about 3k tokens when it runs, and up to ~8k if it reads all its reference files. Until then it costs about 106 tokens; SKILL.md has 1,449 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 1,449 words, ~3,011 tokens.

Download SKILL.mdSave it as .claude/skills/skill-ecosystem-doctor/SKILL.md (or your agent's skills folder). This skill also uses 20 other files; get the full folder from GitHub.
name
skill-ecosystem-doctor
description
Audit and safely repair cross-runtime Skill governance: canonical-source ownership, divergent or duplicate projections, exposure scopes and budgets, lifecycle drift, quarantine, and retirement. Use when the user explicitly requests cross-runtime or cross-scope Skill governance; ignore project-local Skill inventory, product/runtime loading or enablement checks, usage statistics, and mentions/traces.

Skill Ecosystem Doctor

Treat the local Skill collection as a governed software supply chain. Audit first, plan repairs from evidence, apply only authorized changes, and finish with fresh cross-runtime verification and a durable handoff.

This workflow is at skill maturity, not unattended automation maturity. Do not schedule or silently apply repairs.

Trigger boundary

Questions such as “Did Studio load or start these Skills?” belong to Studio's own configuration, projections, and runtime inventory. Inspect that project/runtime directly. Invoke this Doctor only when the user explicitly asks for cross-runtime or cross-scope ownership, projection, exposure, lifecycle, or repair governance.

Select the mode

User intentModeRouting
Inspect, review, inventory, or diagnoseauditexecute_direct; read-only
Explain what should changeplanplan_first; no mutations
Fix, unify, quarantine, or retirerepairplan_first; explicit scope and rollback
Recheck an existing governance fileverifyexecute_direct; read-only
Rotate credentials, rewrite history, push, publish, or change remotesexternal actionclarify_first unless the current request grants that exact action

If the request mixes modes, run audit before repair. Do not infer repair authorization from a request to inspect or diagnose.

Operating Contract

  • Direct actions: read-only discovery, deterministic audits, report drafts, and local validation.
  • Escalate before: destructive changes, credential actions, history rewriting, remote publication, or any mutation not named by the current repair request.
  • Evidence-backed pushback: challenge a proposed source, deletion, or completion claim only with paths, state queries, tests, ownership records, or a concrete data-loss or security risk.
  • Feedback loop: promote repeated false positives, runtime-layout changes, and manual recovery steps into checks, fixtures, references, or evals.

1. Discover before creating

  1. Search active roots and source repositories before creating a Skill, governance file, script, alias, or projection.
  2. Locate every applicable AGENTS.md or equivalent before editing a source repository.
  3. Read runtime contracts and classify each path as canonical source, managed projection, generated cache, or unknown.
  4. Record the task goal, context, constraints, done-when conditions, dirty worktrees, runtime versions, and unavailable external permissions.
  5. If work will span many files or sessions, use flowguard and keep the handoff outside parent context.

Common roots are discovery candidates, not declarations. Verify them on the current machine; no data means unknown, not a guessed source relationship.

2. Run the deterministic audit

Use an existing governance file when one exists. Otherwise read the governance schema, adapt the example from discovered facts, and show the proposed configuration before writing it.

The Doctor accepts both its portable schema and the deployed Loom-style SKILL_GOVERNANCE_POLICY.json; do not create a second policy when the latter already exists.

For a large deployed catalog, prefer default_scope: "review" with an explicit global_allowlist. Keep specialist Skills in named profiles, bind profiles to project roots only when needed, and enforce an exposure_budget. A retained profile Skill is still canonical and usable on demand; it is not globally injected until a declared profile scope projects it.

From this Skill directory, run:

bash
python3 scripts/ecosystem_doctor.py --governance ./skill-ecosystem-governance.json
python3 scripts/ecosystem_doctor.py --governance ./skill-ecosystem-governance.json --json

Use --skip-loom only when Loom is intentionally outside scope. A missing Loom binary is an error when Loom validation is requested. Use --fail-on-warn for a strict release gate.

For the deployed policy, run the exposure reconciler without --apply first:

bash
python3 scripts/ecosystem_reconcile.py \
  --registry ~/.loom-registry \
  --policy ~/.loom-registry/SKILL_GOVERNANCE_POLICY.json

The dry-run reports trigger hardening, global/project/profile/review exposure, catalog budgets, plugin-state changes, and stale registry state. Run the same command with --apply only during an explicitly authorized repair run. Plugin configuration receives a timestamped backup before its exact boolean values are changed. Re-run the dry-run afterward and require an empty plan.

If the policy declares exact progressive-disclosure splits, inspect them with:

bash
python3 scripts/ecosystem_split.py \
  --registry ~/.loom-registry \
  --policy ~/.loom-registry/SKILL_GOVERNANCE_POLICY.json

Use --apply only after reviewing the extracted headings and destinations.

The audit checks:

  • broken roots, links, and local support-file references
  • source directories that look like Skills but have no SKILL.md
  • declared-name versus directory-name mismatches
  • divergent active projections for the same declared name
  • dynamic project/worktree projections and additional declared source roots
  • physical runtime copies without an exact source pin
  • drift in pinned composite materializations
  • active retired, quarantined, or projection-denied Skills
  • active references to retired entry points
  • high-confidence secret-like literals without printing their values
  • missing per-Skill governance decisions when decision coverage is enabled
  • review-by-default coverage, named profile bindings, and global catalog budgets
  • declared enabled/disabled plugin state without rewriting unrelated TOML
  • Loom health, projection drift, and pending remote synchronization

When the request concerns Skills that stopped triggering, aged out, or depend on possibly dead external projects, also read lifecycle drift. Treat missing maintenance metadata as unknown evidence, not proof that a Skill is unhealthy.

Treat test-fixture secret patterns as visible warnings, not silent allowlists.

3. Classify findings

Order repairs by security, logic, data integrity, source lineage, and naming. Separate facts from decisions:

  • A digest conflict proves different content; it does not prove which copy is correct.
  • A physical copy proves unmanaged materialization; it does not prove deletion is safe.
  • A secret pattern proves local exposure risk; it does not prove account-side rotation occurred.
  • A healthy projection proves installed consistency; it does not prove the upstream source is committed or remotely backed up.

Read the remediation playbook before planning mutations.

4. Produce a repair plan

For every proposed action, record:

  • finding and evidence
  • owning source repository or unresolved owner
  • exact writable files or paths
  • authorization level
  • reversible alternative and quarantine path
  • repository-specific tests
  • cross-runtime verification
  • stop condition

Use disjoint file ownership for any parallel work. Do not let two agents edit a shared registry, lockfile, manifest, or high-context file.

Show full SKILL.md (570 more words)Show less

5. Apply only approved repairs

Safe direct actions are read-only inspection, report generation, local tests, and drafting a plan. During an authorized repair run:

  • prefer an independent clean Git worktree for source edits
  • patch the canonical source, then regenerate managed outputs
  • quarantine before removal and record original path plus digest
  • preserve unrelated dirty worktree changes
  • migrate genuinely neutral assets before retiring an entry point
  • leave review and unbound profile Skills canonical but unprojected
  • remove retired registrations, rules, references, projections, and installer sources without creating compatibility aliases
  • update generated registries through their owning generator
  • stop if the same hypothesis fails three times

Keep usage evidence read-only. When classification depends on local invocation history, run skill-usage-stats or its governance matrix report, then return here for exposure changes.

Never print secrets, overwrite unknown user content, use force push, rewrite history, or claim external credential rotation without direct evidence.

6. Verify and hand off

Run verification from the current session:

  1. Run targeted tests for each changed source repository.
  2. Run each repository's build and full test gate when applicable.
  3. Re-run ecosystem_doctor.py and require zero errors.
  4. Re-run ecosystem_reconcile.py without --apply and require no planned changes.
  5. Classify every remaining warning with evidence; do not suppress it merely to reach a clean count.
  6. Start a fresh Codex session and confirm the active Skill catalog stays within its declared count/description budget without truncation warnings.
  7. Confirm every runtime the policy governs — Codex, Claude, and any of gemini/cursor named in projection_runtimes or managed_global_sources[].runtimes — resolves the intended source or exact pin. Check each runtime's Skill home: Codex uses ~/.agents/skills while Codex configuration remains under ~/.codex. When projection_runtimes is explicitly empty, verify every declared managed_projection inventory root instead and require a zero-link reconciliation plan.
  8. For retired Skills, scan all active paths and test the relevant installer so reinstall does not restore them.
  9. Run git diff --check in every changed Git worktree.
  10. Fill the remediation log template.

Use the eval cases when forward-testing trigger boundaries, read-only behavior, secret redaction, retirement, or dirty-worktree handling.

If commit, push, PR, merge, or landing is requested, prepare a review pack. Use review-gate when installed; otherwise present the same evidence and wait for explicit approval unless the current request grants that exact action.

Done when

  • canonical ownership is explicit for every in-scope active Skill
  • active projections have no unresolved content conflicts or broken resources
  • active global Skills and descriptions fit the declared exposure budget
  • retired and denied names have no active path or invocation reference
  • high-confidence embedded-secret findings are cleared or explicitly blocked
  • lifecycle claims distinguish verified, stale, unknown, and externally blocked evidence
  • every mutation has a rollback or quarantine record
  • fresh source-specific tests and the ecosystem audit pass
  • the final reconcile dry-run is empty
  • residual warnings and external actions are listed without overstating closure

Gotchas, negative examples, and drift signals

  • Do not choose the newest-looking fork automatically. Compare source history, contracts, tests, and ownership first.
  • Do not turn a read-only audit into a bulk cleanup. Produce a repair plan.
  • Do not replace quarantine with recursive deletion. Preserve a recoverable copy.
  • Do not accept “should work” as verification. Run fresh commands.
  • Do not automate this workflow after one successful machine repair. Promote only repeatedly stable, deterministic, read-only checks to scheduling.

Patch this Skill when the validator no longer understands an installed layout, the same false positive recurs, a runtime changes projection semantics, or users repeat the same safety correction.

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 20 other files (scripts, references, assets) in skills/skill-ecosystem-doctor of majiayu000/spellbook.

  • SKILL.md
  • agents/openai.yaml
  • assets/remediation-log-template.md
  • assets/skill-governance.example.json
  • evals/evals.json
  • references/governance-schema.md
  • references/lifecycle-drift.md
  • references/remediation-playbook.md
  • references/runtime-contracts.md
  • requirements.txt
  • scripts/ecosystem_checks.py
  • scripts/ecosystem_doctor.py
  • scripts/ecosystem_exposure.py
  • scripts/ecosystem_governance.py
  • scripts/ecosystem_legacy.py
  • scripts/ecosystem_model.py
  • … and 5 more

Open the folder on GitHubat commit ed52af7

Compare with similar skills

Skill Ecosystem Doctor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Skill Ecosystem Doctor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Skill Ecosystem Doctor this skillmajiayu000/spellbook287—~3kAutomated safety check: PassMIT
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Skill Creatorzhayujie/CowAgent47k—~4.7kAutomated safety check: NotesMIT
Open-Science Skill Creatoraipoch/open-science5.5k—~1.7kAutomated safety check: PassApache-2.0
Skill Quality ReviewerGalaxy-Dawn/claude-scholar5.7k1 repos~3kAutomated safety check: PassMIT
Prismer Skill CreatorPrismer-AI/PrismerCloud1.6k—~2.6kAutomated safety check: NotesMIT

Similar skills

  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    zhayujie/CowAgent

    Guides creating, installing and updating agent skills in a workspace: SKILL.md frontmatter, bundled scripts and references, with scripts to scaffold, validate and package.

    47k GitHub stars~4.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes
  • Open-Science Skill Creator

    aipoch/open-science

    Creates, revises, evaluates and publishes skills in the Open-Science app through its native host.skills composer, with optional test prompts and benchmarks.

    5.5k GitHub stars~1.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Skill Quality Reviewer

    Galaxy-Dawn/claude-scholar

    Scores a skill across description, content organization, writing style and structure, then produces letter grades and a prioritized improvement plan.

    5.7k GitHub starsUsed in 1 repo~3k tokens
    Agent WorkflowsAuto-check passed
  • Prismer Skill Creator

    Prismer-AI/PrismerCloud

    Walks an agent through creating, importing, editing, validating, testing and publishing Prismer Skills with a fixed workflow and bundled scripts.

    1.6k GitHub stars~2.6k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Skill Factory

    sangrokjung/claude-forge

    Analyze session work and automatically convert reusable patterns into Claude Code skills.

    852 GitHub stars~2.7k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed

More from majiayu000/spellbook

All 97 skills in this repo
  • AGENTS.md Scaffold

    majiayu000/spellbook

    Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

    287 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    287 GitHub stars~3.3k tokensUpdated 3 days ago
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    287 GitHub stars~2.1k tokensUpdated 3 days ago
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    287 GitHub stars~1.5k tokensUpdated 3 days ago
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    287 GitHub stars~2.2k tokensUpdated 3 days ago
    Auto-check passed
  • Repo Agent Context Audit

    majiayu000/spellbook

    Audits a repository's agent-readable context, from AGENTS.md and CLAUDE.md to skills and PRODUCT or TECH specs, and recommends the smallest useful improvements.

    287 GitHub stars~1.9k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Skill Ecosystem Doctor

What does Skill Ecosystem Doctor do?

Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement. The skill treats agent Skills as a governed supply chain: audit first, plan repairs from evidence, apply only authorized changes, then verify and hand off. It stays out of project-local questions about whether a tool already loaded a Skill, sending those to that tool's own setup, and engages only for cross-runtime ownership, exposure or repair governance.

When should I use Skill Ecosystem Doctor?

Skill Ecosystem Doctor fits situations like: auditing which Skill definitions are canonical versus duplicated across runtimes; planning a cross-runtime consolidation of Skills before touching anything; quarantining or retiring a Skill with an explicit rollback plan; rechecking a saved governance file after a previous repair.

How do I install Skill Ecosystem Doctor in Claude Code?

Run `npx skills add majiayu000/spellbook --skill skill-ecosystem-doctor -a claude-code`. Or copy the skill folder (skills/skill-ecosystem-doctor in majiayu000/spellbook) into .claude/skills/skill-ecosystem-doctor in your project. Claude Code loads it when a task matches its description.

How do I install Skill Ecosystem Doctor in Codex?

Run `npx skills add majiayu000/spellbook --skill skill-ecosystem-doctor -a codex`. Or copy the skill folder (skills/skill-ecosystem-doctor in majiayu000/spellbook) into .agents/skills/skill-ecosystem-doctor in your project. Codex loads it when a task matches its description.

Can I use Skill Ecosystem Doctor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill skill-ecosystem-doctor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/skill-ecosystem-doctor, .gemini/skills/skill-ecosystem-doctor, .github/skills/skill-ecosystem-doctor and .opencode/skills/skill-ecosystem-doctor in your project.

What does Skill Ecosystem Doctor need to run?

Going by SKILL.md and its folder, Skill Ecosystem Doctor needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and git). Our summary lists: Python, with the packages listed in requirements.txt.

Does Skill Ecosystem Doctor access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Skill Ecosystem Doctor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Skill Ecosystem Doctor use?

Skill Ecosystem Doctor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Skill Ecosystem Doctor use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5k tokens, read only when the agent opens those files.

What are the alternatives to Skill Ecosystem Doctor?

Skills that share tags, products or a category with Skill Ecosystem Doctor: Darwin Skill Optimizer (alchaincyf/darwin-skill, 6.2k stars), Skill Creator (zhayujie/CowAgent, 47k stars), Open-Science Skill Creator (aipoch/open-science, 5.5k stars) and Skill Quality Reviewer (Galaxy-Dawn/claude-scholar, 5.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Skill Ecosystem Doctor?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.