A personal, opinionated configuration for Claude Code. These are the files that live under ~/.claude/ and shape how Claude Code behaves across every project on the machine — coding standards, git workflow, tool-selection rules, multi-agent coordination, and a curated agent library.
Published as-is in case it's useful as a starting point. Fork it, trim what you don't need, bend the rest to your preferences.
| File | Purpose |
|---|---|
CLAUDE.md |
Root config. Loaded at the start of every session. Points at the topic files below. |
coding-standards.md |
Stack preferences, testing philosophy, error handling, security, API design. |
conventions.md |
Language- and tool-specific conventions: Go, TypeScript, Python, Shell, Docker, Terraform, databases. |
git-workflow.md |
Conventional commits, pre-commit review loop, atomic commits, PR rules, post-push CI watcher. |
tool-usage.md |
When to use native tools vs. Bash, how to avoid approval prompts, script review loop. |
infra-ops.md |
Rollback awareness, secrets, monitoring, timeouts, CI/CD, Terraform ops. |
project-docs.md |
Project knowledge-base layout, ADR template, runbook template, known-issues.md convention. |
multi-agent-comms.md |
Protocol for multiple Claude instances / agents coordinating on the same project. |
commands/ |
Custom slash commands. |
agents/ |
Submodule pointing to contains-studio/agents — a curated agent library. |
projects.md.example |
Template for projects.md, the personal index of projects Claude should know about. |
settings.example.json |
Template for settings.json, listing enabled plugins and other Claude Code options. |
Heads up: this installs into
~/.claude/, which already contains your local Claude Code state (sessions, tasks, plans, caches). The repo's.gitignoreis designed so cloning on top of an existing~/.claudeis safe — runtime state won't be tracked — but back up anything you care about first.
-
Back up your existing
~/.claude:mv ~/.claude ~/.claude.backup
-
Clone with submodules:
git clone --recurse-submodules [email protected]:LeanerCloud/dotclaude.git ~/.claude
If you already cloned without
--recurse-submodules:git -C ~/.claude submodule update --init --recursive -
Create your personal config from the templates:
cp ~/.claude/projects.md.example ~/.claude/projects.md cp ~/.claude/settings.example.json ~/.claude/settings.json
Both are gitignored, so edits stay local.
-
Restore anything you need from the backup (e.g.
plugins/,projects/,sessions/).
Everything here is opinion, not gospel. The rules in CLAUDE.md and its referenced files are instructions to Claude — edit them to match how you work.
- Change the preferred stack in
coding-standards.md. - Adjust the commit conventions in
git-workflow.md. - Swap out the agent submodule in
.gitmodulesfor a different library, or vendor your own agents intoagents/. - Add your own slash commands under
commands/.
The topic-file layout (root CLAUDE.md pointing at focused sub-docs) keeps each file small enough to read in full during a session. If a file grows past ~300 lines, consider splitting it further.
This is primarily a personal config. PRs that fix clear bugs, typos, or outdated advice are welcome. Feature additions that make sense only for a specific workflow are better kept in a fork.
MIT.