agentleFS
ngc-shjngc-shj/claude-code-config/global/CLAUDE.md

claude-code-config / global

CLAUDE.md1 starsChanged 2 months agoMITView on GitHub

Match length to what the task needs, in replies and in files you write. Cover the substance without padding — no filler sections, restated summaries, or boilerplate. When a skill or the user asks for a specific format, that request wins. Write code that reads like the surrounding code — match its naming, idiom, and comment density. Leave unchanged code alone: do not retrofit comments, docstrings, or type annotations onto lines the task did not touch. Commit and push only…

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    When a skill or the user asks for a specific format, that request wins.

    line 12
  2. Distinctive:

    Write code that reads like the surrounding code — match its naming, idiom, and comment density.

    line 16
  3. Distinctive:

    Commit and push only when asked.

    line 20
  4. Very specific:

    Read a file before editing it, and prefer editing an existing file over creating one.

    line 24
  5. Distinctive:

    When presenting more than one way forward, lead with the recommendation and the axis that decides it — what each option costs, breaks, or …

    line 28
  6. Very specific:

    Keep orchestration and judgment on Claude.

    line 46

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Global Rules

Language Policy

  • Communicate with the user in Japanese
  • Code comments, commit messages, documentation, and branch names in English

Output length

Match length to what the task needs, in replies and in files you write. Cover the substance without padding — no filler sections, restated summaries, or boilerplate. When a skill or the user asks for a specific format, that request wins.

Coding Style

Write code that reads like the surrounding code — match its naming, idiom, and comment density. Leave unchanged code alone: do not retrofit comments, docstrings, or type annotations onto lines the task did not touch.

Git Workflow

Commit and push only when asked. Prefer a new commit over amending one that already exists. Commit messages explain why the change was needed, not what the diff shows.

Safety

Read a file before editing it, and prefer editing an existing file over creating one. Never commit secrets — .env files, credentials, API keys.

Proposing options

When presenting more than one way forward, lead with the recommendation and the axis that decides it — what each option costs, breaks, or rules out. An option is not understood until you can name what the alternative silently satisfied that it does not: an import that resolves, a file the installer still copies, a contract nothing in the local diff shows. When that cannot be named yet, say so and go find it rather than presenting the options as equivalent.

Rules Layer

Detailed coding-style, testing, and security guidance lives under ~/.claude/rules/:

  • ~/.claude/rules/common/ — the language-agnostic baseline, loaded into every session
  • ~/.claude/rules/{lang}/ — overlays (typescript/, python/, golang/, ...) that extend the baseline; each declares matching globs in paths: frontmatter, so read the one matching the file you are editing

Overlays override the baseline where the language idiom differs (e.g. Go mutability). These extend the sections above rather than replacing them.

Model Routing

Keep orchestration and judgment on Claude; push mechanical, repetitive, or privacy-sensitive work to a local LLM through the hooks, which read files directly and cost no Claude tokens. ~/.claude/hooks/pre-review.sh is the usual pre-screening entry point.

Reach for a sub-agent on large, self-contained, parallelisable work — a wide multi-file investigation, say. A few tool calls is cheaper done yourself, and one capable agent beats several.

<!-- Wording reviewed against skills/triangulate R21; reword only after re-reading it. -->

Delegate a whole slice of work, not the checking of work already done.

Full model table, backend dispatch, and routing rules: ~/.claude/model-routing.md.

Tool Output Compression (RTK)

Bash commands are transparently rewritten through the rtk proxy to compress tool output. It needs no action during normal work; rtk proxy <cmd> bypasses it for one command.

Command reference, hook interactions, and the privacy audit: ~/.claude/RTK.md.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.