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, backlog triage, 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.
I'm Cristian Magherusan-Stanciu, founder of LeanerCloud. We build cloud cost-optimization tooling — the open-source AutoSpotting (Spot-instance automation), savings-estimator, and a multi-cloud commitment optimizer (RIs / Savings Plans / GCP CUDs / Azure Reservations) deployed across AWS, Azure, and GCP.
That work shapes the opinions in here: heavy use of multi-cloud Terraform, supply-chain-hardening reflexes, post-push CI watchers, CodeRabbit-loop iteration, and a strong preference for landing security and cost-optimization fixes through small atomic PRs against shared feature branches rather than direct pushes. If your day looks similar — multi-cloud infra, security-first reviews, CR-driven feedback loops — these rules will probably feel natural. If it doesn't, fork freely.
| 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, post-PR CodeRabbit + human-merge loop with iterate-to-silence and merge-conflict resolution. |
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. |
triage.md |
Backlog triage + work selection: 5-dimension labelling (priority/severity/urgency/impact/effort), parallel-agent fan-out, three-pass approach for large backlogs, stale-sweep procedure. |
commands/ |
Custom slash commands. |
agents/ |
Submodule pointing to contains-studio/agents — a curated agent library. |
local-paths.md.example |
Template for local-paths.md, per-machine paths and tool locations referenced from the rule files (e.g. graphify CLI / venv). |
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 git@github.com:LeanerCloud/dotclaude.git ~/.claudeIf 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/local-paths.md.example ~/.claude/local-paths.md cp ~/.claude/settings.example.json ~/.claude/settings.json
All three 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.