majiayu000/spellbook / skills/skill-ecosystem-doctor
skill-ecosystem-doctor
VerifiedAudit 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.8 KB |
| agents/openai.yaml | config | 354 B |
| assets/remediation-log-template.md | markdown | 1.1 KB |
| assets/skill-governance.example.json | config | 1.2 KB |
| evals/evals.json | config | 5.1 KB |
| references/governance-schema.md | markdown | 9.4 KB |
| references/lifecycle-drift.md | markdown | 2.1 KB |
| references/remediation-playbook.md | markdown | 3.7 KB |
| references/runtime-contracts.md | markdown | 4.3 KB |
| requirements.txt | manifest | 7 B |
| scripts/ecosystem_checks.py | script | 14.1 KB |
| scripts/ecosystem_doctor.pyexecutable | script | 2.1 KB |
| scripts/ecosystem_exposure.py | script | 7.3 KB |
| scripts/ecosystem_governance.py | script | 11.9 KB |
| scripts/ecosystem_legacy.py | script | 11.8 KB |
| scripts/ecosystem_model.py | script | 8.6 KB |
| scripts/ecosystem_plugins.py | script | 2.6 KB |
| scripts/ecosystem_reconcile.py | script | 34.7 KB |
| scripts/ecosystem_runtimes.py | script | 4.6 KB |
| scripts/ecosystem_scans.py | script | 25.3 KB |
| scripts/ecosystem_split.py | script | 8.5 KB |
scripts/ecosystem_plugins.py
View on GitHub"""Plan exact, reversible Codex plugin enablement changes."""
from __future__ import annotations
import re
from pathlib import Path
PLUGIN_ID_RE = re.compile(r"^[A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+$")
SECTION_RE = re.compile(r'^\[plugins\."([A-Za-z0-9_.-]+@[A-Za-z0-9_.-]+)"\]\s*$')
ENABLED_RE = re.compile(r"^(\s*enabled\s*=\s*)(true|false)(\s*(?:#.*)?)$")
class PluginPolicyError(ValueError):
"""Raised when plugin state cannot be changed without rewriting TOML."""
def plan_plugin_states(config_path: Path, policy: dict) -> tuple[tuple[tuple[str, bool, bool], ...], str | None]:
configured = policy.get("plugin_states", {})
if not isinstance(configured, dict):
raise PluginPolicyError("plugin_states must be an object")
for plugin_id, enabled in configured.items():
if not isinstance(plugin_id, str) or not PLUGIN_ID_RE.fullmatch(plugin_id):
raise PluginPolicyError(f"invalid plugin id: {plugin_id!r}")
if not isinstance(enabled, bool):
raise PluginPolicyError(f"plugin state must be boolean: {plugin_id}")
if not configured:
return (), None
original = config_path.read_text(encoding="utf-8")
lines = original.splitlines()
found: dict[str, tuple[int, bool, re.Match[str]]] = {}
current_section: str | None = None
for index, line in enumerate(lines):
section = SECTION_RE.fullmatch(line)
if section:
current_section = section.group(1)
continue
if line.startswith("["):
current_section = None
continue
enabled_match = ENABLED_RE.fullmatch(line)
if current_section in configured and enabled_match:
if current_section in found:
raise PluginPolicyError(f"duplicate enabled setting: {current_section}")
found[current_section] = (
index,
enabled_match.group(2) == "true",
enabled_match,
)
missing = set(configured) - set(found)
if missing:
raise PluginPolicyError(f"configured plugin section is missing: {sorted(missing)}")
changes: list[tuple[str, bool, bool]] = []
for plugin_id, desired in sorted(configured.items()):
index, current, match = found[plugin_id]
if current == desired:
continue
lines[index] = f"{match.group(1)}{'true' if desired else 'false'}{match.group(3)}"
changes.append((plugin_id, current, desired))
if not changes:
return (), None
updated = "\n".join(lines) + ("\n" if original.endswith("\n") else "")
return tuple(changes), updated
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |