This repository has no description
1.5 kB
29 lines
1# CLAUDE.md
2
3Global guidance for Claude Code across all projects.
4
5## Instructions
6
7- Format code with the project's formatter before committing (e.g. `nix fmt`, `ruff format`, `prettier`).
8- Write shell scripts that pass ShellCheck.
9- Write Python code for 3.12 that conforms to `ruff format` and passes `ruff check`.
10- Always test/lint/format your code before committing.
11- Add debug output or unit tests when troubleshooting.
12- Avoid mocking in tests.
13- Use the `gh` tool to interact with GitHub.
14- Do not include "claude" in commit messages.
15- Take extra care not to commit lines with trailing whitespace.
16- Use the `tmux` skill for long-running tasks. Use a session with a `claude-` prefix — create one if no idle session exists.
17- Use the `notify` skill (`s say "..."`) to get the user's attention when a long task finishes, you need input to continue, or something needs human review.
18- Use git-mcp for advanced git operations (interactive staging, stash management, bisecting).
19
20## Nix
21
22When working in a Nix flake:
23
24- Use `--log-format bar-with-logs` with `nix build` for improved build log output.
25- Add new untracked files with `git add` — flake eval only sees tracked files.
26- Use `nix-locate` to find packages by file path.
27- Use `nix run nixpkgs#foo` to execute tools that aren't installed.
28- Use `nix eval` instead of `nix flake show` to look up attributes in a flake.
29 For listing: `nix eval .#packages.<system> --apply builtins.attrNames --json | jq`.