npx skills add ...
npx skills add boshu2/agentops --skill heal-skill
Repair skill hygiene and deep-audit SKILL.md quality (absorbed skill-auditor). Triggers: "heal-skill", "heal skill", "repair skill hygiene", "skill-auditor", "audit skill", "skill audit".
npx skills add boshu2/agentops --skill heal-skill
Purpose: Detect and auto-fix common skill hygiene issues across the skills/ directory.
YOU MUST EXECUTE THIS WORKFLOW. Do not just describe it.
skills/ or skills-codex/ before processing; reject traversal, missing/outside paths, and every symlink spelling because aliases make mutation ownership ambiguous.--check and deep audit read-only before any repair, because their exact finding codes and target path define the permitted mutation.--fix only for the documented auto-fixable structural codes, then rerun strict validation; never hand-edit generated Codex artifacts because parity projections have owned regeneration paths.Auto-fix allowlist and principal diagnostics:
| Code | Issue | Auto-fixable? |
|---|---|---|
MISSING_NAME | No name: field in SKILL.md frontmatter | Yes -- adds name from directory |
MISSING_DESC | No description: field in SKILL.md frontmatter | Yes -- adds placeholder |
NAME_MISMATCH | Frontmatter name differs from directory name | Yes -- updates to match directory |
UNLINKED_REF | File in references/ not linked in SKILL.md | Yes -- converts bare backtick refs to markdown links |
EMPTY_DIR | Skill directory exists but has no SKILL.md | Yes -- removes empty directory |
MISSING_API_VERSION | Selected source skill has no skill_api_version | Yes -- inserts version 1 in selected target(s) only |
DEAD_REF | SKILL.md references a non-existent references/ file | No -- warn only |
SCRIPT_REF_MISSING | SKILL.md references a scripts/ file that does not exist | No -- warn only |
INVALID_AO_CMD | SKILL.md references an ao subcommand that does not exist (only runs if ao is on PATH) | No -- warn only |
DEAD_XREF | SKILL.md references a /skill-name that has no matching skill directory | No -- warn only |
CATALOG_MISSINGwas removed: it only ran whenskills/using-agentops/SKILL.mdexisted, and that skill is gone. Catalog completeness is gated byMISSING_DISPOSITIONagainstdocs/contracts/skill-dispositions.yaml.
Checkpoint: before accepting any mutation, confirm the target path and finding code are present in the read-only report and the code is documented as auto-fixable.
When the problem is not source-skill hygiene but skills-codex/ drift, run the Codex parity audit first:
Use this when a checked-in Codex skill still contains Claude-era primitives (TaskCreate, TaskList, Tool: Task), Claude backend references, or obviously broken runtime rewrites.
Repair rule: keep canonical shared behavior in skills/<name>/SKILL.md. Update skills-codex/<name>/SKILL.md when the shipped Codex artifact is wrong, and keep durable Codex-only tailoring in skills-codex-overrides/<name>/SKILL.md.
After repair:
Checkpoint: after a Codex repair, require parity, override coverage, and generated-artifact validation to exit zero before reporting the runtime bundle healthy.
--check mode with findings (report-only).--strict or --fix flag. In --fix mode, fixable issues were repaired; re-run --check to confirm.Show the output. If --fix was used, summarize what changed. If DEAD_REF findings remain, advise the user to remove or update the broken references manually.
Artifact directory: stdout for human findings; .agents/audits/ for JSON reports.
Filename convention: <skill>-audit.json.
Serialization/schema format: JSON matching schemas/audit-report.json.
Validator command: jq -e . .agents/audits/<skill>-audit.json.
Downstream handoff: consumed by the validation wave before repair.
One line per finding:
Requests for /skill-auditor route here: the audit is the detect phase of heal, and it
lives at scripts/audit.sh. Unlike --fix, the audit is read-only — it reports;
repairs go through heal.sh --fix (Pass-1 issues) or hand edits (Pass-2 issues).
Two passes, then an aggregate verdict:
heal.sh --check --strict <target> and gates
on its exit code; it never reimplements the hygiene checks (heal is the source of truth).
A strict failure forces the aggregate verdict to FAIL but does NOT short-circuit Pass 2.audit.sh (triggers, frontloaded
constraints, rationale, checkpoints, output spec, quality rubric, references
modularization, trigger clarity). Definitions and accepted forms:
references/audit-checks.md [blocked].fail → FAIL; otherwise any warn → WARN;
otherwise PASS. Max-severity wins — no silent downgrade. Exit 0 on PASS/WARN
(1 on WARN under --strict), 1 on FAIL, 2 on usage error.scripts/score_agentops_skill.py --audit-block
folds a deterministic 10-category score (band C/B/A/S) into the report under rubric.
It never changes the PASS/WARN/FAIL verdict — it is a productization backlog signal,
not a ship blocker. The density block
(references/context-density-checks.md [blocked]) is
advisory too.description-has-triggers accepts only the forms
declared by the authoritative repo-runtime profile
(finding f-2026-05-06-auditor-checks-must-fit-host-conventions — audit checks must fit
the host's existing valid conventions).Report JSON conforms to schemas/audit-report.json [blocked];
skill-builder owns the canonical SKILL.md template.
Executable spec: references/skill-auditor.feature [blocked].
--fix twice produces the same result.--fix skills/foo may change foo only; source siblings remain byte-identical.DEAD_REF, SCRIPT_REF_MISSING, INVALID_AO_CMD, and DEAD_XREF are warn-only because the correct resolution requires human judgment.INVALID_AO_CMD only runs if the ao CLI is available on PATH. Skipped silently otherwise.skills/.--strict for CI gates: exits 1 on any finding. Without --strict, check mode exits 0 even with findings.User says: /heal-skill
What happens:
skills/, checking each for the nine issue types (missing name, missing description, name mismatch, unlinked references, empty directories, dead references, script reference integrity, CLI command validation, cross-reference validation).[NAME_MISMATCH] skills/foo: Frontmatter name 'bar' != directory 'foo').--strict or --fix flags.Result: A diagnostic report showing all skill hygiene issues across the repository, with no files modified.
User says: /heal-skill --fix skills/validate
What happens:
skills/validate/, running all per-skill checks against that skill.MISSING_NAME, UNLINKED_REF), the script applies the repair automatically -- adding the name from the directory, converting bare backtick references to markdown links, etc.DEAD_REF findings are reported as warnings since they require human judgment to resolve.Result: The skills/validate/SKILL.md is repaired in place, with a summary of changes applied and any remaining warnings.
| Problem | Cause | Solution |
|---|---|---|
DEAD_REF findings persist after --fix | Dead references are warn-only because the correct fix (delete, create, or update) requires human judgment | Manually inspect each dead reference and either create the missing file, remove the link from SKILL.md, or update the path |
Script reports EMPTY_DIR for a skill in progress | The skill directory was created but SKILL.md has not been written yet | Either add a SKILL.md to the directory or remove the empty directory. Running --fix will remove it automatically |
NAME_MISMATCH fix changed the wrong name | The script always updates the frontmatter name to match the directory name, not the other way around | If the directory name is wrong, rename the directory first, then re-run --fix |
| Script exits 0 but a skill still has issues | The issue type is not one of the checks the heal script detects | heal.sh covers structural hygiene only. Run the deep audit (scripts/audit.sh) for content-discipline checks; deeper quality issues require manual review or /council validation |
Running --fix twice produces different output | This should not happen -- the script is idempotent | File a bug. Check if another process modified the skill files between runs |
skills-codex/ keeps regressing after sync | Mechanical conversion is preserving the wrong semantics | Run bash scripts/audit-codex-parity.sh, then move the durable Codex body rewrite into skills-codex-overrides/<name>/SKILL.md instead of patching generated output |
skill-conformance-profiles.yaml — authoritative rules, severities, and boundary
references/skill-stocktake.md [blocked]
references/codex-parity.md [blocked]
references/heal-skill.feature [blocked] — Executable spec: detect hygiene issues, flag Codex-parity drift, auto-fix + report, --strict fails on remaining findings (soc-qk4b)
references/audit-checks.md [blocked] — deep-audit Pass-2 check definitions + accepted forms + PRODUCT.md mapping
references/context-density-checks.md [blocked] — advisory density coverage logic and false-positive handling
references/skill-auditor.feature [blocked] — Executable spec for the absorbed deep audit mode: Pass 1 heal delegation, Pass 2 content checks, density report + productization score (soc-qk4b)