Sabrina Ramonov's best practices for Claude Code development
This repository contains comprehensive guidelines for using Claude Code effectively, emphasizing maintainability, safety, and developer velocity.
Install these guidelines on any device with Claude Code:
curl -s https://raw.githubusercontent.com/ekodevapps/Claude-Code-Guidelines/main/setup.sh | bashOr manually:
git clone https://github.com/ekodevapps/Claude-Code-Guidelines.git
mkdir -p ~/.claude
cp Claude-Code-Guidelines/CLAUDE.md ~/.claude/CLAUDE.md- Before Coding: Clarifying questions and approach planning
- While Coding: TDD, naming conventions, type safety
- Testing: Unit/integration separation, assertion quality
- Database: Transaction handling and type overrides
- Code Organization: Monorepo structure guidelines
- Tooling Gates: Prettier and TypeScript requirements
- Git Standards: Conventional commits format
- Function Quality: Readability, complexity, testability analysis
- Test Quality: Strong assertions, edge cases, no trivial tests
- Property-Based Testing: Using
fast-checkfor robust test coverage
- QNEW: Initialize with best practices
- QPLAN: Analyze codebase for consistent implementation
- QCODE: Implement with tests and formatting
- QCHECK/QCHECKF/QCHECKT: Code quality reviews
- QUX: Generate UX test scenarios
- QGIT: Conventional commits and push
packages/
├── api/ # Fastify API server
│ ├── src/publisher/ # Social media integrations
│ └── test/ # Integration tests
├── web/ # Next.js 15 App Router
├── shared/ # Shared utilities (≥2 packages)
│ └── src/db-types.override.ts
└── api-schema/ # TypeBox contracts
- T-1: Colocate unit tests in
*.spec.tsfiles - T-2: Integration tests in
packages/api/test/ - T-3: Separate pure logic from DB-touching tests
- T-6: Single comprehensive assertions over multiple weak ones
describe('getCharacterCount', () => {
test('counts characters correctly for various inputs', () => {
const testCases = [
{ input: 'hello', expected: 5 },
{ input: 'hello world', expected: 11 },
{ input: '', expected: 0 }
];
testCases.forEach(({ input, expected }) => {
expect(getCharacterCount(input)).toBe(expected);
});
});
});- Scaffold stub → Write minimal function signature
- Write failing test → Red phase
- Implement → Green phase
- Refactor → Maintain quality
- ✅
prettier --checkpasses - ✅
turbo typecheck lintpasses - ✅ All tests pass
- ✅ Functions follow quality checklist
// ✅ Good: Branded types for IDs
type UserId = Brand<string, 'UserId'>
// ❌ Bad: Plain string types
type UserId = string- Readable and self-explanatory code over comments
- Low cyclomatic complexity
- Single responsibility
- Easy to test without heavy mocking
- Won't be reused elsewhere
- Doesn't improve testability significantly
- Doesn't drastically improve readability
These guidelines evolve with best practices. To update:
- Fork this repository
- Make your changes to
CLAUDE.md - Test with your projects
- Submit a pull request
MIT License - Use these guidelines freely in your projects.
Made for Claude Code developers who value quality, maintainability, and velocity 🚀