claude-code-config
CLAUDE.md2 starsChanged 12 days agoMITView on GitHub
This config is shared across machines via symlinks, so never assume a platform. Check with uname -s (Darwin / Linux) before reaching for a platform tool. home-lab hosts the local-ci-cd GitLab stack the CI Compatibility section below assumes. Its sshd takes keys only from nix-darwin's remoteLoginAuthorizedKeys and only from the tailnet — password auth is off, so ssh-copy-id cannot authorise anything there; declare the key and rebuild. Project roots (decided 2026-11-08; full catalogue in ~/.claude/reference-docs/projects.md): - ~/projects/<name> holds the human…
- Reads credentials
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- claude-docsSkill
- create-agentSkill
- create-commandSkill
- create-skillSkill
- demoSkill
- design-e2eSkill
- execute-e2e-testsSkill
- fix-github-issueSkill
- telegramSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
30 rules. About 0 are common, 11 are distinctive, and 19 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
19
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
TDD always: - Write tests first, implement to pass, refactor
- Very specific: line 10
NEVER use --no-verify: when committing
- Distinctive: line 18
ALWAYS ask for clarification rather than making assumptions.
- Distinctive: line 19
If you're having trouble with something, it's ok to stop and ask for help.
- Very specific: line 22
Config changes go to GitLab before and after: Before editing anything in a config repo (~/Work/claude-code-config first of all), commit and …
- Very specific: line 25
Never leave a config change uncommitted or unpushed.
- Very specific: line 34
Never print passwords or tokens: Not in output, logs, commit messages, memories or summaries.
- Very specific: line 41
Check with uname -s (Darwin / Linux) before reaching for a platform tool.
- Distinctive: line 66
Create nothing new under it.
- Very specific: line 84
Use uv for dependency management and project setup
- Distinctive: line 87
Follow SOLID principles with clean architecture
- Distinctive: line 98
End-to-end tests: Verify user workflows
- Very specific: line 108
If a filesystem-permission test is unavoidable, guard it: skip with an explicit message when euid == 0.
- Very specific: line 120
Clean environment: no dotfiles (~/.gitconfig etc.), no state from prior runs, only sh guaranteed (bash optional), git from the image or the …
- Distinctive: line 124
Local repro before blaming CI: run the suite inside a container on the pinned job image (root + Linux + case-sensitive fs reproduces most …
- Very specific: line 152
Front door only: start work through sdlc fix, sdlc build, sdlc resume, or --enqueue.
- Distinctive: line 174
Prefer Claude Code's built-in tools (Read, Grep, Glob, Edit) for direct file operations — they give the user better visibility
- Distinctive: line 175
Use these CLI tools via Bash when you need shell pipelines, complex filtering, or when the built-in tools are too limited
- Very specific: line 180
Every repo under ~/Work uses the local-ci-cd GitLab on home-lab as its authoritative remote.
- Very specific: line 199
Do NOT rely on a GitHub MCP server — it has been removed from all environments.
- Very specific: line 207
New projects start on GitLab: Create the project there, with origin at http://gitlab.test/root/<repo>.git, and commit .sdlc-forge.yaml.
- Distinctive: line 210
Never create a new project on GitHub first.
- Very specific: line 216
Before creating or deploying a release tag, align the package release number with the GitHub tag: nyx/package.json version X.Y.Z must match …
- Very specific: line 217
When bumping the package version, update the lockfile too, for example with npm version X.Y.Z --no-git-tag-version from nyx/, then create …
- Very specific: line 218
Do not deploy a tag whose nyx/package.json version disagrees with the tag name.
- Very specific: line 260
Before answering a question about FX's infrastructure, projects or earlier decisions, call search with namespace set to the repository name …
- Very specific: line 262
When a decision is made, call add straight away with type decision: the choice and the reason for it.
- Very specific: line 264
When FX states something durable about their infrastructure, projects or setup, call add with type fact.
- Very specific: line 266
When FX corrects how you behave, call add with type preference: what to do instead.
- Distinctive: line 270
Never store a secret, token or password in a memory.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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 — Global Development Instructions
Core Principles
- Simple, clean, maintainable solutions over complex/clever implementations
- Surgical changes - smallest reasonable diff. Ask permission before reimplementing from scratch. Match existing style, even if you'd do it differently. If you notice unrelated dead code, mention it — don't delete it. Remove orphan imports/vars/functions only when your own changes made them unused.
- TDD always - Write tests first, implement to pass, refactor
- Production-ready code with comprehensive error handling
- Self-documenting code - Clear naming, strategic comments explaining "why"
- Complexity check - Would a senior engineer say this is overcomplicated? If yes, simplify.
- NEVER use --no-verify when committing
Communication Style
- Address developer as "FX"
- Sharp, efficient, no-nonsense approach
- Business-minded with C-level context awareness
- Challenge when needed, push back on inefficiency
- Clear, structured responses with actionable insights
- ALWAYS ask for clarification rather than making assumptions.
- If you're having trouble with something, it's ok to stop and ask for help. Especially if it's something your human might be better at.
Operating Rules (FX, 2026-11-08)
- Config changes go to GitLab before and after. Before editing anything in a
config repo (
~/Work/claude-code-configfirst of all), commit and push the current state to thegitlabremote; after the edit, commit and push again. Never leave a config change uncommitted or unpushed. GitHubmainofclaude-code-configaccepts pull requests only, so after the GitLab push open a PR from a sync branch, wait for CI and merge it; a change to any*.shfile also needs therisk-approvedlabel, which FX adds by hand. Afeatorfixmerge makes the release workflow add achore(release)commit on GitHubmain; fast-forwardgitlab/mainto it afterwards. - Tell FX before any command that needs root. Say what the command is and
why
sudois required, then wait for the go-ahead. Prefer the non-root alternative when one exists. - Never print passwords or tokens. Not in output, logs, commit messages,
memories or summaries. Redact them from command output (
.credentials.json,settings.jsonenv blocks,.env, keyring andopoutput).
Machines
This config is shared across machines via symlinks, so never assume a platform.
Check with uname -s (Darwin / Linux) before reaching for a platform tool.
| Host | Hardware | OS | Managed by |
macbook-pro-m3-max | MacBook Pro M3 Max | macOS | nix-install (nix-darwin) |
omarchy-xps13 | Dell XPS 13 9350 — Core Ultra 7 258V, 32 GiB, 1 TB NVMe | Omarchy 4.5.0 — Arch Linux, Hyprland 0.56 (Lua config), Foot, bash 5; full profile in machines/omarchy-xps13/CLAUDE.md, loaded from ~/Work on that host | omarchy-install |
home-lab | MacBook Pro M1 Pro (MacBookPro18,3) | macOS | nix-install (nix-darwin) |
home-lab hosts the local-ci-cd GitLab stack the CI Compatibility section
below assumes. Its sshd takes keys only from nix-darwin's
remoteLoginAuthorizedKeys and only from the tailnet — password auth is off,
so ssh-copy-id cannot authorise anything there; declare the key and rebuild.
Project roots (decided 2026-11-08; full catalogue in
~/.claude/reference-docs/projects.md):
~/projects/<name>holds the human checkouts on every host.home-labhas none; it is the appliance.~/Work/<name>is the SDLC fleet worker's clone root on every host. Worker clones are reset on dispatch, never hand-edit them. The one exception is~/Work/claude-code-config, the live config checkout on the Linux hosts.- On the Macs the live config is
~/.config/nix-install/config/claude-code-config(nix-install owns it) and~/projects/nix-installis a symlink to~/.config/nix-install. - On
macbook-pro-m3-max,~/devis a transitional symlink to~/projects. Create nothing new under it.
On Omarchy, prefer what the distro already ships over hand-rolling an equivalent:
omarchy— the top-level CLI (omarchy update,omarchy bar put <plugin> --section right).- The
omarchy-*script family (e.g.omarchy-microphone-test,omarchy-nvme-suspend-fix). Enumerate what is actually installed withcompgen -c omarchy | sort -urather than guessing a name — the set grows with Omarchy releases. pacmanfor packages — neverbrew.systemctl --userfor user services.- The Omarchy menu is
Super + Space; the terminal is Foot (Super + Return).
macOS-only pieces of this framework (cmux, model-shelf volume scanning, the
oMLX/qwen harness, /demo narration) are unavailable on Omarchy by design.
Code Quality Standards
Python (uv + FastAPI)
- Use
uvfor dependency management and project setup - Comprehensive type hints throughout
- Self-documenting variable names and strategic docstrings
- Follow SOLID principles with clean architecture
TypeScript (Bun Runtime)
- Advanced TypeScript patterns for backend systems
- Proper error handling and input validation
- OWASP security guidelines
- Microservices-ready architecture
Testing (NO EXCEPTIONS)
- Unit tests: Cover all business logic
- Integration tests: Validate component interactions
- End-to-end tests: Verify user workflows
- Authorization required: "I AUTHORIZE YOU TO SKIP WRITING TESTS THIS TIME"
CI Compatibility — tests must pass in local GitLab job containers
Repos run CI on the local-ci-cd platform: ephemeral Linux/arm64 container VMs, running as root, on minimal digest-pinned images, with no network. Tests that only pass on a developer Mac are defects. Write to this contract:
- Root user: permission-based fault injection (
chmod, read-only files/dirs) silently no-ops as root. Inject failures through seams (interfaces, fakes, injected errors) instead. If a filesystem-permission test is unavoidable, guard it: skip with an explicit message wheneuid == 0. - Process semantics: PID 1 is a bare
shkeep-alive — no init reaper, container-specific session/signal behavior. Tests that signal processes must kill the process group, escalate SIGTERM→SIGKILL, and wait with headroom; never assert a child died promptly. - Offline: the platform's release gate runs with networking disabled. No test may reach the public internet; use local fixtures and fakes.
localhostis the job container, never the host. Don't probe host services on 127.0.0.1.- Case-sensitive ext4 vs the Mac's case-insensitive APFS: paths/imports differing only by case fail only in CI.
- Modest resources (default 2 CPUs / 4 GB, sharing a host with GitLab): tight timeouts and wall-clock assertions flake. Prefer event-based waits over sleeps; give timeouts headroom.
- Clean environment: no dotfiles (
~/.gitconfigetc.), no state from prior runs, onlyshguaranteed (bashoptional),gitfrom the image or the platform's toolbox volume. - Triage rule: a job failing with the system-failure exit code is a platform problem; a build-failure exit code is your code or tests. Don't relabel one as the other.
- Local repro before blaming CI: run the suite inside a container on the pinned job image (root + Linux + case-sensitive fs reproduces most of the above).
Workflow & Agents
Story-driven development (/generate-epics, REQUIREMENTS.md, stories/) is available for larger projects — skills enforce their own prerequisites, so no global mandate is needed. See WORKFLOW-v2.md for the full multi-agent development lifecycle.
Verifiable goals
For multi-step tasks, state a brief plan with explicit verification per step:
1. [Step] → verify: [check]
2. [Step] → verify: [check]Strong success criteria let agents loop independently. Weak criteria ("make it work") require constant clarification. Transform fuzzy asks into verifiable goals: "Add validation" → "Write tests for invalid inputs, then make them pass". "Fix the bug" → "Write a test that reproduces it, then make it pass".
Agents (defined in agents/*.md): backend-typescript-architect, python-backend-engineer, ui-engineer, podman-container-architect, bash-zsh-macos-engineer, senior-code-reviewer, qa-engineer.
Key skills: /brainstorm, /generate-epics, /resume-build-agents, /create-issue, /coverage, /create-project-summary-stats.
Integration patterns: API-agnostic frontends · database optimization (no N+1) · Podman + OCI · security-first · performance monitoring.
Piloting the SDLC
sdlc is the controller that owns the build and fix pipelines; the skills are thin wrappers around it. Most of these rules are conventions the controller does not enforce; a rule names its refusal where one exists.
- Look before acting:
sdlc status --json,sdlc runs --json,sdlc queue list --jsonandsdlc doctor --jsonchange no run state. Read them before starting anything. - Front door only: start work through
sdlc fix,sdlc build,sdlc resume, or--enqueue. Never call therun-*internals. - Never nest:
SDLC_BATCH_BUILDset means you are a dispatched agent. Return your<<<RESULT_JSON>>>block; do not start a run. The variable is only a marker: the controller will not refuse a nested run. - One live run per repo: check
sdlc runs --jsonfirst.sdlc fixandsdlc resumerefuse a second live owner of the same run or scope; a freshsdlc buildis not guarded. A runsdlc runsshowsDEADresumes with plainsdlc resume; usesdlc resume --forceonly after a refusal, once you have confirmed that pid is no longer the run. - Long runs are not tool calls:
buildandfixrun for hours. Poll withsdlc status; never block on them.
CLI Tools — Prefer installed utilities over builtins
The following tools are installed and SHOULD be used via Bash when the built-in Claude Code tools (Read, Grep, Glob, Edit) are insufficient or when working in shell scripts, pipelines, or subagents:
| Instead of | Use | Why |
find | fd | Faster, respects .gitignore, sane defaults. E.g. fd '\.py$' instead of find . -name '*.py' |
grep / rg (via Bash) | rg (ripgrep) | Already installed — use when Grep tool can't cover the need (e.g. complex piped workflows) |
cat (for reading) | bat | Syntax highlighting, line numbers, git integration. E.g. bat src/main.ts |
cd (manual navigation) | zoxide (z) | Jump to frecent directories. E.g. z myproject instead of cd ~/projects/long/path/myproject |
| Interactive file selection | fzf | Pipe any list into fzf for interactive filtering. E.g. fd '\.ts$' | fzf |
ls -la for file browsing | yazi (y) | Full terminal file manager with previews. Available as y shell function |
jq for JSON | jq | Installed — use for JSON processing in shell pipelines |
| PDF text/info extraction | pdftotext, pdfinfo | Poppler utils — extract text, metadata, images from PDFs. E.g. pdftotext doc.pdf - for stdout |
wc -l, manual LOC counting | scc | Fast code counter with complexity and COCOMO estimates. Always use scc for any LOC counting task. E.g. scc . or scc src/ |
PDF generation (reportlab, weasyprint, etc.) | typst | Modern typesetting → PDF. Always use typst for PDF generation. Write a .typ file then typst compile file.typ. No Python libs or venvs needed |
Rules:
- Prefer Claude Code's built-in tools (Read, Grep, Glob, Edit) for direct file operations — they give the user better visibility
- Use these CLI tools via Bash when you need shell pipelines, complex filtering, or when the built-in tools are too limited
- In shell scripts and automation, always use
fd/rg/bat/jqover legacy alternatives
Source Control — local GitLab is master
Every repo under ~/Work uses the local-ci-cd GitLab on home-lab as its
authoritative remote; GitHub is a one-way push mirror. Two repos keep GitHub as
master: nix-install, and claude-code-config while its controller-driven PR
flow still runs there.
- Reach GitLab as
http://gitlab.test(port 80 viatailscale serve+ split DNS) and setGITLAB_HOST=gitlab.testforglab. Never use the oldhome-lab…:8080address — its tailnet mapping is unreliable. A global gitinsteadOfrewrite still maps stale:8080remotes togitlab.test. originis GitLab (http://gitlab.test/root/<repo>.git); thegithubremote is only the mirror target. Never push togithub; never merge on GitHub — mirrors run withkeep_divergent_refs, so a GitHub-side merge silently strands GitLab instead of failing.- Change flow: branch → push
origin→ merge request on GitLab → the appliance pipeline is green → merge on GitLab. The mirror carriesmainand tags to GitHub; a GitLabreleasejob publishes the GitHub release only after the mirror has synced the tag. - Issues and MRs live on GitLab — use
glab.ghstays for the two GitHub-master repos and for read-only mirror checks. Do NOT rely on a GitHub MCP server — it has been removed from all environments.glab mr createtakes the source project from the cwd; for another repo,POST projects/<id>/merge_requestsviaglab api. - Every GitLab-master repo carries
.sdlc-forge.yaml(forge: gitlab,gitlab_url: http://gitlab.test): the sdlc controller's auto-detect keys on a "gitlab" substring the hostname lacks. Keep it. - Keep
.github/workflows/ci.ymlwhere it exists — it is the hosted fallback for the single-appliance risk, not a redundant gate. - New projects start on GitLab. Create the project there, with
originathttp://gitlab.test/root/<repo>.git, and commit.sdlc-forge.yaml. GitHub gets a repo as mirror target only, then a push mirror is configured. Never create a new project on GitHub first.
Starting a project, mirror operations, credential rotation, and post-reboot
recovery of the appliance: ~/.claude/reference-docs/source-control.md.
Release Version Alignment
- Before creating or deploying a release tag, align the package release number with the GitHub tag:
nyx/package.jsonversionX.Y.Zmust match Git tagvX.Y.Z. - When bumping the package version, update the lockfile too, for example with
npm version X.Y.Z --no-git-tag-versionfromnyx/, then create the matchingvX.Y.Ztag after committing. - Do not deploy a tag whose
nyx/package.jsonversion disagrees with the tag name.
Commit Format
This repo enforces Conventional Commits via
commitlint (.commitlintrc.json). The commit-format CI job runs
commitlint --from origin/main --to HEAD on every merge request or PR; it fails
if any of its commits violate the rules. Existing history on main is exempt.
How to write a commit message:
- Header:
type(scope): subject—typeis required and lower-case,scopeis optional and lower-case,subjectstarts lower-case, has no trailing period, and the whole header is at most 72 characters. - Allowed types:
feat,fix,chore,docs,refactor,test,ci,perf,build,revert.featdrives a MINOR bump,fixa PATCH; other types do not trigger a release (see Epic-05 release workflow). - Body and footer are blank-line separated. A breaking change is flagged with a
BREAKING CHANGE:footer (or!after the type), which drives a MAJOR bump.
Three concrete examples:
feat(release): conventional commits + commitlint on prs
Adds a commit-format CI job so the release workflow has reliable
semver signal.docs: document the commit format in the source-control referencefix(hooks)!: drop unused stdin in permission hooks
BREAKING CHANGE: the permission hook no longer reads stdin for the log subcommand.Shared memory
The memory MCP server is FX's memory, shared with Codex, Claude.ai, ChatGPT, Hermes and Claude Desktop.
- Before answering a question about FX's infrastructure, projects or earlier decisions, call
searchwithnamespaceset to the repository name andinclude_globaltrue. - When a decision is made, call
addstraight away with typedecision: the choice and the reason for it. - When FX states something durable about their infrastructure, projects or setup, call
addwith typefact. - When FX corrects how you behave, call
addwith typepreference: what to do instead. - Set
namespaceto the repository name for anything specific to this project; omit it for what is true everywhere. The repository name is the main checkout's directory in lowercase, so a worktree gives the repository's name; in a directory that is not a git repository, omit it. - Never store a secret, token or password in a memory.
Reference Materials
- CLAUDE.md guide:
docs/claude-md-guide.md— structure, guardrails, maintenance, and how this file itself is organized - Python:
docs/python-best-practices.md - Database:
docs/database-best-practices.md - Containers:
docs/container-best-practices.md - Testing & TDD:
docs/testing-best-practices.md - Source Control:
@~/.claude/reference-docs/source-control.md— see also the Commit Format section above - Projects:
~/.claude/reference-docs/projects.md— where every repo lives per host and what the pillar repos do - Full Workflow:
WORKFLOW-v2.md
Surgical Changes rules, Complexity check, and Verifiable Goals template adapted from forrestchang/andrej-karpathy-skills (MIT), itself derived from Andrej Karpathy's observations on LLM coding pitfalls.
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.

