audit-skill: Skill Alignment & Evolution Auditor
Audits an individual skill against the 6 ecosystem evolution invariants and provides automated refactoring recommendations to achieve full compliance.
The 6 Alignment Invariants
- Layer 1 Procedural Core:
SKILL.mdtarget $\le 100$ lines. Offload domain depth toreferences/via Progressive Disclosure. - Boolean Evals Schema:
evals/evals.jsonmust be a root JSON list withshould_trigger: true/false. - Hub-and-Spoke Script Isolation (ADR-002/003): All scripts reside in plugin root
scripts/and are symlinked intoskills/<skill>/scripts/. Zero un-symlinked real files. - Frontmatter Standards:
namematches directory slug exactly;descriptionis third-person active verb and $\le 1024$ chars. - Contract & Fallback Links: Must provide
acceptance-criteria.mdandfallback-tree.mdinreferences/. - Spoke Hygiene: Zero session logs, raw wiki traces, or
.agent/state in skill folders.
Quick Execution
Run the bundled alignment script directly against any skill directory:
# Audit a single skill
python3 plugins/agent-scaffolders/scripts/audit_skill.py plugins/<plugin>/skills/<skill-name>
# Auto-repair fixable schema deviations (e.g. migrate evals.json)
python3 plugins/agent-scaffolders/scripts/audit_skill.py plugins/<plugin>/skills/<skill-name> --fix
# JSON output for automated pipelines
python3 plugins/agent-scaffolders/scripts/audit_skill.py plugins/<plugin>/skills/<skill-name> --json
Alignment & Refactoring Procedure
Phase 1: Diagnostic Assessment
- Run
audit_skill.py <path>. Note all errors and warnings. - If
SKILL.mdexceeds 100 lines:- Identify detailed background, multi-page tables, or complex workflows.
- Extract them into
references/<topic>.md. - Replace in
SKILL.mdwith concise procedural steps and markdown links.
Phase 2: Hub-and-Spoke Remediation (ADR-002/003)
If real scripts are found inside skills/<skill>/scripts/:
- Move the real script to
plugins/<plugin>/scripts/<script-name>.py. - Register the symlink in
symlinks.json. - Run
python3 .agents/skills/symlink-manager/scripts/symlink_manager.py restore. - Run
symlink_manager.py diagnoseto confirm zero imposters.
Phase 3: Contract Verification
- Ensure
evals/evals.jsonhas at least 3 positive and 3 negative test cases usingshould_trigger. - Ensure
references/acceptance-criteria.mdandreferences/fallback-tree.mdare linked. - Re-run
audit_skill.pyto confirm 100% PASS.