-
Notifications
You must be signed in to change notification settings - Fork 5
chore: add CLAUDE.md for Claude Code development guidance #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
CLAUDE.md
Outdated
@@ -0,0 +1,114 @@ | |||
# CLAUDE.md | |||
|
|||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't leave this in your CLAUDE.md file, rather everything in this file should be addressed to Claude.
E.g.
This document helps Claude understand the Sleuth repo structure and common development patterns.
CLAUDE.md
Outdated
|
||
## Development Commands | ||
|
||
**Always use yarn instead of npm** - this project enforces yarn usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Always use yarn instead of npm** - this project enforces yarn usage. | |
IMPORTANT: Never attempt to run `npm`, instead always run the equivalent `yarn` command |
"IMPORTANT:" is some magic to make claude pay more attention, bold doesn't have the same effect in aggregate
- `yarn run lint` - Run linting (includes TypeScript check, ESLint, and Prettier) | ||
- `yarn run lint:fix` - Fix linting issues automatically | ||
|
||
### Build Commands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a note here that claude should avoid running these commands as they are slow, instead prefer running test
, tsc
or lint
to validate changes rapidly. Other you might find claude running yarn package
after every file edit in rare cases.
- Computed values for derived data | ||
- Autorun for side effects | ||
|
||
## Development Notes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two easy notes that are pretty generically helpful:
IMPORTANT: never disable a lint rule or add @ts-ignore unless explicitly asked to do so by the user.
If you are unable to solve a problem without disabling a lint rule, stop and ask the user for
guidance first.
**CRITICAL: NEVER use --no-verify flag with git commands.** This bypasses pre-commit hooks that enforce code quality and can introduce broken code into the repository. Always fix the underlying issues that cause hooks to fail instead of bypassing them. If a hook is failing, address the specific linting, formatting, or test failures it identifies.
402eadb
to
6c9e17e
Compare
3b8b364
to
34c0e7f
Compare
CLAUDE.md should be shared repo-wide, though individual users can add their own user-level CLAUDE.md files to add individual preferences.
This will help our claudeguy be more efficient and accurate in its spelunking.