repo-to-skill / adapters
CLAUDE.md0 starsChanged 51 days agoMITView on GitHub
Portability status: SUPPORTED_STRUCTURAL_ONLY Adapter for loading the Codebase Constitution into Claude Code via CLAUDE.md. Append to or create CLAUDE.md at the repository root: Claude Code reads CLAUDE.md at session start from: 1. Repository root (./CLAUDE.md) — recommended for project constitution 2. Home directory (~/.claude/CLAUDE.md) — global fallback
In this repository4 other files it gives its agents.
- skills/repo-to-skill/adapters/claude.mdCLAUDE.md
- repo-to-skillSkill
- codebase-constitutionSkill
- codebase-constitutionSkill
The file
We split this claude.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 76
No automatic validation that Claude followed the rules
≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Claude Code Host Adapter
Portability status: SUPPORTED_STRUCTURAL_ONLY
Adapter for loading the Codebase Constitution into Claude Code via CLAUDE.md.
Installation Layout
{repo-root}/
CLAUDE.md ← Claude's project memory (inject rules here)
docs/
CONSTITUTION.md
agent-rules.yaml
adr/
ADR-*.mdInjection Format
Append to or create CLAUDE.md at the repository root:
# Engineering Constitution — {Project Name}
> Source: docs/CONSTITUTION.md | Generated: {date}
## Rules Claude Must Follow
### Architecture
{for each CONST-ARCH-* rule: paste agent_instruction field}
### Security
{for each CONST-SEC-* rule: paste agent_instruction field}
### Conventions
{for each CONST-CONV-* + CONST-NAME-* rule: paste agent_instruction field}
### Testing
{for each CONST-TEST-* rule: paste agent_instruction field}
### API Design
{for each CONST-API-* rule: paste agent_instruction field}
### Data
{for each CONST-DATA-* rule: paste agent_instruction field}
## Full Reference
See [docs/CONSTITUTION.md](./docs/CONSTITUTION.md) for the complete engineering constitution.
See [docs/agent-rules.yaml](./docs/agent-rules.yaml) for machine-readable rules.Loading Mechanism
Claude Code reads CLAUDE.md at session start from:
- Repository root (
./CLAUDE.md) — recommended for project constitution - Home directory (
~/.claude/CLAUDE.md) — global fallback
Capability Contract
| Capability | Status | Notes |
| File read | ✅ Available | Read, Glob, Grep tools |
| File write | ✅ Available | Write, Edit tools |
| Shell exec | ✅ Available | Bash tool |
| Subagents | ✅ Available | Task tool |
| Web search | ❌ Not available | Unless MCP configured |
| Python | ✅ Available | via Bash |
| CLAUDE.md loading | ✅ Available | Auto-loaded at session start |
Gaps
- CLAUDE.md has no schema enforcement — rules are prose-only
- No automatic validation that Claude followed the rules
- CLAUDE.md contents count against context window
- Long constitutions should be summarized, with reference to full docs/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

