This file guides Claude Code's behavior.
- Simplicity: Prioritize the simplest solution.
- No Duplication: Reuse existing functionality.
- TDD: Practice Test-Driven Development. Understand desired behavior -> Test -> Implement.
- ALWAYS run
make checkbefore requesting a commit.- This runs formatters, linters, tests, and generators.
- If
make checkchanges files, include them in the commit.
- Use
maketargets:make test,make lint,make fix,make format. - Use
make formatinstead of individual formatting tools (e.g.,gofmt,goimports).
- Keep main branch history flat (no merge commits).
- Use rebase to integrate upstream changes (
git pull --rebase). - Use fast-forward merges to main (
git merge --ff-only).
This repository squash-merges with the pull request title and description
as the commit message. HTML comments (<!-- ... -->) in the PR body are
copied into git log even though GitHub hides them in the rendered
description.
When creating or updating a PR:
- Do not copy
<!-- ... -->hints from.github/pull_request_template.mdinto the submitted body. They are compose-time hints only. - Delete unused optional sections instead of leaving them empty.
A workflow strips leftover comments from the stored body as a backstop. Other repositories can call the same workflow (pin the SHA):
jobs:
strip:
permissions:
contents: read
pull-requests: write
uses: jaeyeom/experimental/.github/workflows/strip-pr-html-comments.yml@<sha>$TMPDIRdiffers between sandbox and unsandbox modes. Sandbox uses/tmp/claude, unsandbox uses/var/folders/.../T//claude. Files created in one mode are invisible via$TMPDIRin the other.- For multi-step workflows: use the project-local
.tmp/directory (gitignored) instead of$TMPDIRwhen a temp file must be referenced across multiple Bash calls that might switch sandbox modes.mkdir -p .tmp echo "data" > .tmp/myfile # Safe to reference .tmp/myfile in any subsequent command
- If you must use
$TMPDIR: capture the resolved absolute path on first use and pass the literal path (not$TMPDIR) to subsequent commands.
- Go: Use the
go-devplugin skill (Auto-discovered for Go tasks). - Code Review: See
.claude/skills/code-review/SKILL.md(Auto-discovered for reviews). - Slash Commands:
/review: Review code (referencescode-reviewskill).