constitution — Claude Code skill for project rules
This skill examines a codebase and drafts a project constitution grounded in its existing patterns. Use it to establish or revise governance rules with file-and-line evidence.
MIT ★ 587 updated 2026-10-26
/plugin marketplace add rsmdt/the-startup
/plugin install start@the-startupWhat constitution does
The skill checks for CONSTITUTION.md at the project root. If it finds one, it reads the current rules and prepares an update; otherwise, it starts from template.md. You can name focus areas to guide what it investigates.
Specialist agents explore relevant perspectives in parallel. They return candidate rules with file-and-line references, which the skill deduplicates, groups by category, and assigns levels L1, L2, or L3. Every proposed rule needs specific codebase evidence.
You review the proposals before anything is written: approve them, request changes, or cancel. Once approved, the skill creates or merges CONSTITUTION.md, then offers validation through the constitution mode of the validate skill. Your approval gates the file change.
What it helps with
- derive project rules from patterns already present in the code
- revise an existing
CONSTITUTION.mdwith approved findings - attach file-and-line evidence to each proposed rule
- sort governance rules into L1, L2, and L3 levels
Example prompts for the agent
- Run
/constitutionand inspect the project’s security and testing practices. - Update the project constitution using the architecture patterns found in the codebase.
- Draft project rules with file-and-line evidence, then wait for my approval before writing them.
How to install constitution
1Plugin marketplace
/plugin marketplace add rsmdt/the-startup/plugin install start@the-startupThis installs the whole start plugin with all its skills
2Skills CLI (Vercel)
npx skills add rsmdt/the-startup --skill constitution -a claude-code3Manually: put the files in place
~/.claude/skills/constitution/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/constitution/
1Skills CLI (Vercel)
npx skills add rsmdt/the-startup --skill constitution -a codex2Manually: put the files in place
.agents/skills/constitution/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add rsmdt/the-startup --skill constitution -a cursor2Manually: put the files in place
.cursor/skills/constitution/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install rsmdt/the-startup plugins/start/skills/constitution2Manually: put the files in place
.github/skills/constitution/SKILL.md1Skills CLI (Vercel)
npx skills add rsmdt/the-startup --skill constitution -a gemini-cli2Platform CLI
gemini skills install https://github.com/rsmdt/the-startup --path plugins/start/skills/constitutionManually: put the files in place
.devin/skills/constitution/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about constitution
How do I install constitution in Claude Code?
Add the marketplace with /plugin marketplace add rsmdt/the-startup, then install the plugin with /plugin install start@the-startup.
What does the constitution skill do?
It examines project patterns and proposes rules for CONSTITUTION.md, assigning each a level and citing file-and-line evidence. It writes changes only after approval.
Can constitution update an existing project constitution?
Yes. When CONSTITUTION.md exists at the project root, the skill reads its current rules and merges approved additions into it.
Source text
SKILL.md · MIT
---
name: constitution
description: Create or update a project constitution with governance rules. Uses discovery-based approach to generate project-specific rules.
user-invocable: true
argument-hint: "optional focus areas (e.g., 'security and testing', 'architecture patterns for Next.js')"
---
## Persona
Act as a governance orchestrator that coordinates parallel pattern discovery to create project constitutions.
**Focus Areas**: $ARGUMENTS
## Interface
Rule {
level: L1 | L2 | L3 // Must (autofix) | Should (manual) | May (advisory)
category: string // Security, Architecture, CodeQuality, Testing, or custom
statement: string // the rule itself
evidence: string // file:line references supporting the rule
}
State {
focusAreas = $ARGUMENTS
perspectives = [] // from reference/perspectives.md
existing: boolean
discoveries: Rule[]
}
## Constraints
**Always:**
- Delegate all discovery to specialist agents.
- Launch all applicable discovery perspectives simultaneously in a single response.
- Discover actual codebase patterns before proposing rules.
- Present discovered rules for user approval before writing.
- Classify every rule with a level (L1/L2/L3).
- Every proposed rule must cite specific file:line evidence.
## Reference Materials
- reference/perspectives.md — discovery perspectives and focus area mapping
- reference/rule-patterns.md — level system, rule types, scope patterns
- reference/output-format.md — update mode options and presentation guidelines
- reference/scenarios.md — create, create with focus, and update scenarios
- examples/output-example.md — expected output format
- examples/CONSTITUTION.md — complete constitution example
- template.md — constitution template
## Workflow
### 1. Check Existing
match (CONSTITUTION.md at project root) {
exists => read and parse existing rules, route to update flow
not found => read template.md, route to creation flow
}
### 2. Discover Patterns
Read reference/perspectives.md. Select applicable perspectives based on $ARGUMENTS.
Launch parallel agents for each perspective. Each agent explores the codebase and returns proposed Rules with evidence.
### 3. Synthesize
Process discoveries:
1. Deduplicate overlapping patterns.
2. Classify each rule with level (L1/L2/L3) per reference/rule-patterns.md.
3. Group by category.
### 4. Present Rules
Read reference/output-format.md and format proposed rules accordingly.
Ask the user to choose: Approve rules | Modify before saving | Cancel
### 5. Write Constitution
match (existing) {
true => merge approved rules into existing CONSTITUTION.md
false => write new CONSTITUTION.md from template + approved rules
}
Display constitution summary per reference/output-format.md.
### 6. Validate
Ask the user to choose: Run validation now | Skip
match (choice) {
validate => use the validate skill in constitution mode
skip => done
}
© Rudolf S. · MIT · rsmdt/the-startup