Generates evolution contracts for skills, defining what can be updated, what must remain stable, and how to extract knowledge...
This skill adds a structured "Skill Contract" section to any skill's SKILL.md file. The contract declares what parts of the skill are stable (general knowledge) versus mutable (can evolve during projects), and defines rules for updates and knowledge extraction.
Use this skill when:
skill-updaterIdentify which skill needs a contract:
skill-creatorAsk the user:
Default assumption: .claude/skills/<skill-name>/SKILL.md
Read the skill's SKILL.md to understand:
This analysis informs contract generation.
Identify what should remain constant across projects:
Core Workflow Steps:
Domain Knowledge:
Examples:
git-workflow: All Git commands are stableproject-context-generator: The 4-step workflow is stableskill-analyzer: Matching heuristics are stableIdentify what can evolve during projects:
New References:
Improved Explanations:
Additional Scripts:
Examples:
git-workflow: Can add project-specific workflows to references/project-logger: Can add new entry types based on project needsskill-analyzer: Can refine matching criteriaSpecify how updates should happen:
Allowed Operations:
Prohibited Operations:
Review Requirements:
Specify what to look for when extracting knowledge:
Patterns to Extract:
Abstraction Triggers:
Examples:
frontend-design: Extract common component patternsproject-logger: Extract common log entry patternsCreate both a concise contract summary in SKILL.md and a detailed contract file in references/.
A. Create references/contract.md (detailed specification):
# Skill Contract: [skill-name]
> Complete specification of what can evolve and what must remain stable.
## Stable (General Knowledge)
**Core Elements:**
- [List workflow steps, domain knowledge, or essential patterns]
- [What defines this skill's identity]
**Do not modify:**
- [Specific sections or content that must remain unchanged]
## Mutable (Can Evolve)
**Can be updated during projects:**
- [What can be added/refined in SKILL.md]
- [New files that can be added to references/]
- [Scripts that can be added to scripts/]
**Update guidelines:**
- [How to add new content]
- [What format to use]
- [When to update vs. create new skill]
## Update Rules
**Allowed without review:**
- Add new examples to existing sections
- Add reference files documenting project patterns
- Fix typos or clarify confusing wording
**Requires review:**
- Modify core workflow steps
- Change established best practices
- Add new sections to SKILL.md
**Prohibited:**
- Remove existing best practices
- Change fundamental skill purpose
- Break compatibility with existing usage
## Knowledge Extraction
**What to extract after projects:**
- [Patterns that emerged multiple times]
- [Common questions or confusion points]
- [Reusable code or templates]
**When to extract:**
- [Trigger: e.g., "After 3 projects using this skill"]
- [Indicator: e.g., "When same pattern appears in 2+ projects"]
**How to extract:**
- Add generalizable patterns to references/
- Update examples in SKILL.md with real cases
- Create new skills for project-specific domains
B. Add concise summary to SKILL.md (progressive disclosure):
## Skill Contract
**Stable:** [One-line summary of what cannot change]
**Mutable:** [One-line summary of what can evolve]
**Update rules:** [One-line summary or "See references/contract.md"]
> Full contract specification in `references/contract.md`
Example:
## Skill Contract
**Stable:** Core workflow steps, domain knowledge, essential patterns
**Mutable:** References, examples, clarifications, project-specific workflows
**Update rules:** See `references/contract.md` for detailed rules
> Full contract specification in `references/contract.md`
Execute both operations:
A. Create references/contract.md:
references/ directory if it doesn't existreferences/contract.mdB. Insert contract summary into SKILL.md:
Placement:
Insertion process:
Result: Skill now has both:
Present the contract to the user:
Ask:
Update if necessary, then confirm completion.
For skills like git-workflow that provide reference information:
Stable:
Mutable:
For skills like project-context-generator with step-by-step processes:
Stable:
Mutable:
For skills like skill-analyzer that operate on other skills:
Stable:
Mutable:
Good:
Can add new examples to "Best Practices" section
Can add files to references/ documenting project patterns
Cannot modify the 4-step workflow structure
Avoid vague:
Can update as needed
Don't change important parts
New skills: More permissive contracts (still learning what works) Mature skills: Stricter contracts (proven patterns to preserve)
Template for the Skill Contract section with:
See this file for the complete contract template that can be customized for any skill.