sql-review
Use when SQL is written, changed, or reviewed against the database standards — triggers on "/sql-review", "review this SQL", "check this migration", "audit…
Skill by Esequiel378
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/esequiel378-sql-review
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, security, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sql-review
What's inside
- Skill name
sql-review- Description
- Use when SQL is written, changed, or reviewed against the database standards — triggers on "/sql-review", "review this SQL", "check this migration", "audit this schema", "does this follow our conventions", when the user asks to write or alter a table, index, view, query, or migration, or when a diff touches sqlc.yaml or sqlc-generated code.
- License
- MIT
- Instructions
- 321 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# SQL Review
Hold all SQL — new or existing — to the standards below. One checklist drives
both modes: reviewing flags deviations, writing avoids them from the start.
## Modes
**Review mode** — the user hands over existing SQL.
1. If a file path, diff, or migration was named, read it. Otherwise ask the
user to paste the SQL.
2. Work through every checklist section below.
3. Report findings in the output format at the end.
4. If the SQL is clean, say so explicitly. Do not invent findings.
**Write mode** — the user asks for new or changed SQL.
1. Write the SQL with the checklist as constraints.
2. Self-review the result against every section.
3. Show the SQL. Name any standard you bent and why.
---
## Checklist
### Naming conventions
**Tables**
- [ ] `snake_case` only
- [ ] Plural nouns (`users`, `lab_orders`, not `user` or `labOrder`)
- [ ] No version suffixes (`v2`, `new_`, `_old`)
- [ ] Max 50 characters
- [ ] Business terminology, not source-system terminology
**Columns**
- [ ] `snake_case` only
- [ ] Primary key **must** be named `{table_singular}_id` — `id` is never
acceptable (e.g. `organizations.organization_id`, `orders.order_id`,
`ticket_tiers.ticket_tier_id`). Every table using `id` is a HIGH finding.
- [ ] Foreign keys named `{referenced_table_singular}_id`
- [ ] Timestamps use `{event}_at` past-tense format (`created_at`,
`updated_at`, `deleted_at`)
- [ ] Dates use `{event}_date` format (`order_date`, not `date_order`)
- [ ] Booleans prefixed with `is_` or `has_` (`is_active`, `has_results`)
- [ ] Price/currency fields: decimal format (`19.99`) unless using cents
suffix (`price_in_cents`)
- [ ] No abbreviations (`uid` → `user_id`, `usr_demo` → `user_demographics`)
- [ ] No reserved words as column names
- [ ] Max 50 characters
**Indexes**
- [ ] Regular indexes: `idx_{table}_{columns}`
- [ ] Unique indexes: `uidx_{table}_{columns}`
- [ ] Max 63 characters total
**Views / Materialized views**
- [ ] Views prefixed `v_`
- [ ] Materialized views prefixed `mv_`
**Named queries** (sqlc `-- name:`, and any other place a query gets a name)
- [ ] `{Entity}{Action}`, entity first — `UsersList`, `UsersGet`, not
`ListUsers`, not `GetUser`
- [ ] The entity is the table name, in the same plural the table uses:
`UsersList`, not `UserList`
- [ ] The action is a verb, and may carry a qualifier: `UsersListActive`,
`OrdersDeleteForCustomer`
- [ ] A query spanning tables takes the entity it reads from, or writes to
when it writes
Entity first so every query against one table shares a prefix. That is what
makes them sort together in `queries.sql`, in the generated method set, and in
an editor's autocomplete — `Users` shows the whole surface for that table.
Verb-first scatters them: `ListUsers` sorts under L, next to `ListOrders`,
which is a neighbour it has nothing to do with.
---
### Column ordering
Columns appear in this order within a `CREATE TABLE`:
1. IDs (primary key first, then foreign keys)
2. Strings (text, enums, varchars)
3. Numerics (amounts, counts, measurements)
4. Booleans
5. Dates (date-only fields)
6. Timestamps (datetime fields)
---
### Data types
- [ ] All timestamps use `TIMESTAMPTZ`, never bare `TIMESTAMP`
- [ ] Primary keys are UUID (`gen_random_uuid()`), or SERIAL for internal
lookup tables
- [ ] Categorical / constrained values use a custom `ENUM` type or a `CHECK`
constraint — not bare `VARCHAR` with no validation
- [ ] ZIP codes: `VARCHAR(5)` with `CHECK (zip_code ~ '^[0-9]{5}$')`
- [ ] States: `us_state_type` enum
- [ ] Gender: `gender_type` enum
- [ ] Flexible structured data: `JSONB`, not `JSON` or `TEXT`
---
### Constraints and integrity
- [ ] Every table has a primary key
- [ ] Foreign keys are explicitly declared (or noted as analytics schema
where omitted intentionally)
- [ ] NOT NULL applied to columns that must always have a value
- [ ] Default values provided where sensible (`DEFAULT NOW()`,
`DEFAULT false`)
- [ ] JSON columns have a `CHECK (jsonb_typeof(...) = 'object')` constraint
where structure matters
---
### Audit fieldsFrom Esequiel378/skills, MIT.
More from Esequiel378/skills
- 0.565score
pr-describe
Esequiel378
Use when writing or reviewing the body of a pull request — after `gh pr create`, when filling in an empty PR description, or when asked whether a PR body says…
SkillAFreshness: AClaude Code +9 - 0.565score
release-scaffold
Esequiel378
Use when a project needs a release process, versioned downloads, or a "Release" button — triggers on "/release-scaffold", "add a release process", "set up…
SkillAFreshness: AClaude Code +9 - 0.561score
architecture-improve
Esequiel378
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
SkillAFreshness: AClaude Code +9 - 0.539score
pr-review
Esequiel378
Use when the user wants a diff or PR reviewed from every angle at once — triggers on "/pr-review", "review this PR", "review my changes", "full review", or…
SkillAFreshness: AClaude Code +9 - 0.539score
codebase-design
Esequiel378
Shared vocabulary for designing deep modules.
SkillAFreshness: AClaude Code +9 - 0.530score
retro
Esequiel378
Conduct a retrospective on a coding session.
SkillAFreshness: AClaude Code +9 - 0.524score
prompt-improve
Esequiel378
Use when the user hands you a rough, vague, or messy prompt and wants it sharpened before acting — triggers on "improve this prompt", "fix my prompt"…
SkillBFreshness: BClaude Code +9 - 0.524score
prompt-improve-review
Esequiel378
Use to run the periodic analysis + tuning pass over the prompt-improve run log — triggers on "/prompt-improve-review", "review my prompt log", "tune…
SkillBFreshness: BClaude Code +9 - 0.524score
pr-review-sl
Esequiel378
Use when the user asks for a PR or diff review in the "sl" style — "sl review", "/pr-review-sl", "review this like sl" — a terse staff-architect pass that…
SkillBFreshness: BClaude Code +9 - 0.524score
commit-write
Esequiel378
Use when writing a commit message or a PR title — before `git commit`, before `gh pr create`, when renaming an existing PR, or when checking whether a commit…
SkillBFreshness: BClaude Code +9 - 0.524score
domain-modeling
Esequiel378
Use when building or sharpening a project's domain model — triggers on "/domain-modeling", discussing codebase terminology, naming a new concept, resolving…
SkillBFreshness: BClaude Code +9 - 0.524score
plan-map
Esequiel378
Use when a chunk of work is too big to hold in one agent session and the way to the end isn't visible yet — triggers on "/plan-map", "chart a map", "this is…
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 25, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Esequiel378/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Esequiel378
- 0.565score
release-scaffold
Esequiel378
Use when a project needs a release process, versioned downloads, or a "Release" button — triggers on "/release-scaffold", "add a release process", "set up…
SkillAFreshness: AClaude Code +9 - 0.565score
pr-describe
Esequiel378
Use when writing or reviewing the body of a pull request — after `gh pr create`, when filling in an empty PR description, or when asked whether a PR body says…
SkillAFreshness: AClaude Code +9 - 0.561score
architecture-improve
Esequiel378
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
SkillAFreshness: AClaude Code +9 - 0.539score
codebase-design
Esequiel378
Shared vocabulary for designing deep modules.
SkillAFreshness: AClaude Code +9 - 0.539score
pr-review
Esequiel378
Use when the user wants a diff or PR reviewed from every angle at once — triggers on "/pr-review", "review this PR", "review my changes", "full review", or…
SkillAFreshness: AClaude Code +9 - 0.530score
retro
Esequiel378
Conduct a retrospective on a coding session.
SkillAFreshness: AClaude Code +9
Cite this page
sql-review skill. Agent Mart. https://agentmart.dev/skills/esequiel378-sql-review (last updated 2026-10-24)