Table of Contents generated with DocToc
Capability: substrate:framework-dev
Harness: agnostic
Validate framework skill definitions — YAML frontmatter, internal link integrity, and placeholder conventions.
- Runtime: Python 3.11+ run via
uv; stdlib-only (no third-party runtime dependencies). Thedevgroup pullspytest,ruff,mypy. - CLIs: None beyond the runtime.
gitis used only for the optional trigger-phrase-preservation check and is silently skipped when git or the base ref is unavailable. - Credentials / auth: None.
- Network: Runs fully offline against local skill files.
- YAML frontmatter — Every
SKILL.mdmust have a valid frontmatter block with required keys (name,description,license). - Internal link integrity — Relative markdown links between skill files and docs must point to existing files and anchors.
- Placeholder convention — Skill docs must use
<PROJECT>,<upstream>, and<tracker>instead of hardcoded project names. - Name convention — Every
SKILL.mdname:must equal the name of the directory the file really lives in, symlinks resolved — the Agent Skills specification's rule. For a framework skill that is its family-plugin directory (plugins/magpie-issue/skills/triage/→name: triage), which Claude Code and Codex invoke as/magpie-issue:triage.
- Principle compliance — Heuristic warnings when frontmatter
carries content the LLM router doesn't need:
- Action-inventory in
description(≥ 5 commas in one sentence) - Distinct-from-sibling-skill clauses (
Unlike,Distinct from,Counterpart to,rather than) - Chain-handoff narrative (
Hands off to,ready for X to take over) - Parenthetical rationale (parens containing
typically,implies,because,since,is required first,needs to,requires) - Criteria-source path (
process step N,Step Na,docs/X.md,documented in …)
- Action-inventory in
- Trigger-phrase preservation — Compares quoted phrases in
when_to_useagainst a base ref (defaultorigin/main) and warns when any phrase has been dropped. Silently skipped when git or the base ref is unavailable. Override viaSKILL_VALIDATOR_BASE_REF. - Override contract — Every override file in a scanned tree's
.apache-magpie-overrides/carries the canonical header and does not weaken the safety baseline. A contributor-growth configuration file found there (committer-onboarding-config.md,committer-readiness.md,contributor-identities.md,contributor-nomination-config.md,contributor-sentiment-config.md) is reported as personal configuration that should not be committed: see Why the configuration is personal.
SOFT advisories are surfaced as warnings on stderr without failing the run. The reviewer has the final say on borderline cases.
From the repo root:
uv run --project tools/skill-and-tool-validator --group dev pytestOr install and run as CLI:
uv run --project tools/skill-and-tool-validator --group dev skill-and-tool-validateCLI flags:
--strict— promote SOFT categories to hard failures.--skip-categories principle_compliance,trigger_preservation— skip given violation categories entirely (silent).
- stdlib-only — no external dependencies. The frontmatter parser is a lightweight text heuristic rather than a full YAML loader, because the frontmatter in skills is intentionally simple.
- Complements
check-placeholders.sh— both tools share the same forbidden-pattern and allowlist lists.check-placeholders.shruns as a pre-commit hook; this package runs as pytest in CI.