Skill Schema v2
Use this skill to design, audit, or repair Agent Skills as reusable capability packages. v2 is based on three current findings:
- A skill is a readable task contract, not a prompt fragment.
- A skill must be routable and reusable, not just useful in its original chat or repo.
- A skill should expose a minimal runtime boundary, not inject every reference into context.
Core Model
Every serious skill has three surfaces:
Routing Surface
name + description + frontmatter
Decides whether the skill is loaded.
Contract Surface
goal + inputs + permissions + evidence + output + verification + handoff
Decides what correct behavior means.
Runtime Boundary Surface
docs + examples + scripts + operators + fallback paths
Decides what gets loaded or executed after selection.
These surfaces must not contradict each other. If the description routes one task, the contract must govern that task, and runtime resources must support that task.
Hard Rules
- Description is routing metadata. It must start with
Load when... or an equivalent trigger phrase, describe when to load the skill, and stay short enough for startup routing.
- SKILL.md is not a knowledge warehouse. Keep it as the routing and contract surface. Put detailed references, examples, templates, long rules, and papers in
docs/, examples/, templates/, or scripts/.
- Use contract fields only when they reduce ambiguity. Do not add enterprise fields as ceremony. Add goal, inputs, permissions, evidence, output, verification, or handoff only when they affect behavior.
- Runtime resources load progressively. A skill should reveal a compact handle first, then load detailed docs or run scripts only when needed.
- Safety belongs in both language and enforcement. The skill can state permissions, human gates, and evidence policy; tools, adapters, guardrails, tests, or humans must still enforce high-risk actions.
- No persona hijack unless persona is the product. Avoid “you are...” identity rewrites, instruction overrides, hidden authority claims, and scope drift.
- No hidden local coupling. Avoid hardcoded credentials, local-only paths, stale install instructions, repo-specific assumptions, or unportable scripts unless clearly marked.
- Every repair needs verification. A repaired skill must be re-audited against routing, contract, runtime boundary, safety, portability, and self-consistency.
Minimal Contract
For low-risk skills, use the compact contract:
Goal: what the skill helps finish.
Load when: exact trigger conditions.
Inputs: required and optional user/context inputs.
Workflow: only the steps that change behavior.
Output: expected final artifact or response.
Verification: how to know the skill worked.
Boundaries: what the skill must not do.
Runtime resources: which docs/examples/scripts to load only when needed.
Full Contract
Use the full contract for enterprise, tool-calling, high-risk, multi-agent, publication, finance, legal, privacy, deployment, or external-send skills:
Goal
Audience
Inputs
Context sources
Workflow
Permissions
Human gates
Constraints
Evidence policy
Output contract
Quality bar
Verification
Handoff / pause rules
Runtime boundary
Fallback path
Do not use the full template for one-off, low-risk, no-tool skills. That creates body bloat.
Audit Rubric
Score out of 100:
| Area |
Points |
Checks |
| Routing |
15 |
name, description, trigger clarity, no body-only routing |
| Contract |
20 |
goal, inputs, output, verification, boundaries |
| Runtime Boundary |
15 |
progressive docs/examples/scripts, minimal context, fallback |
| Reusability |
15 |
portable paths, organized resources, no stale boilerplate |
| Safety |
15 |
permissions, human gates, prohibited content, persona/scope |
| Signal Density |
10 |
no model-known filler, no process theater |
| Versioning |
5 |
SemVer, last_updated, changelog or release note |
| Self-Consistency |
5 |
no conflicts across description/body/docs/scripts |
Critical failures cap the score at 60:
- missing or non-functional description
- hardcoded secrets
- destructive actions without approval boundary
- persona override unrelated to task
- SKILL.md so large that routing/contract content is buried
- output contract contradicts workflow or runtime resources
Repair Protocol
Use risk-based repair:
Low risk: frontmatter normalization, file moves, version sync, broken links
-> repair directly, then report.
Medium risk: description rewrite, contract-field rewrite, runtime boundary rewrite
-> show before/after and rationale.
High risk: deleting content, changing safety gates, changing permissions, changing external-send behavior
-> list exact changes and require confirmation.
After repair, run a second audit and report:
Before score:
After score:
Changed:
Remaining risks:
Verification evidence:
Output Format
When auditing a skill, respond with:
## Audit: <skill-name>
Score: <n>/100
Findings
- [FAIL/WARN/PASS] <area>: <concrete issue>
Required repairs
- <highest impact first>
Self-consistency check
- Routing vs contract:
- Contract vs runtime resources:
- Safety language vs enforcement:
Suggested next version
- version:
- changed files:
- verification:
Runtime Docs
Load only what is needed:
docs/v2-design-spec.md for full design rationale and paper synthesis.
docs/audit-rubric.md for detailed scoring checks.
docs/repair-playbook.md for repair patterns.
examples/v2-audit-report.md for report shape.
1---2name: skill-schema-v2-23description: Load when creating, auditing, refactoring, or repairing an Agent Skill for reuse, governance, and runtime efficiency.4---56# Skill Schema v278Use this skill to design, audit, or repair Agent Skills as reusable capability packages. v2 is based on three current findings:910- A skill is a **readable task contract**, not a prompt fragment.11- A skill must be **routable and reusable**, not just useful in its original chat or repo.12- A skill should expose a **minimal runtime boundary**, not inject every reference into context.1314## Core Model1516Every serious skill has three surfaces:1718```text19Routing Surface20 name + description + frontmatter21 Decides whether the skill is loaded.2223Contract Surface24 goal + inputs + permissions + evidence + output + verification + handoff25 Decides what correct behavior means.2627Runtime Boundary Surface28 docs + examples + scripts + operators + fallback paths29 Decides what gets loaded or executed after selection.30```3132These surfaces must not contradict each other. If the description routes one task, the contract must govern that task, and runtime resources must support that task.3334## Hard Rules35361. **Description is routing metadata.** It must start with `Load when...` or an equivalent trigger phrase, describe when to load the skill, and stay short enough for startup routing.372. **SKILL.md is not a knowledge warehouse.** Keep it as the routing and contract surface. Put detailed references, examples, templates, long rules, and papers in `docs/`, `examples/`, `templates/`, or `scripts/`.383. **Use contract fields only when they reduce ambiguity.** Do not add enterprise fields as ceremony. Add goal, inputs, permissions, evidence, output, verification, or handoff only when they affect behavior.394. **Runtime resources load progressively.** A skill should reveal a compact handle first, then load detailed docs or run scripts only when needed.405. **Safety belongs in both language and enforcement.** The skill can state permissions, human gates, and evidence policy; tools, adapters, guardrails, tests, or humans must still enforce high-risk actions.416. **No persona hijack unless persona is the product.** Avoid “you are...” identity rewrites, instruction overrides, hidden authority claims, and scope drift.427. **No hidden local coupling.** Avoid hardcoded credentials, local-only paths, stale install instructions, repo-specific assumptions, or unportable scripts unless clearly marked.438. **Every repair needs verification.** A repaired skill must be re-audited against routing, contract, runtime boundary, safety, portability, and self-consistency.4445## Minimal Contract4647For low-risk skills, use the compact contract:4849```text50Goal: what the skill helps finish.51Load when: exact trigger conditions.52Inputs: required and optional user/context inputs.53Workflow: only the steps that change behavior.54Output: expected final artifact or response.55Verification: how to know the skill worked.56Boundaries: what the skill must not do.57Runtime resources: which docs/examples/scripts to load only when needed.58```5960## Full Contract6162Use the full contract for enterprise, tool-calling, high-risk, multi-agent, publication, finance, legal, privacy, deployment, or external-send skills:6364```text65Goal66Audience67Inputs68Context sources69Workflow70Permissions71Human gates72Constraints73Evidence policy74Output contract75Quality bar76Verification77Handoff / pause rules78Runtime boundary79Fallback path80```8182Do not use the full template for one-off, low-risk, no-tool skills. That creates body bloat.8384## Audit Rubric8586Score out of 100:8788| Area | Points | Checks |89|---|---:|---|90| Routing | 15 | name, description, trigger clarity, no body-only routing |91| Contract | 20 | goal, inputs, output, verification, boundaries |92| Runtime Boundary | 15 | progressive docs/examples/scripts, minimal context, fallback |93| Reusability | 15 | portable paths, organized resources, no stale boilerplate |94| Safety | 15 | permissions, human gates, prohibited content, persona/scope |95| Signal Density | 10 | no model-known filler, no process theater |96| Versioning | 5 | SemVer, last_updated, changelog or release note |97| Self-Consistency | 5 | no conflicts across description/body/docs/scripts |9899Critical failures cap the score at 60:100101- missing or non-functional description102- hardcoded secrets103- destructive actions without approval boundary104- persona override unrelated to task105- SKILL.md so large that routing/contract content is buried106- output contract contradicts workflow or runtime resources107108## Repair Protocol109110Use risk-based repair:111112```text113Low risk: frontmatter normalization, file moves, version sync, broken links114 -> repair directly, then report.115116Medium risk: description rewrite, contract-field rewrite, runtime boundary rewrite117 -> show before/after and rationale.118119High risk: deleting content, changing safety gates, changing permissions, changing external-send behavior120 -> list exact changes and require confirmation.121```122123After repair, run a second audit and report:124125```text126Before score:127After score:128Changed:129Remaining risks:130Verification evidence:131```132133## Output Format134135When auditing a skill, respond with:136137```text138## Audit: <skill-name>139140Score: <n>/100141142Findings143- [FAIL/WARN/PASS] <area>: <concrete issue>144145Required repairs146- <highest impact first>147148Self-consistency check149- Routing vs contract:150- Contract vs runtime resources:151- Safety language vs enforcement:152153Suggested next version154- version:155- changed files:156- verification:157```158159## Runtime Docs160161Load only what is needed:162163- `docs/v2-design-spec.md` for full design rationale and paper synthesis.164- `docs/audit-rubric.md` for detailed scoring checks.165- `docs/repair-playbook.md` for repair patterns.166- `examples/v2-audit-report.md` for report shape.