1. Habit
  2. Skills
  3. Code Quality Guide skill
tursodatabase · 2K installs

Code Quality Guide skill
Runs by itself, Rust code changes.

Changes that crash, never corrupt.

Install the Code Quality Guide skill and make it a habit: follow https://gethabit.dev/skills/tursodatabase/code-quality.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

2K installs25K starsMIT licenceSource on GitHub ↗

Code Quality Guide

by tursodatabase · 2K installs

The skill

The Code Quality Guide skill gives correctness rules and Rust patterns for a production database: assert invariants, crash over corrupt, exhaustive matches, no over-engineering and careful index ordering.

Only when you ask.

The habit

Changes that crash, never corrupt.

↻ Runs by itselfRust code changes

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one change set per run, with at most one re-scan.

  1. 01

    Read the diff

    Your agent reads the Rust change set to review.

  2. 02

    Check correctness

    It flags workarounds, swallowed errors and continuing in an invalid state, preferring a crash to corruption.

  3. 03

    Check Rust patterns

    It checks for exhaustive matches, enums over sentinels and illegal states made unrepresentable.

  4. 04

    Check if-statements

    It flags an else branch that should never be hit and suggests assert, an error or unreachable.

  5. 05

    Check over-engineering

    It flags features beyond what was asked, needless abstractions and comments on unchanged code.

  6. 06

    Check index order

    On index inserts, deletes or conflict resolution it checks the ordering against SQLite.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Code Quality Guide skill helps.

Use it when

  • ✓ reviewing Rust changes for correctness
  • ✓ checking invariants and error handling
  • ✓ checking index mutation ordering

Skip it when

  • – the code is not Rust
  • – the project is not correctness-critical

Questions

Code Quality Guide skill, answered.

Why crash over continue?

This is a production database where correctness is paramount, so crashing on an invalid state beats corrupting data.

Does it add comments?

No. The rules allow only rust SAFETY comments and no docstrings on unchanged code.

How do I install the Code Quality Guide skill?

Copy the prompt at the top into your agent. It installs the skill from tursodatabase/turso and sets up the habit. Or run npx skills add tursodatabase/turso --skill code-quality.

Is the Code Quality Guide skill free?

Yes. It is published under MIT. Habit is free too.

Code Quality Guide. Now as a habit.

Install the Code Quality Guide skill and make it a habit: follow https://gethabit.dev/skills/tursodatabase/code-quality.md

  • Free
  • No account
  • Undo in one line

All tursodatabase skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by tursodatabase, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.