speckit-constitution — Claude Code skill: project constitution
This skill writes and updates the project constitution in .specify/memory/constitution.md, turning your principles into a versioned governance doc.
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution -a claude-codeWhat speckit-constitution does
The skill maintains the constitution — the document of principles that other Spec Kit commands read at runtime. You pass principles or values as the argument, and it maps them onto the template: a name line, the non-negotiable rules, a rationale. If .specify/memory/constitution.md already exists, it loads the current values and amendments, then preserves what still applies.
Scope is deliberately narrow. Feature work, code generation, refactoring and deployment requests are not executed; the skill extracts them as deferred intents and lists a follow-up command such as /speckit-specify under Next Actions. Application source files, routes, components and tests stay untouched. So asking it to fix a route while it edits the constitution gets you nothing.
Before the update it checks .specify/extensions.yml for hooks.before_constitution. Mandatory hooks run and the skill waits for the result; optional ones are printed with the command to invoke by hand. The project needs the Spec Kit structure with a .specify/ directory and .specify/scripts/bash/resolve-template.sh — if template resolution fails, the skill stops instead of continuing on a partial scaffold. Version bumps follow semver: MAJOR for removed or redefined principles, MINOR for a new section, PATCH for wording fixes.
What it helps with
- pin project principles into one document
- amend the constitution without losing earlier values
- keep constitution edits separate from feature code
- bump the constitution version by semver rules
- check extension hooks before amending governance
Example prompts for the agent
- update the constitution with three principles: testability, simplicity, backward compatibility
- add a mandatory review-before-merge principle to the constitution
- review the project constitution and propose a new version
How to install speckit-constitution
1Skills CLI (Vercel)
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution -a claude-code2Manually: put the files in place
~/.claude/skills/speckit-constitution/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/speckit-constitution/
1Skills CLI (Vercel)
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution -a codex2Manually: put the files in place
.agents/skills/speckit-constitution/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution -a cursor2Manually: put the files in place
.cursor/skills/speckit-constitution/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dceoy/speckit-agent-skills speckit-constitution2Manually: put the files in place
.github/skills/speckit-constitution/SKILL.md1Skills CLI (Vercel)
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution -a gemini-cli2Platform CLI
gemini skills install https://github.com/dceoy/speckit-agent-skills --path skills/speckit-constitutionManually: put the files in place
.devin/skills/speckit-constitution/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution -a opencodeClaude.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 speckit-constitution
How do I install speckit-constitution in Claude?
Run npx skills add dceoy/speckit-agent-skills --skill speckit-constitution -a claude-code. The skill file then sits at ~/.claude/skills/speckit-constitution/SKILL.md.
What does speckit-constitution do?
It creates or updates the project constitution at .specify/memory/constitution.md from the principles you supply, bumps the version by semver and checks hooks before writing.
What does the skill need to run?
A Spec Kit project structure with a .specify/ directory. The constitution template is resolved through .specify/scripts/bash/resolve-template.sh, and the skill halts with a resolution error if that fails.