@xiaoshiyilangzhao1996-droid/skill-schema-v2
ALoad when creating, auditing, refactoring, or repairing an Agent Skill for reuse, governance, and runtime efficiency.
Install
agr install @xiaoshiyilangzhao1996-droid/skill-schema-v2 --target claudeWrites 4 files into .claude/skills/, pinned to git-a1cb6a84.
- .claude/skills/skill-schema-v2/GUIDE.md
- .claude/skills/skill-schema-v2/LICENSE
- .claude/skills/skill-schema-v2/README.md
- .claude/skills/skill-schema-v2/SKILL.md
Document
name: skill-schema-v2 description: "Load when creating, auditing, refactoring, or repairing an Agent Skill for reuse, governance, and runtime efficiency." version: "2.0.0" last_updated: "2026-06-02" depends: [] metadata: author: "yinyo" category: "skill-engineering" package: "skill-schema-v2.skill"
Skill Schema V2
This is the compatibility entrypoint for the v2 skill schema. The installable v2 package is in skill-schema-v2.skill/.
Use it when a user is designing, auditing, refactoring, or repairing an Agent Skill.
Core Rule
A skill has three surfaces:
Routing Surface: name + description + frontmatter
Contract Surface: goal + inputs + permissions + evidence + output + verification + handoff
Runtime Boundary Surface: docs + examples + scripts + operators + fallback paths
The three surfaces must be aligned. If the description routes one task, the contract must govern that task, and runtime resources must support that task without forcing irrelevant context into the model.
What Changed in v2
v2 adds three 2026 findings:
- Contractual Skills: skills should be readable task contracts with explicit boundaries and acceptance criteria.
- 138K SKILL.md reusability study: routing defects, body bloat, poor resources, safety issues, portability gaps, and persona/scope conflicts are measurable defects.
- SkillSmith: raw skill injection wastes context; skills should expose minimal runtime boundaries and load detail progressively.
Audit Output
When auditing, score out of 100:
| Area | Points |
|---|---|
| Routing | 15 |
| Contract | 20 |
| Runtime Boundary | 15 |
| Reusability | 15 |
| Safety | 15 |
| Signal Density | 10 |
| Versioning | 5 |
| Self-Consistency | 5 |
Runtime Resources
Load only as needed:
skill-schema-v2.skill/SKILL.mdfor the complete v2 contract.skill-schema-v2.skill/docs/v2-design-spec.mdfor design rationale.skill-schema-v2.skill/docs/audit-rubric.mdfor scoring details.skill-schema-v2.skill/docs/repair-playbook.mdfor repair patterns.docs/paper-digests.mdfor paper evidence.
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-a1cb6a848e952026-07-31