Invoke when implementing features, writing code, or reviewing code quality. Contains project-specific naming conventions, error handling patterns, import style, and deviations from standard practices.
Type · Core skillRules · 7Template · .claude/skills/coding-standards/SKILL.mdView on GitHub ↗
Core skill — installs for every project. Your edits to Rules, Gotchas, and Examples are preserved across re-initialization.
markdown
# Coding Standards
## Detected
<!-- Populated by scan during init. Do not edit manually. -->
## Rules
- Prefer named exports. Default exports only where the framework requires them (e.g., Next.js pages, layouts).
- Use path aliases from tsconfig when configured. Relative imports: never deeper than two levels.
- Avoid `any` — use `unknown` and narrow with type guards. `any` is acceptable only for untyped third-party boundaries. Define an interface for complex types — don't escape the type system.
- Every catch block must do something deliberate: re-throw, return a typed error, or log with context. Empty catch blocks are never acceptable. Intentional graceful degradation — catching a failure and continuing with a fallback — is fine when the degradation is logged and observable.
- Never hardcode API keys, secrets, database URLs, or credentials. Use environment variables or a secrets manager.
- Avoid disabling lint rules inline. When necessary, add a comment explaining why the disable is required.
- Explicit return types on all exported functions. Internal helpers can use inference.
## Gotchas
*Not yet captured. Add as you discover them during development.*
## Examples
*Not yet captured. Add short snippets showing the RIGHT way.*
This is the template that ships with ana init. Your project’s version will have the Detected section populated by scan and may have additional rules promoted from findings.