claude-code-config
CLAUDE.md0 starsChanged 58 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. On Omarchy, prefer what the distro already ships over hand-rolling an equivalent: -…
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
20 rules. About 0 are common, 9 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
11
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 24
Check with uname -s (Darwin / Linux) before reaching for a platform tool.
- Very specific: line 53
Use uv for dependency management and project setup
- Distinctive: line 56
Follow SOLID principles with clean architecture
- Distinctive: line 67
End-to-end tests: Verify user workflows
- Very specific: line 77
If a filesystem-permission test is unavoidable, guard it: skip with an explicit message when euid == 0.
- Very specific: line 89
Clean environment: no dotfiles (~/.gitconfig etc.), no state from prior runs, only sh guaranteed (bash optional), git from the image or the …
- Distinctive: line 93
Local repro before blaming CI: run the suite inside a container on the pinned job image (root + Linux + case-sensitive fs reproduces most …
- Distinctive: line 133
Prefer Claude Code's built-in tools (Read, Grep, Glob, Edit) for direct file operations — they give the user better visibility
- Distinctive: line 134
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 139
Every repo under ~/Work uses the local-ci-cd GitLab on home-lab as its authoritative remote.
- Very specific: line 158
Do NOT rely on a GitHub MCP server — it has been removed from all environments.
- Very specific: line 166
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 169
Never create a new project on GitHub first.
- Very specific: line 175
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 176
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 177
Do not deploy a tag whose nyx/package.json version disagrees with the tag name.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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.
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 (in setup) | Dell XPS 13 9350 | Omarchy 4 "Quattro" — Arch Linux, Hyprland/Wayland, Foot, bash 5 | 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.
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.
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 ~/dev/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.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 - 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.

