ClaudeGoArchitecture
Go Claude Rules
Claude rules for Go: project structure, error handling, testing, and idiomatic Go patterns.
CLAUDE.md
- Organize code by domain, not by type (handlers/, models/, repositories/) - Use the repository pattern with interfaces for testable data access - Write table-driven tests with t.Parallel() for concurrent test execution - Use slog (standard library) for structured logging with context propagation - Use sync.errgroup for concurrent operations with error collection - Avoid global state; pass dependencies through constructors - Write benchmarks with testing.B for performance-sensitive code - Use go generate for code generation; commit generated files to the repo
How to use with Claude
Create a `CLAUDE.md` file in your project root. Claude Code reads this on startup and follows your conventions throughout the session.
#go#golang#claude#architecture#coding-rules
Related Rules
React Claude Rules
ClaudeReact
Claude rules for React: component design, state patterns, performance, and testing conventions in CLAUDE.md.
Architecture
react · claudeCopy Ready
Next.js Claude Rules
ClaudeNext.js
Claude rules for Next.js App Router: streaming, server actions, caching, and production deployment patterns.
Architecture
nextjs · claudeCopy Ready
Rust Claude Rules
ClaudeRust
Claude rules for Rust: zero-cost abstractions, async with Tokio, error types, and high-performance Rust patterns.
Performance
rust · tokioCopy Ready
SQL Claude Rules
ClaudeSQL
Claude rules for SQL and database design: schema conventions, query patterns, and migration safety.
Database
sql · databaseCopy Ready