Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Only add information that will genuinely help future Claude sessions. The context window is precious - every line must earn its place.
## Build
`npm run build:prod` - Full production build with optimization
`npm run build:dev` - Fast dev build (no minification)Why: Saves future sessions from discovering these again.
## Gotchas
- Tests must run sequentially (`--runInBand`) due to shared DB state
- `yarn.lock` is authoritative; delete `node_modules` if deps mismatchWhy: Prevents repeating debugging sessions.
## Dependencies
The `auth` module depends on `crypto` being initialized first.
Import order matters in `src/bootstrap.ts`.Why: Architecture knowledge that isn't obvious from code.
## Testing
For API endpoints: Use `supertest` with the test helper in `tests/setup.ts`
Mocking: Factory functions in `tests/factories/` (not inline mocks)Why: Establishes patterns that work.
## Config
- `NEXT_PUBLIC_*` vars must be set at build time, not runtime
- Redis connection requires `?family=0` suffix for IPv6Why: Environment-specific knowledge.
Bad:
The `UserService` class handles user operations.The class name already tells us this.
Bad:
Always write tests for new features.
Use meaningful variable names.This is universal advice, not project-specific.
Bad:
We fixed a bug in commit abc123 where the login button didn't work.Won't recur; clutters the file.
Bad:
The authentication system uses JWT tokens. JWT (JSON Web Tokens) are
an open standard (RFC 7519) that defines a compact and self-contained
way for securely transmitting information between parties as a JSON
object. In our implementation, we use the HS256 algorithm which...Good:
Auth: JWT with HS256, tokens in `Authorization: Bearer <token>` header.For each suggested change:
File: ./CLAUDE.md
Section: Commands (new section after ## Architecture)## Architecture
...
+## Commands
+
+| Command | Purpose |
+|---------|---------|
+| `npm run dev` | Dev server with HMR |
+| `npm run build` | Production build |
+| `npm test` | Run test suite |Why this helps: The build commands weren't documented, causing confusion about how to run the project. This saves future sessions from needing to inspect
package.json.
Before finalizing an update, verify: