Best for
- 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.
majiayu000/spellbook/skills/skill-ecosystem-doctor/SKILL.md
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.
Decision brief
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.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/majiayu000/spellbook --skill "skills/skill-ecosystem-doctor"Inspect the Agent Skill "skill-ecosystem-doctor" from https://github.com/majiayu000/spellbook/blob/9e96aa5f52e8504cbbf9d359def29f9abcde57ce/skills/skill-ecosystem-doctor/SKILL.md at commit 9e96aa5f52e8504cbbf9d359def29f9abcde57ce. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
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, projectio…
If the request mixes modes, run audit before repair. Do not infer repair authorization from a request to inspect or diagnose.
Direct actions: read-only discovery, deterministic audits, report drafts,
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, man…
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.
Permission review
The documentation asks the agent to run terminal commands or scripts.
python3 scripts/ecosystem_doctor.py --governance ./skill-ecosystem-governance.jsonThe documentation asks the agent to run terminal commands or scripts.
python3 scripts/ecosystem_doctor.py --governance ./skill-ecosystem-governance.json --jsonEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 93/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 262 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
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.
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.
| User intent | Mode | Routing |
|---|---|---|
| Inspect, review, inventory, or diagnose | audit | execute_direct; read-only |
| Explain what should change | plan | plan_first; no mutations |
| Fix, unify, quarantine, or retire | repair | plan_first; explicit scope and rollback |
| Recheck an existing governance file | verify | execute_direct; read-only |
| Rotate credentials, rewrite history, push, publish, or change remotes | external action | clarify_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.
AGENTS.md or equivalent before editing a source
repository.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.
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:
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:
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:
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:
SKILL.mdWhen 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.
Order repairs by security, logic, data integrity, source lineage, and naming. Separate facts from decisions:
Read the remediation playbook before planning mutations.
For every proposed action, record:
Use disjoint file ownership for any parallel work. Do not let two agents edit a shared registry, lockfile, manifest, or high-context file.
Safe direct actions are read-only inspection, report generation, local tests,
and drafting a plan. During an authorized repair run:
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.
Run verification from the current session:
ecosystem_doctor.py and require zero errors.ecosystem_reconcile.py without --apply and require no planned changes.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.git diff --check in every changed Git worktree.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.
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.
Frequently asked questions
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.
The source record exposes this install command: npx skills add https://github.com/majiayu000/spellbook --skill "skills/skill-ecosystem-doctor". Inspect the command and pinned source before running it.
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.