
Constitution
Guides the agent to write and extend a project's golden-principles.yaml rule file
Constitution is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 6
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Constitution
This skill helps an agent create or extend a project's golden-principles.yaml, a file of deterministic, grep-checkable coding rules. It can start from scratch for a new repository or infer candidate rules from existing code, and it proposes each rule with its severity, detection pattern and fix hint so the user can accept, edit or skip it before anything is written.
The workflow runs in phases: it inventories the primary language and architecture signals such as database clients, web frameworks, test runners and type-checking config, selects matching principle categories from a library, and then walks through candidates one at a time. Nothing is written to disk until all proposals have been confirmed. The skill only edits the principles file and, with explicit approval, a pointer section in CLAUDE.md; it does not change code or settings.
The skill expects a repository with a recognizable package manifest and works with the schema read by the companion quality-audit skill, which runs the rules against the codebase. It also documents an unattended mode for bootstrapping a baseline file.
When your agent uses it
Author or extend the project's golden-principles.yaml — interactively for new repos, or by inferring and confirming candidates from existing code. Use when defining project coding principles or quality gates. Pairs with /quality-audit, which reads the file.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 3 files (26 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the claude-code-kit plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add tansuasici/claude-code-kit
/plugin install claude-code-kit@claude-code-kitOr copy only this skill to ~/.claude/skills/constitution:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/constitution &&
cp -R "$tmp/.claude/skills/constitution" ~/.claude/skills/constitution &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/constitution inside it instead.
Copy the skill folder to ~/.agents/skills/constitution to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/constitution &&
cp -R "$tmp/.claude/skills/constitution" ~/.agents/skills/constitution &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/constitution inside it instead.
Copy the skill folder to ~/.cursor/skills/constitution to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/constitution &&
cp -R "$tmp/.claude/skills/constitution" ~/.cursor/skills/constitution &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/constitution inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/tansuasici/claude-code-kit.git --path .claude/skills/constitutionOr copy the folder to ~/.gemini/skills/constitution yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/constitution:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/constitution &&
cp -R "$tmp/.claude/skills/constitution" ~/.copilot/skills/constitution &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/constitution inside it instead.
Get the folder:
git clone --depth 1 https://github.com/tansuasici/claude-code-kit.gitThen copy claude-code-kit/.claude/skills/constitution into your agent's skills folder as constitution. Agents that support SKILL.md read one folder per skill.
What it does
- Interactive rule proposals
- Presents each candidate rule with its id, severity, detection pattern and fix hint for individual acceptance.
- Stack-aware category selection
- Chooses rule categories based on detected language and architecture signals in the repository.
- Additive file merging
- Appends accepted rules to an existing file while preserving comments, ordering and existing entries.
- Severity-weighted schema
- Defines each rule with critical, major or minor severity and a grep or command based detection.
- Companion audit integration
- Produces a file that the quality-audit skill reads to measure drift against the principles.
- Unattended bootstrap mode
- Offers a headless run that auto-accepts library rules for baseline files in CI.
Good for
- Set up a golden-principles file for a new TypeScript project
- Infer coding rules from an existing codebase and confirm them
- Add type-safety or testing quality gates to an existing repo
- Create a baseline principles file in a CI smoke test
Constitution FAQ
When does Constitution trigger?
It is meant for defining project coding principles or quality gates, and is invoked with /constitution or when the user asks to set up principles or bootstrap quality rules.
Does Constitution change my code?
No. It writes only the golden-principles.yaml file and, with explicit approval, a pointer section in CLAUDE.md when the file is newly created.
Can Constitution overwrite existing rules?
No. Re-running only proposes new categories and appends accepted rules; it does not edit, remove or reorder existing entries.
Where is the file saved?
By default in .claude/golden-principles.yaml, or at the repo root if a path is passed explicitly.
How do I install Constitution in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/constitution to use it in all your projects, or to .claude/skills/constitution in one project. Or install the claude-code-kit plugin, which includes it: /plugin marketplace add tansuasici/claude-code-kit, then /plugin install claude-code-kit@claude-code-kit.
Does Constitution run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Constitution?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Constitution?
The closest alternatives to Constitution are Writing rules, Quality audit, Skill generator, Rules and Principle encode lessons in structure.
Where this comes from
- Description: from the skill's own SKILL.md.
More from tansuasici/claude-code-kit

Audits UI code against WCAG 2.1 AA for semantics, keyboard use, contrast and ARIA
- Open source
- 6 GitHub stars
- Developer tools

Audits a codebase's structure for SOLID violations, coupling and module boundary issues
- Open source
- 6 GitHub stars
- Developer tools

Lists the skills, agents, hooks and modules installed in a kit-enabled project
- Open source
- 6 GitHub stars
- Developer tools

Audits code for smells, error-handling gaps and maintainability issues with fixes
- Open source
- 6 GitHub stars
- Developer tools

Finds unused functions, dead imports, orphan files and unreachable branches in a codebase
- Open source
- 6 GitHub stars
- Developer tools

Guides the agent through root-cause debugging with reproduction, hypotheses
- Open source
- 6 GitHub stars
- Developer tools


