From c3edb9a12c72860665310eb68f53dbd090fefed5 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Mon, 11 May 2026 22:32:14 +0200 Subject: [PATCH] feat: add global Claude Code instructions Tracks ~/.claude/CLAUDE.md in the repo under claude/CLAUDE.md. The original is replaced by a symlink back to this file. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 19 +++++++++++-------- claude/CLAUDE.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 8 deletions(-) create mode 100644 claude/CLAUDE.md diff --git a/README.md b/README.md index ef2afcb..7d264c0 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,28 @@ # dotfiles -Shared shell configuration. +Shared shell and tool configuration. ## Scope -This repo currently tracks only shared zsh UI behavior. +Tracked files: +- `.zshrc` — shared zsh UI behavior +- `claude/CLAUDE.md` — global Claude Code instructions -Tracked file: -- `.zshrc` - -This repo is intentionally small. Machine-specific shell setup stays in the local `~/.zshrc` unless explicitly promoted into shared config later. +This repo is intentionally small. Machine-specific setup stays local unless explicitly promoted into shared config later. ## Local Setup -Local `~/.zshrc` is expected to source this repo-managed file: +**zsh**: Local `~/.zshrc` sources this repo: ```zsh source "$HOME/Projekte/dotfiles/.zshrc" ``` -That keeps the repo as the source of truth for shared prompt and shell UX, while local environment setup can remain machine-specific. +**Claude Code**: `~/.claude/CLAUDE.md` is a symlink to this repo: + +```zsh +ln -s "$HOME/Projekte/dotfiles/claude/CLAUDE.md" ~/.claude/CLAUDE.md +``` ## What Lives Here diff --git a/claude/CLAUDE.md b/claude/CLAUDE.md new file mode 100644 index 0000000..8c36eb5 --- /dev/null +++ b/claude/CLAUDE.md @@ -0,0 +1,29 @@ +# Personal preferences + +## Workflow + +- **Specs, plans, and design docs go into the repo they describe.** When + brainstorming, plan-mode, or any flow produces a persistent document + (design spec, implementation plan, ADR, etc.), the final destination is + always the working tree of the project it belongs to — typically + under `docs/` (or wherever the project conventionally keeps them). + Scratch locations like `~/.claude/plans/.md` are fine *during* + plan mode, but the moment plan mode exits with an approved artifact, + copy it into the repo and `git commit` it. Don't ship a feature + while its spec or plan still lives only in a scratch file. If a + project's `AGENTS.md` / `CLAUDE.md` specifies a different directory, + that wins. + +## Tooling + +- **`ccc` for semantic code search.** Repos containing a + `.cocoindex_code/` directory are indexed by + [`ccc`](https://github.com/cocoindex-io/cocoindex-code). Reach for + it on conceptual questions ("where is X used / which files do Y / + what handles Z"), where a keyword grep would miss indirect usage: + `ccc search '' --path '**'`. Pass `--path '**'` — without + it, results are filtered to the current working directory's + subtree. The `ccc` skill has the full reference; + `grep`/`rg`/`find` remain fine for exact-string lookups. + +@RTK.md