Code quality standards for writing and reviewing. Use when writing new code, reviewing PRs, refactoring, or making architectural decisions.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Apply these requirements when writing or reviewing code.
Simplicity over cleverness. Write obvious code the next developer understands immediately. Avoid premature abstractions.
Type safety is not cleverness. Use enums over magic strings, strongly-typed IDs where warranted, and proper error types over string parsing.
Conventions over configuration. Follow framework conventions and defaults. Do not invent custom patterns when standard ones exist.
Pragmatism over purity. Make practical trade-offs. Do not over-engineer for hypothetical requirements.
YAGNI. Implement only what is required. Do not add configuration for values that won't change, abstractions for single implementations, error handling for impossible states, defensive code against trusted internal callers, or features not requested.
Delete freely. Dead code, unused abstractions, and speculative features are liabilities. Remove them.
Fewer dependencies. Each package is maintenance burden. Prefer built-in framework features.
Explicit over implicit. Magic is hard to debug. Prefer clear, traceable code paths.
Use framework-provided commands for file generation:
dotnet new, dotnet add packagerails new, rails generatenpm init, npx create-*pip install, poetry initImplement the minimum required. Do not add error handling for conditions that cannot occur, resilience when infrastructure handles failures, validation for inputs guaranteed by upstream systems, or configurability for values that never change.
Before adding defensive code:
| Context | Failure Strategy |
|---|---|
| HTTP endpoints | Handle errors, return appropriate status codes |
| Background jobs | Let exceptions bubble, scheduler retries automatically |
| Idempotent operations | Safe to fail and retry |
| Internal methods | Trust callers, do not re-validate |
For background jobs, assume retry-on-failure unless told otherwise. Do not add try/catch that swallows exceptions.
Training data is outdated. Libraries evolve. Verify before implementing.
Before writing code using external packages:
Do not wrap sync methods in Task.Run() when native async exists. Do not hand-roll retry logic when libraries like Polly exist and retries are actually needed.
When uncertain about any API:
WebSearch: "[package name] [version] async methods"
WebSearch: "[package name] [version] best practices 2025"
Before reviewing, identify packages and versions, then research current best practices.
Flag: sync-over-async patterns, deprecated APIs with modern replacements, manual implementations of built-in features.
| Principle | Check |
|---|---|
| Current APIs | Modern async methods? No outdated patterns? |
| Simplicity | Obvious? Unnecessary abstractions? |
| Conventions | Following framework patterns? |
| Pragmatism | Over-engineered for hypotheticals? |
| Dead code | Anything unused to delete? |
| Dependencies | Can built-in features replace packages? |
| Priority | Description |
|---|---|
| Critical | Bugs, security issues, data loss risks |
| High | Performance problems, maintainability blockers |
| Medium | Convention violations, missing error handling |
| Low | Style preferences, minor optimizations |
Use templates/code-review.md if available. Otherwise structure as: