
Code Quality
For teams building databases or anything where corruption is worse than a crash. Sets strict expectations: assert liberally, make illegal states unrepresentable, crash on invalid conditions rather than continuing. The Rust patterns section is solid (exhaustive matching, enums over sentinels) and the if-statement guidance is the kind of thing you wish someone had told you earlier. Heavy emphasis on not adding features beyond what's requested, which is refreshing. The comment rules are opinionated but right: explain why, not what. Best for codebases where correctness actually matters and you can't afford subtle bugs three months down the line.
- skills.sh installs
- 1.8K
- GitHub stars
- 25.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add tursodatabase/turso --skill code-quality --agent claude-codeInstalls into .claude/skills of the current project.
Files
Code Quality Guide
Core Principle
Production database. Correctness paramount. Crash > corrupt.
Correctness Rules
- No workarounds or quick hacks. Handle all errors, check invariants
- Assert often. Never silently fail or swallow edge cases
- Crash on invalid state if it risks data integrity. Don't continue in undefined state
- Consider edge cases. On long enough timeline, all possible bugs will happen
Rust Patterns
- Make illegal states unrepresentable
- Exhaustive pattern matching
- Prefer enums over strings/sentinels
- Minimize heap allocations
- Write CPU-friendly code (microsecond = long time)
If-Statements
Wrong:
if condition {
// happy path
} else {
// "shouldn't happen" - silently ignored
}
Right:
// If only one branch should ever be hit:
assert!(condition, "invariant violated: ...");
// OR
return Err(LimboError::InternalError("unexpected state".into()));
// OR
unreachable!("impossible state: ...");
Use if-statements only when both branches are expected paths.
Comments
- Don't add code comments, except for rust
SAFETYcomments.
Avoid Over-Engineering
Sponsors
Details
- Repository
- github.com/tursodatabase/turso
- Categories
- Documentation, Code Review & Quality, Rust, Databases