plugins/build/skills/check-skill-pair/SKILL.md
Audits pair-level integrity of a primitive-pair (the artifact `/build:build-skill-pair` produces) by walking the four required artifact slots — principles doc, `build-<primitive>/SKILL.md`, `check-<primitive>/SKILL.md`, and the `primitive-routing.md` registration — and reports cross-artifact issues a per-SKILL.md checker cannot see: missing principles doc, divergent principles paths between halves, absent routing registration, missing build→check handoff. Per-half structural compliance with the unified pattern (`check-skill-pattern.md`) is delegated to `plugins/build/_shared/scripts/check_skill_pattern.py`. Use when the user wants to "audit a skill pair", "review a primitive pair", or "validate the skill pair for X". Not for auditing a single SKILL.md — route to `/build:check-skill`. Not for re-distilling a stale principles doc — route to `/build:build-skill-pair`.
npx skillsauth add bcbeidel/wos check-skill-pairInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit a primitive-pair for cross-artifact integrity. Per-SKILL.md
concerns (description quality, frontmatter shape, body length) are
covered by /build:check-skill. Per-half structural pattern
compliance is covered by
plugins/build/_shared/scripts/check_skill_pattern.py. This skill
catches the issues that only surface when you look at the four
required artifacts together.
This skill follows the check-skill
pattern. Tier-1 +
Tier-3 detection is in
scripts/audit_pair.py (10 rule_ids; emits
a JSON array of envelopes via _common.py). Tier-2 has one judgment
dimension at
references/check-brief-content-quality.md
(read inline by the primary agent during evaluation).
<SKILL_ROOT> and <SHARED_REF_DIR> resolve from the chosen target —
see skill-locations.md
for the prefix table.
Also fires when the user phrases the request as:
Parse $ARGUMENTS as the primitive name (kebab-case, no path
prefix). Refuse on empty input — this skill operates on a named
primitive, not a configuration. Confirm scope aloud in one line:
Auditing skill-pair for primitive: <name>.
The four required artifact slots audit_pair.py inspects:
<SHARED_REF_DIR>/<name>-best-practices.md<SKILL_ROOT>/build-<name>/SKILL.md<SKILL_ROOT>/check-<name>/SKILL.md<SHARED_REF_DIR>/primitive-routing.md
(both route lines; required for plugin target, optional otherwise)Plus the optional brief: .briefs/<name>.brief.md (warn-level;
content quality judged in Tier-2).
Pick the placement scope before invoking the script. If $ARGUMENTS
includes --target <plugin|project|user>, use it. Otherwise apply
the inference rule from
skill-locations.md:
walk up CWD for a plugin source tree, then for a project .claude/
directory, falling back to user. Surface the inferred target in
one line and confirm before invoking the script.
Execute the deterministic audit, passing the resolved target:
python3 plugins/build/skills/check-skill-pair/scripts/audit_pair.py \
--target <plugin|project|user> <name>
The script emits a JSON array of 10 envelopes to stdout. Each envelope:
{
"rule_id": "<rule>",
"overall_status": "pass" | "warn" | "fail" | "inapplicable",
"findings": [
{
"status": "warn" | "fail",
"location": {"line": int, "context": str} | null,
"reasoning": "<≤2 sentences>",
"recommended_changes": "<canonical repair recipe>"
}
]
}
recommended_changes is canonical — copy it through to the report;
do not paraphrase.
Rule set (10 rules):
| Tier | rule_id | Severity |
|---|---|---|
| 1 | principles-doc-presence | fail |
| 1 | build-skill-presence | fail |
| 1 | check-skill-presence | fail |
| 1 | check-rule-files-presence | fail |
| 1 | routing-registration-presence | fail (plugin target) / warn (project, user) |
| 1 | brief-presence | warn |
| 2 | principles-doc-structure | warn |
| 3 | shared-principles-path | fail |
| 3 | check-half-references-principles-doc | warn |
| 3 | build-to-check-handoff | warn |
Exit codes: 0 if no envelope is fail; 1 if any envelope is
fail; 64 on argument error.
No-pair-found behavior. When principles_doc + both SKILLs are
all missing, the 3 presence rules emit fail envelopes; the other
7 envelopes emit overall_status: inapplicable (the audit cannot
read what doesn't exist). Surface this case explicitly: "No pair
found for <name> — recommend /build:build-skill-pair <name>".
There is nothing else to audit.
If brief-presence's envelope is pass (or warn only for sections
missing — the brief itself exists), evaluate it against
references/check-brief-content-quality.md.
Skip this Tier when the brief is absent entirely — Tier-1 already flagged it and there is nothing to read.
check-brief-content-quality.md
first, then evaluate the brief's prose against the unified rubric. A
single locked-rubric pass produces stable scoring.warn, not pass.Merge the Tier-1/3 JSON envelopes and the Tier-2 judgment finding (if any) into a unified findings table:
| Tier | rule_id | Artifact | Status | Reasoning |
|------|---------|----------|--------|-----------|
Sort: fail before warn before inapplicable; within severity,
Tier-1 before Tier-2 before Tier-3. Summary line at top and bottom:
N fail, N warn, N inapplicable across 4 artifact slots. If any
envelope is fail and excludes downstream tiers (the no-pair case),
name the trigger.
For each finding's Recommendation: line, copy the
recommended_changes field through verbatim. Multi-paragraph recipes
condense to the first paragraph in the report; full recipe in the
opt-in repair loop.
Ask exactly once:
"Apply fixes? Enter
y(all),n(skip), or comma-separated numbers."
For each selected finding, route per the recipe in
recommended_changes:
references:), build→check handoff wording. Show the diff; write
on confirmation./build:build-skill-pair <name> to
rebuild from input material; missing brief → ask whether to author
a retroactive brief inline or route to the meta-skill.After each applied fix, re-run audit_pair.py (or re-judge
Tier-2) on the affected scope so subsequent findings reflect the new
state. Terminate the loop when the user selects no further findings,
enters n, or confirms done.
/build:check-skill.check-skill-pattern.md is the canonical pattern doc;
check_skill_pattern.py is the canonical structural auditor. This
skill audits pair-level integrity (cross-half drift, pair
registration, principles-doc presence), not per-half pattern
compliance. If you find yourself wanting to add "is this check
half pattern-compliant" rules here, run check_skill_pattern.py
against each half instead — duplication for compliance is the
wrong tradeoff./build:build-skill-pair re-run, not an audit task.pass envelope.inapplicable — that is the
user's signal that the audit couldn't read what doesn't exist.
Surfacing it is the contract; hiding it silently under-audits.recommended_changes. Each rule's
recipe constant is canonical guidance sourced from
skill-pair-best-practices.md. Copy it through; do not paraphrase
or expand./build:check-skill for per-SKILL.md quality. Route to
plugins/build/_shared/scripts/check_skill_pattern.py for per-half
structural pattern compliance.scripts/audit_pair.py — 10 rule_ids. The SKILL body only adds
the check-brief-content-quality judgment pass (Tier-2) on top.fail; the other 7
envelopes emit inapplicable. Surface this as "No pair found for
<name>" and recommend /build:build-skill-pair <name>. There is
nothing else to audit.git diff / git checkout; the skill
itself performs no destructive actions.Chainable to: /build:check-skill (to audit each half's
per-SKILL.md quality once structural integrity is clean);
/build:build-skill-pair (to rebuild when the principles doc is
missing or structurally incomplete);
plugins/build/_shared/scripts/check_skill_pattern.py (per-half
structural pattern compliance — separate from this skill's pair-level
integrity check).
tools
Use when the user wants to "audit a help skill", "review my plugin index", or "verify my help-skill is up to date". Audits a plugins/<plugin>/skills/help/SKILL.md against the help-skill rubric — coverage, freshness, frontmatter fidelity, plus five judgment dimensions and a trigger-collision check.
tools
Use when the user wants to "scaffold a help skill", "add a /<plugin>:help command", or "build a plugin index skill", or wants to give a plugin an orientation surface that lists its skills and common workflows. Produces a SKILL.md at plugins/<plugin>/skills/help/SKILL.md.
testing
Audit a root-level resolver — verify AGENTS.md pointer, managed-region integrity, filing-table coverage against disk, context-table actionability, and trigger-eval pass rate. Use when the user wants to "audit a resolver", "validate routing table", or "find dark capabilities".
tools
Audits a project's top-level README.md against 28 deterministic checks across seven scripts (secret scanning, H1 uniqueness & position, heading-hierarchy skips, section presence & order, TOC threshold, line count & length, code-block language tags, shell-prompt prefixes, smart quotes in code, relative-link resolution, fragment-anchor resolution, image alt text, badge/image byte size, destructive-command flagging, pipe-to-shell patterns, TLS-disable instructions, non-reserved hostnames/IPs, emoji in headings, LICENSE file presence & link, CONTRIBUTING link, TODO/FIXME/XXX markers, README gitignore status) plus seven judgment dimensions and a Tier-3 cross-README collision check. Use when the user wants to "audit a README", "lint a README", or "run linters on README.md". Not for sub-package READMEs (different rubric) or docs-site pages (different toolchain).