dotcontext
CLAUDE.md9 starsChanged 4 months agoMITView on GitHub
AI context toolkit for coding agents (Claude Code, Codex, opencode, Gemini, Copilot, Cursor) — commands, decisions, skills, and feature planning for your codebase. IMPORTANT: Before implementing any change, check .context/decisions/ for related ADRs. If a requested change conflicts with an existing decision: 1. Stop and inform the user which ADR(s) would be affected 2. Ask explicitly if they want to: - Proceed and update the decision - Modify the approach to comply with existing decision - Cancel the change 3.…
We split this CLAUDE.md into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
IMPORTANT: Before implementing any change, check .context/decisions/ for related ADRs.
- Distinctive: line 9
If a requested change conflicts with an existing decision:
- Distinctive: line 11
Ask explicitly: if they want to:
- Distinctive: line 17
Create new ADR with updated decision
- Distinctive: line 24
No database (file-based templates)
- Distinctive: line 72
Always ask before assuming: - When there is ambiguity, multiple valid approaches, or decisions to be made, use the AskUserQuestion tool to …
- Distinctive: line 73
POSIX compatibility: - Use Bash 3.2+ compatible syntax (macOS ships with 3.2).
- Very specific: line 74
Safe defaults: - Never overwrite existing user content: seed files are create-only, and managed files show a diff and prompt (--yes to …
- Distinctive: line 76
Cross-platform support: - Test on macOS, Linux, and Windows/WSL.
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 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
dotcontext
AI context toolkit for coding agents (Claude Code, Codex, opencode, Gemini, Copilot, Cursor) — commands, decisions, skills, and feature planning for your codebase.
Decision Compliance
IMPORTANT: Before implementing any change, check .context/decisions/ for related ADRs.
If a requested change conflicts with an existing decision:
- Stop and inform the user which ADR(s) would be affected
- Ask explicitly if they want to:
- Proceed and update the decision
- Modify the approach to comply with existing decision
- Cancel the change
- If updating a decision, create a new version:
- Change status to
Superseded by ADR-XXX - Create new ADR with updated decision
- Reference the previous ADR
- Change status to
Stack
- Bash 3.2+ (POSIX-compatible shell scripting)
- Single executable distribution (no framework)
- No database (file-based templates)
- Dependencies: curl/wget, sed, grep, jq (optional)
Commands
CLI
# Initialize context structure in a project (harness-selective; auto-runs /setup-context when Claude is selected)
dotcontext init [--name "Project Name"] [--agents claude,codex,...] [--yes] [--no-setup]
# Update CLI + templates
dotcontext update # Update CLI + templates (if in project)
dotcontext update --cli # Only update CLI
dotcontext update --templates # Only update templates
# Validate project setup
dotcontext doctor
# Shell tab completion
dotcontext completion [bash|zsh]
# Help / version (--features and --json expose the capability handshake)
dotcontext --help
dotcontext --version [--features|--json]Claude Code (interactive with questions)
/setup-context # Analyze codebase and populate context
/spec-dc [feature] # Write a behavior spec — the WHAT (step 1)
/plan-dc [spec-path] # Turn a spec into a plan (ADR review) — the HOW (step 2)
/execute-dc [plan-path] # Implement a plan in parallel waves — the DO (step 3)
/code-review # Review code changes
/commit [--amend] # Smart commit with style-aware messages
/deep-context [query] # Structured 4-step codebase exploration
/fix-bug [description] # Test-driven bug fixing with parallel agents
/create-pr # Create PR with auto-generated description
/pr-comment # Add comment to existing PR
/release [patch|minor|major] # Create release with version bump
/add-decision # Add ADR interactively
/add-skill # Add skill guide interactively
/add-command # Create custom command interactivelyCritical Rules
- Always ask before assuming - When there is ambiguity, multiple valid approaches, or decisions to be made, use the AskUserQuestion tool to clarify before proceeding. Never assume user intent.
- POSIX compatibility - Use Bash 3.2+ compatible syntax (macOS ships with 3.2). Avoid bashisms that require newer versions.
- Safe defaults - Never overwrite existing user content: seed files are create-only, and managed files show a diff and prompt (
--yesto skip) before updating. Always prompt before destructive operations. - Template downloads - Templates are fetched from GitHub
mainbranch. Validate downloads before using. - Cross-platform support - Test on macOS, Linux, and Windows/WSL. Platform-specific code must have proper detection and fallbacks.
Architecture
Single Executable Pattern
The CLI is distributed as a single dotcontext bash script. Source code lives in src/ modules (core/, commands/, setup/) and is bundled into the single executable via make build. All commands are implemented as functions, routed via a case statement. This keeps development modular while simplifying distribution.
Template-Based Init
Templates live in templates/ directory on GitHub and are downloaded during dotcontext init. init is harness-selective — only the chosen agents' files are emitted:
templates/AGENTS.md→ projectAGENTS.md(the canonical instructions, always emitted)templates/CLAUDE.md/templates/GEMINI.md→ thin@AGENTS.mdimport stubs (emitted only for Claude / Gemini)templates/.context/→ project.context/directory.claude/(commands, agents, statusline, hooks) is emitted only when Claude is selected
Multi-Agent Integration
Six harnesses are supported (Claude Code, Codex, opencode, Gemini CLI, Copilot, Cursor) via an adapter registry (src/setup/agents.sh). Workflows reach each harness in its native form: Claude .claude/commands/, opencode .opencode/command/, Copilot .github/prompts/, and a ## Workflows section in AGENTS.md for Gemini/Cursor/Codex. Skills (SKILL.md with name/description frontmatter) go to .claude/skills/ and/or .agents/skills/. See ADR-016/017/018.
Additional Context
- Domain and architecture →
.context/CONTEXT.md - Architectural decisions →
.context/decisions/ - Task-specific skills →
.claude/skills/ - Bug reproduction guide →
.claude/skills/bug-reproduction/SKILL.md
In this repository7 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- add-cli-subcommandSkill
- add-new-commandSkill
- batch-operationsSkill
- bug-reproductionSkill
- git-platformSkill
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.

