sql-patterns

sql-patterns is a skill for Claude Code from Nmor/the-claude-council. It costs 127 tokens per session (10,381 once invoked), scanned B, original, no licence file.

A set of conventions for writing SQL queries and designing PostgreSQL tables consistently and safely.

In plain words
What is it for?
It helps write production queries with explicit columns and joins, use common table expressions, handle NULL values, and choose consistent names for tables, timestamps, and indexes.
Why use it?
It reduces unclear queries, naming disagreements, time-zone mistakes, and database changes that are harder to review or maintain.

Skill for Claude Code

Written for Claude Code: paths in frontmatter.

Good fit It helps write production queries with explicit columns and joins, use common table expressions, handle NULL values, and choose consistent names for tables, timestamps, and indexes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nmor/the-claude-council/sql-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Nmor/the-claude-council --skill sql-patterns
Clone the repo
git clone --depth 1 https://github.com/Nmor/the-claude-council

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sql-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/nmor/the-claude-council/sql-patterns/github.svg)](https://agentmods.dev/skills/nmor/the-claude-council/sql-patterns)
Your own site
<a href="https://agentmods.dev/skills/nmor/the-claude-council/sql-patterns"><img src="https://agentmods.dev/badge/skills/nmor/the-claude-council/sql-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sql-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/nmor/the-claude-council/sql-patterns"><img src="https://agentmods.dev/badge/skills/nmor/the-claude-council/sql-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,381 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00127 $0.10381
Opus 5 $0.00063 $0.05190
Sonnet 5 $0.00025 $0.02076
Haiku 4.5 $0.00013 $0.01038

Measured 5d ago against content hash 88a2ca9e3e1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

sql-patterns scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt-get update
skills/sql-patterns/SKILL.md · 1,546 lines

The source is not reproduced here

A licence we could not identify

The repository carries a LICENSE file, but it is custom or dual enough that GitHub cannot name it and neither can this catalogue. Unknown terms are not permission, so the body is not copied here. Read the licence at the source and decide for yourself.

Read it on GitHub

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 1,546 lines · 127 tokens per session scan B 88a2ca9e3e1f

Subscribe to this mod's changes

sql-patterns is a skill published in the GitHub repository Nmor/the-claude-council (9 stars, last pushed 2d ago), with no licence file. It adds 127 tokens to every session and 10,381 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

pr-schema-audit

Audit GitHub pull requests against the live Helpdesk Postgres schema. Use when asked to check a PR, merged PR, open PR, schema drift, SQL call coverage, database variables, or PR review failures against live database shape; publishes bug-labeled issues for merged or closed failing PRs and PR conversation comments for…

anotherben/claude-harness · 79 tokens

postgresql-table-design

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.

wshobson/agents · 37 tokens

memstack-security-rls-guardian

Use this skill when creating or altering database tables in Supabase or PostgreSQL projects. Triggers include: CREATE TABLE, ALTER TABLE, migration files, 'RLS', 'row level security', 'new table', 'database schema'. Enforces Row Level Security policies on every table to prevent unauthorized data access. Do NOT use for…

cwinvestments/memstack · 84 tokens

database-patterns

DB schema design and query tuning: normalization, indexing, N+1, transactions, EXPLAIN. Triggers: schema, index, slow query, N+1, PostgreSQL, MySQL, EXPLAIN, deadlock, query plan.

softspark/ai-toolkit · 55 tokens

ring:mapping-service-resources

Mapping a Go service's Service -> Module -> Resource hierarchy for dispatch-layer registration: detects modules and per-module PostgreSQL/MongoDB/RabbitMQ resources, database names, and shared databases, generates MongoDB index migration pairs (.up.json/.down.json), detects existing Postgres migrations, emits an HTML…

LerianStudio/ring · 97 tokens

software-database-design

Designs database schemas, migrations, and data models for PostgreSQL, MySQL, MongoDB, and Redis. Use when planning tables, relationships, indexes, or ORM-backed schema changes.

vasilyu1983/AI-Agents-public · 43 tokens