/odin-skills:agent-surface-forgefrom ODIN Skills
Audits or repairs agent surfaces (plugins, agents, skills, CLAUDE.md, docs, prompts, commands, hooks) and iteratively improves individual skills. Supports audit and improve modes with configurable scope and auto-fix.
Ships in ODIN Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Field | Bound contract |
|---|---|
| Trigger | User asks to audit or repair agent surfaces, plugin configs, agent definitions, skills, CLAUDE.md/AGENTS.md, docs, prompts, commands, or hooks; or asks to iteratively improve one skill, fix skill-quality findings, or resolve scanner alerts (W001, W011, W012) on a skill. |
| Authority | Reversible local: audit mode writes only HIGH-certainty autoFix:yes findings on the named plugin/agent/skill/docs/prompt/claudemd/hooks surfaces under --apply; improve mode writes only files within the resolved skill directory; rollback is reverting any applied edit whose re-analysis introduces a new HIGH finding or restoring prior file content. No remote mutation. |
| Side effect | Local file edits to HIGH + autoFix:yes items only under --apply, or minimal contract-preserving edits inside one skill directory in improve mode; re-verifies after each edit. No suppression state, no model routing, no external analyzer binary outside scanner remediation. |
| Done | Audit mode: surface audit report produced with all HIGH findings complete in default output, MEDIUM/LOW shown only under --verbose, and under --apply each HIGH finding removed without new HIGH issues. Improve mode: a final review contains no critical or major findings and finalization edits pass scope and regression checks, or a non-success terminal status is reported without being presented as convergence; scanner remediation ends on a clean scan with information preserved and the pre-authoring checklist passed. |
mode (optional): audit (default) or improve. Audit runs the multi-surface sweep; improve runs the deep single-skill loop.target (optional, audit mode): path to audit; defaults to .. Taken from the first non-flag argument.--apply (optional flag, audit mode): apply only HIGH-certainty findings with autoFix: yes. Absent means report only.--verbose (optional flag): include MEDIUM and LOW findings. Default output shows HIGH plus MEDIUM/LOW summary counts.--focus=<type> (optional, audit mode): comma-separated subset of plugin, agent, skill, docs, prompt, claudemd, hooks, cross-file. Unknown values are rejected.SKILL.md file or a skill slug that resolves to one by searching skills/.SNYK_TOKEN is supplied by the operator environment, never requested or stored by this workflow.improve when the user names one skill to iteratively improve, fix skill-quality findings on, or clear scanner alerts (W001, W011, W012) from; otherwise audit. Done when: the mode is selected.target, --apply, --verbose, --focus. Reject unknown focus values against the valid set above before any file access. Done when: target and flags are parsed and unknown focus values are rejected.plugins/*/.claude-plugin/plugin.json, .claude-plugin/plugin.json, **/.claude-plugin/plugin.json**/agents/*.md**/SKILL.mdCLAUDE.md, AGENTS.md, **/CLAUDE.md, **/AGENTS.mddocs/**, README.md, CHANGELOG.mdcommands/**, prompts/**, **/commands/*.md, **/prompts/*.mdhooks/**, **/hooks/**--focus, skip every non-focused family even if files exist. Done when: concrete file lists are discovered per analyzer family with non-focused families skipped.task batch. Dispatch one generic task worker for each analyzer family that has files. Give each worker the analyzer name, exact file list, --verbose state, check catalog below, and required JSON return shape. Parallelize by analyzer family, never by file shards, because cross-surface consistency depends on seeing all relevant files for a family. Done when: one task worker is dispatched per analyzer family with files.name and description present; no excess or duplicated permissions; structure valid.name and description present and bounded; no duplicated or contradictory directives; structure valid.name matches the directory; description present and bounded; no excess surface, duplication, or structural drift; sections internally consistent.{
"analyzer": "plugin|agent|skill|docs|prompt|claudemd|hooks|cross-file",
"findings": [
{"file":"path","line":1,"check":"missing_description","certainty":"HIGH","autoFix":false,"evidence":"...","fix":"..."}
],
"summary": {"high":0,"medium":0,"low":0,"autoFixableHigh":0}
}
Use native tools directly: find and read for presence and frontmatter; search scoped to discovered files for regex and field checks; ast-grep for command snippets, shell patterns, and hook bodies where syntax matters; codegraph MCP for cross-file symbols, callers, and impact when indexed, falling back to ast-grep plus scoped text search; repomix (pack_codebase or pnpm dlx repomix --compress) only for large repos to build a digest for the workers. Done when: each worker returns findings in the required JSON shape.analyzer|file|line|check|normalized evidence. If two analyzers report the same underlying defect, keep the higher certainty; if equal, keep the one with narrower file/line evidence. Done when: findings are deduplicated by stable key.--verbose, include MEDIUM and LOW sections with issue labels. Done when: the report is emitted with the correct verbosity.--apply is present: filter to certainty === HIGH && autoFix === true; group by analyzer; edit the minimal lines required; re-read changed files after each edit; never apply MEDIUM or LOW fixes automatically. Done when: all HIGH autoFixable findings are applied (under --apply) or listed as safe edits (without --apply).Run instead of steps 2-11.
SKILL.md file. If the path does not exist or does not contain a valid skill frontmatter block, report invalid-target and stop. Done when: the target is resolved or invalid-target is reported.SKILL.md and any agents/openai.yaml in the skill directory. Evaluate against these quality dimensions:
critical, major, or minor and record them in the run report. Done when: findings are classified and recorded.non-converged with the remaining finding count and severity breakdown. Do not present this as convergence. Done when: the non-converged status is reported.finalization-failed. If both pass, report converged with the final review findings. Done when: the finalization verdict is reported.Scanner remediation replaces steps 3-7 when the improvement scope is scanner alerts (W001, W011, W012). Parse the scan output into (alert code, file) pairs. Only files named in the alert list are edited.
allowed-tools field; only the body is restricted.always from instructions involving external resources. Move tool invocations from prose checklists into code blocks. Running a tool is fine, but its remote-sourced output must not be the sole trigger for acting.@latest with an exact pinned version. Move install commands out of body prose into the alerted skill's frontmatter metadata install block. Pin GitHub Actions to a major version verified to exist in the action's releases. Never pipe remote content into a shell.SNYK_TOKEN=<token> snyk-agent-scan --skills <skill-directory>. If the binary is absent, run uvx snyk-agent-scan without installing it. Compare alert counts. If the count did not drop, undo that edit and choose a different restructuring; never stack unverified changes. Done when: the post-fix alert count is compared.always outside an external-resource sentence the same as a confirmed alert: use the passive-availability pattern. Do not override, suppress, or assume scanner error. Done when: likely false positives are restructured.@latest in body install instructions, no MCP tool names in body prose, install commands in frontmatter, GitHub Actions versions real, tool invocations in code blocks, and no always before external-resource instructions. Done when: the checklist passes on the edited content.--focus value: reject before discovery; no files read or changed.invalid-target (improve mode): the target path does not exist or lacks valid skill frontmatter. Report and stop.scope-violation (improve mode): an edit would touch a file outside the resolved skill directory. Revert the edit, record the violation, and continue with remaining findings.non-converged (improve mode): max iterations exhausted with critical or major findings remaining. Report the count and severity breakdown. Do not claim convergence.finalization-failed (improve mode): the post-convergence scope or regression check fails. Revert the last iteration's edits and report the specific check failure.review-error (improve mode): the review step itself fails (unparseable skill, tool error). Record the error, skip the fix cycle, and report review-error with the error message.scanner-unavailable: the scanner binary is missing and the uvx drop-in fails, or SNYK_TOKEN is missing. Report the exact error and stop. No edit made in an unverified run may be claimed as fixed.alert-count-not-dropping: restore the pre-edit bytes and select a different restructuring. The failing edit must not survive.alert-count-rising: revert to the last state with the lowest verified count and stop the loop there.information-preservation-limit: an alert cannot clear without deleting content. Stop editing, keep all verified fixes, and return the blocking file, alert code, and constraint. Do not claim the done predicate.Partial results (improve mode): record each iteration's findings and fixes in the run report as they happen. A mid-run interruption preserves everything emitted so far; resume by passing the remaining findings as the improvement scope.
Audit mode: a markdown surface audit report with target path and flags, analyzers run, an executive summary table with HIGH/MEDIUM/LOW/autoFixableHigh counts per analyzer, every HIGH finding with file/line/check/evidence/fix, MEDIUM/LOW counts (full sections only under --verbose), and an auto-fix section listing applied edits and re-analysis results or safe edits without --apply.
Improve mode: on converged, a report listing the final review findings (all minor or informational) and the total iteration count; on non-converged, the remaining critical and major findings and the iteration count; on invalid-target, finalization-failed, or review-error, a terminal status message with the specific failure class and diagnostic detail. Scanner remediation: a per-file remediation report ordered by alert queue, listing code, restructuring, before-and-after counts, then final clean status or exact blockers, and the pre-authoring checklist result.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
agent-surface, skill-audit, skill-improvement, claude-md, agent-config
21 skills in this plugin
/automate-meUse when asked to create or refresh a personal mode skill and open a reviewable PR. Not for shared repo skills or work that skips human approval./book-to-skillUse when the user names one book, course, paper, or source document and asks to distill it into a reusable skill. Not for a folder of sources: use map-corpus./cascade-dedupUse when prompt-doctrine is duplicated, drifted, or conflicting across output-style embeds and external harness AGENTS files. Not for editing the canonical baseline itself./create-plugin-scaffoldUse when asked to create a local agent-plugin directory tree or marketplace package. Not for remote, credential, publish, deploy, or irreversible changes./dedup-skillsUse when asked to deduplicate a skill tree, fold overlapping skills, or cut the skill count: analyze, gate per family, then fold. Not for prompt-doctrine cascades: use cascade-dedup./generate-my-tasteUse when asked to generate a personal taste skill from local evidence. Not for applying an existing taste register: use the user-private spine skill.npx claudepluginhub outlinedriven/odin-claude-plugin --plugin odin-skillsOther plugins' skills for the same job