Agent skill

SQL Database Assistant

by alirezarezvani in alirezarezvani/claude-skills

A skill your agent uses when the user asks to write SQL queries, optimize database performance, generate migrations, explore database schemas, or work with ORMs like Prisma, Drizzle, TypeORM, or…

MITAuto-check passedDatabases

Install SQL Database Assistant

skills CLI
$ npx skills add alirezarezvani/claude-skills --skill sql-database-assistant -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-skills sql-database-assistant --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/skills/sql-database-assistant .claude/skills/sql-database-assistant && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sql-database-assistant
GitHub stars
28k
Token cost
~4k tokens
SKILL.md length
1,220 words
Files
7 (incl. scripts, references)
Skills in repo
342
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user asks to write SQL queries, optimize database performance, generate migrations, explore database schemas, or work with ORMs like Prisma, Drizzle, TypeORM, or…

  • Works in 5 steps: Identify entities — map nouns to tables → Identify relationships — map verbs to… → Identify filters — map… → …
  • The user asks to write SQL queries
  • SKILL.md covers Overview, Natural Language to SQL, Schema Exploration and Query Optimization, plus 4 more sections
  • Runs Python scripts from its folder; calls python, npx and pg_dump

What it does

SQL Database Assistant is an agent skill from alirezarezvani/claude-skills. Use when the user asks to write SQL queries, optimize database performance, generate migrations, explore database schemas, or work with ORMs like Prisma, Drizzle, TypeORM, or SQLAlchemy.

Its SKILL.md is about 4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts and reference files (for example `references/optimization_guide.md`, `references/orm_patterns.md` and `references/query_patterns.md`).

It sits in Databases, covering ORMs and data access and SQL. It works with SQL, Prisma, SQLAlchemy and TypeORM. The repository describes itself as: 380 Claude Code skills & agent skills & plugins (30+ Agents, 70+ custom commands, 380+ skills, customizable references, scripts)for Claude Code, Codex, Gemini CLI, Cursor, and 8… The licence is MIT.

When your agent uses it

  • The user asks to write SQL queries
  • Optimize database performance
  • Generate migrations
  • Explore database schemas

Example prompts

  • “/sql-database-assistant”

Requirements

  • Python 3
  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Identify entities — map nouns to tables
  2. Identify relationships — map verbs to JOINs or subqueries
  3. Identify filters — map adjectives/conditions to WHERE clauses
  4. Identify aggregations — map "total", "average", "count" to GROUP BY
  5. Identify ordering — map "top", "latest", "highest" to ORDER BY + LIMIT

What it can do on your machine

Read from SKILL.md and the folder at commit 19392f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • npx
    • pg_dump
    • mysql
    • sqlite3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

SQL Database Assistant loads about 4k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 52 tokens; SKILL.md has 1,220 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from alirezarezvani/claude-skills at commit 19392f7, republished under its MIT licence (© alirezarezvani). 1,220 words, ~3,997 tokens.

Download SKILL.mdSave it as .claude/skills/sql-database-assistant/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
sql-database-assistant
description
Use when the user asks to write SQL queries, optimize database performance, generate migrations, explore database schemas, or work with ORMs like Prisma, Drizzle, TypeORM, or SQLAlchemy.

SQL Database Assistant - POWERFUL Tier Skill

Overview

The operational companion to database design. While database-designer focuses on schema architecture and database-schema-designer handles ERD modeling, this skill covers the day-to-day: writing queries, optimizing performance, generating migrations, and bridging the gap between application code and database engines.

Core Capabilities
  • Natural Language to SQL — translate requirements into correct, performant queries
  • Schema Exploration — introspect live databases across PostgreSQL, MySQL, SQLite, SQL Server
  • Query Optimization — EXPLAIN analysis, index recommendations, N+1 detection, rewrite patterns
  • Migration Generation — up/down scripts, zero-downtime strategies, rollback plans
  • ORM Integration — Prisma, Drizzle, TypeORM, SQLAlchemy patterns and escape hatches
  • Multi-Database Support — dialect-aware SQL with compatibility guidance
Tools
ScriptPurpose
scripts/query_optimizer.pyStatic analysis of SQL queries for performance issues
scripts/migration_generator.pyGenerate migration file templates from change descriptions
scripts/schema_explorer.pyGenerate schema documentation from introspection queries

Natural Language to SQL

Translation Patterns

When converting requirements to SQL, follow this sequence:

  1. Identify entities — map nouns to tables
  2. Identify relationships — map verbs to JOINs or subqueries
  3. Identify filters — map adjectives/conditions to WHERE clauses
  4. Identify aggregations — map "total", "average", "count" to GROUP BY
  5. Identify ordering — map "top", "latest", "highest" to ORDER BY + LIMIT
Common Query Templates

Top-N per group (window function)

sql
SELECT * FROM (
  SELECT *, ROW_NUMBER() OVER (PARTITION BY department_id ORDER BY salary DESC) AS rn
  FROM employees
) ranked WHERE rn <= 3;

Running totals

sql
SELECT date, amount,
  SUM(amount) OVER (ORDER BY date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS running_total
FROM transactions;

Gap detection

sql
SELECT curr.id, curr.seq_num, prev.seq_num AS prev_seq
FROM records curr
LEFT JOIN records prev ON prev.seq_num = curr.seq_num - 1
WHERE prev.id IS NULL AND curr.seq_num > 1;

UPSERT (PostgreSQL)

sql
INSERT INTO settings (key, value, updated_at)
VALUES ('theme', 'dark', NOW())
ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value, updated_at = EXCLUDED.updated_at;

UPSERT (MySQL)

sql
INSERT INTO settings (key_name, value, updated_at)
VALUES ('theme', 'dark', NOW())
ON DUPLICATE KEY UPDATE value = VALUES(value), updated_at = VALUES(updated_at);

See references/query_patterns.md for JOINs, CTEs, window functions, JSON operations, and more.


Schema Exploration

Introspection Queries

PostgreSQL — list tables and columns

sql
SELECT table_name, column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_schema = 'public'
ORDER BY table_name, ordinal_position;

PostgreSQL — foreign keys

sql
SELECT tc.table_name, kcu.column_name,
  ccu.table_name AS foreign_table, ccu.column_name AS foreign_column
FROM information_schema.table_constraints tc
JOIN information_schema.key_column_usage kcu ON tc.constraint_name = kcu.constraint_name
JOIN information_schema.constraint_column_usage ccu ON tc.constraint_name = ccu.constraint_name
WHERE tc.constraint_type = 'FOREIGN KEY';

MySQL — table sizes

sql
SELECT table_name, table_rows,
  ROUND(data_length / 1024 / 1024, 2) AS data_mb,
  ROUND(index_length / 1024 / 1024, 2) AS index_mb
FROM information_schema.tables
WHERE table_schema = DATABASE()
ORDER BY data_length DESC;

SQLite — schema dump

sql
SELECT name, sql FROM sqlite_master WHERE type = 'table' ORDER BY name;

SQL Server — columns with types

sql
SELECT t.name AS table_name, c.name AS column_name,
  ty.name AS data_type, c.max_length, c.is_nullable
FROM sys.columns c
JOIN sys.tables t ON c.object_id = t.object_id
JOIN sys.types ty ON c.user_type_id = ty.user_type_id
ORDER BY t.name, c.column_id;
Generating Documentation from Schema

Use scripts/schema_explorer.py to produce markdown or JSON documentation:

bash
python scripts/schema_explorer.py --dialect postgres --tables all --format md
python scripts/schema_explorer.py --dialect mysql --tables users,orders --format json --json

Query Optimization

EXPLAIN Analysis Workflow
  1. Run EXPLAIN ANALYZE (PostgreSQL) or EXPLAIN FORMAT=JSON (MySQL)
  2. Identify the costliest node — Seq Scan on large tables, Nested Loop with high row estimates
  3. Check for missing indexes — sequential scans on filtered columns
  4. Look for estimation errors — planned vs actual rows divergence signals stale statistics
  5. Evaluate JOIN order — ensure the smallest result set drives the join
Index Recommendation Checklist
  • Columns in WHERE clauses with high selectivity
  • Columns in JOIN conditions (foreign keys)
  • Columns in ORDER BY when combined with LIMIT
  • Composite indexes matching multi-column WHERE predicates (most selective column first)
  • Partial indexes for queries with constant filters (e.g., WHERE status = 'active')
  • Covering indexes to avoid table lookups for read-heavy queries
Query Rewriting Patterns
Anti-PatternRewrite
SELECT * FROM ordersSELECT id, status, total FROM orders (explicit columns)
WHERE YEAR(created_at) = 2025WHERE created_at >= '2025-01-01' AND created_at < '2026-01-01' (sargable)
Correlated subquery in SELECTLEFT JOIN with aggregation
NOT IN (SELECT ...) with NULLsNOT EXISTS (SELECT 1 ...)
UNION (dedup) when not neededUNION ALL
LIKE '%search%'Full-text search index (GIN/FULLTEXT)
ORDER BY RAND()Application-side random sampling or TABLESAMPLE
N+1 Detection

Symptoms:

  • Application loop that executes one query per parent row
  • ORM lazy-loading related entities inside a loop
  • Query log shows hundreds of identical SELECT patterns with different IDs

Fixes:

  • Use eager loading (include in Prisma, joinedload in SQLAlchemy)
  • Batch queries with WHERE id IN (...)
  • Use DataLoader pattern for GraphQL resolvers
Static Analysis Tool
bash
python scripts/query_optimizer.py --query "SELECT * FROM orders WHERE status = 'pending'" --dialect postgres
python scripts/query_optimizer.py --query queries.sql --dialect mysql --json

See references/optimization_guide.md for EXPLAIN plan reading, index types, and connection pooling.


Migration Generation

Zero-Downtime Migration Patterns

Adding a column (safe)

sql
-- Up
ALTER TABLE users ADD COLUMN phone VARCHAR(20);

-- Down
ALTER TABLE users DROP COLUMN phone;

Renaming a column (expand-contract)

sql
-- Step 1: Add new column
ALTER TABLE users ADD COLUMN full_name VARCHAR(255);
-- Step 2: Backfill
UPDATE users SET full_name = name;
-- Step 3: Deploy app reading both columns
-- Step 4: Deploy app writing only new column
-- Step 5: Drop old column
ALTER TABLE users DROP COLUMN name;

Adding a NOT NULL column (safe sequence)

sql
-- Step 1: Add nullable
ALTER TABLE orders ADD COLUMN region VARCHAR(50);
-- Step 2: Backfill with default
UPDATE orders SET region = 'unknown' WHERE region IS NULL;
-- Step 3: Add constraint
ALTER TABLE orders ALTER COLUMN region SET NOT NULL;
ALTER TABLE orders ALTER COLUMN region SET DEFAULT 'unknown';

Index creation (non-blocking, PostgreSQL)

sql
CREATE INDEX CONCURRENTLY idx_orders_status ON orders (status);
Data Backfill Strategies
  • Batch updates — process in chunks of 1000-10000 rows to avoid lock contention
  • Background jobs — run backfills asynchronously with progress tracking
  • Dual-write — write to old and new columns during transition period
  • Validation queries — verify row counts and data integrity after each batch
Rollback Strategies

Every migration must have a reversible down script. For irreversible changes:

  1. Backup before execution — pg_dump the affected tables
  2. Feature flags — application can switch between old/new schema reads
  3. Shadow tables — keep a copy of the original table during migration window
Migration Generator Tool
bash
python scripts/migration_generator.py --change "add email_verified boolean to users" --dialect postgres --format sql
python scripts/migration_generator.py --change "rename column name to full_name in customers" --dialect mysql --format alembic --json

Multi-Database Support

Dialect Differences
FeaturePostgreSQLMySQLSQLiteSQL Server
UPSERTON CONFLICT DO UPDATEON DUPLICATE KEY UPDATEON CONFLICT DO UPDATEMERGE
BooleanNative BOOLEANTINYINT(1)INTEGERBIT
Auto-incrementSERIAL / GENERATEDAUTO_INCREMENTINTEGER PRIMARY KEYIDENTITY
JSONJSONB (indexed)JSONText (ext)NVARCHAR(MAX)
ArrayNative ARRAYNot supportedNot supportedNot supported
CTE (recursive)Full support8.0+3.8.3+Full support
Window functionsFull support8.0+3.25.0+Full support
Full-text searchtsvector + GINFULLTEXT indexFTS5 extensionFull-text catalog
LIMIT/OFFSETLIMIT n OFFSET mLIMIT n OFFSET mLIMIT n OFFSET mOFFSET m ROWS FETCH NEXT n ROWS ONLY
Show full SKILL.md (504 more words)Show less
Compatibility Tips
  • Always use parameterized queries — prevents SQL injection across all dialects
  • Avoid dialect-specific functions in shared code — wrap in adapter layer
  • Test migrations on target engine — information_schema varies between engines
  • Use ISO date format — 'YYYY-MM-DD' works everywhere
  • Quote identifiers — use double quotes (SQL standard) or backticks (MySQL)

ORM Patterns

Prisma

Schema definition

prisma
model User {
  id        Int      @id @default(autoincrement())
  email     String   @unique
  name      String?
  posts     Post[]
  createdAt DateTime @default(now())
}

model Post {
  id       Int    @id @default(autoincrement())
  title    String
  author   User   @relation(fields: [authorId], references: [id])
  authorId Int
}

Migrations: npx prisma migrate dev --name add_user_email Query API: prisma.user.findMany({ where: { email: { contains: '@' } }, include: { posts: true } }) Raw SQL escape hatch: prisma.$queryRaw\SELECT * FROM users WHERE id = ${userId}``

Drizzle

Schema-first definition

typescript
export const users = pgTable('users', {
  id: serial('id').primaryKey(),
  email: varchar('email', { length: 255 }).notNull().unique(),
  name: text('name'),
  createdAt: timestamp('created_at').defaultNow(),
});

Query builder: db.select().from(users).where(eq(users.email, email)) Migrations: npx drizzle-kit generate:pg then npx drizzle-kit push:pg

TypeORM

Entity decorators

typescript
@Entity()
export class User {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ unique: true })
  email: string;

  @OneToMany(() => Post, post => post.author)
  posts: Post[];
}

Repository pattern: userRepo.find({ where: { email }, relations: ['posts'] }) Migrations: npx typeorm migration:generate -n AddUserEmail

SQLAlchemy

Declarative models

python
class User(Base):
    __tablename__ = 'users'
    id = Column(Integer, primary_key=True)
    email = Column(String(255), unique=True, nullable=False)
    name = Column(String(255))
    posts = relationship('Post', back_populates='author')

Session management: Always use with Session() as session: context manager Alembic migrations: alembic revision --autogenerate -m "add user email"

See references/orm_patterns.md for side-by-side comparisons and migration workflows per ORM.


Data Integrity

Constraint Strategy
  • Primary keys — every table must have one; prefer surrogate keys (serial/UUID)
  • Foreign keys — enforce referential integrity; define ON DELETE behavior explicitly
  • UNIQUE constraints — for business-level uniqueness (email, slug, API key)
  • CHECK constraints — validate ranges, enums, and business rules at the DB level
  • NOT NULL — default to NOT NULL; make nullable only when genuinely optional
Transaction Isolation Levels
LevelDirty ReadNon-Repeatable ReadPhantom ReadUse Case
READ UNCOMMITTEDYesYesYesNever recommended
READ COMMITTEDNoYesYesDefault for PostgreSQL, general OLTP
REPEATABLE READNoNoYes (InnoDB: No)Financial calculations
SERIALIZABLENoNoNoCritical consistency (billing, inventory)
Deadlock Prevention
  1. Consistent lock ordering — always acquire locks in the same table/row order
  2. Short transactions — minimize time between first lock and commit
  3. Advisory locks — use pg_advisory_lock() for application-level coordination
  4. Retry logic — catch deadlock errors and retry with exponential backoff

Backup & Restore

PostgreSQL
bash
# Full backup
pg_dump -Fc --no-owner dbname > backup.dump
# Restore
pg_restore -d dbname --clean --no-owner backup.dump
# Point-in-time recovery: configure WAL archiving + restore_command
MySQL
bash
# Full backup
mysqldump --single-transaction --routines --triggers dbname > backup.sql
# Restore
mysql dbname < backup.sql
# Binary log for PITR: mysqlbinlog --start-datetime="2025-01-01 00:00:00" binlog.000001
SQLite
bash
# Backup (safe with concurrent reads)
sqlite3 dbname ".backup backup.db"
Backup Best Practices
  • Automate — cron or systemd timer, never manual-only
  • Test restores — untested backups are not backups
  • Offsite copies — S3, GCS, or separate region
  • Retention policy — daily for 7 days, weekly for 4 weeks, monthly for 12 months
  • Monitor backup size and duration — sudden changes signal issues

Anti-Patterns

Anti-PatternProblemFix
SELECT *Transfers unnecessary data, breaks on schema changesExplicit column list
Missing indexes on FK columnsSlow JOINs and cascading deletesAdd indexes on all foreign keys
N+1 queries1 + N round trips to databaseEager loading or batch queries
Implicit type coercionWHERE id = '123' prevents index useMatch types in predicates
No connection poolingExhausts connections under loadPgBouncer, ProxySQL, or ORM pool
Unbounded queriesNo LIMIT risks returning millions of rowsAlways paginate
Storing money as FLOATRounding errorsUse DECIMAL(19,4) or integer cents
God tablesOne table with 50+ columnsNormalize or use vertical partitioning
Soft deletes everywhereComplicates every query with WHERE deleted_at IS NULLArchive tables or event sourcing
Raw string concatenationSQL injectionParameterized queries always

Cross-References

SkillRelationship
database-designerSchema architecture, normalization analysis, ERD generation
database-schema-designerVisual ERD modeling, relationship mapping
migration-architectComplex multi-step migration orchestration
api-design-reviewerEnsuring API endpoints align with query patterns
observability-platformQuery performance monitoring, slow query alerts

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in engineering/skills/sql-database-assistant of alirezarezvani/claude-skills.

  • SKILL.md
  • references/optimization_guide.md
  • references/orm_patterns.md
  • references/query_patterns.md
  • scripts/migration_generator.py
  • scripts/query_optimizer.py
  • scripts/schema_explorer.py

Open the folder on GitHubat commit 19392f7

Compare with similar skills

SQL Database Assistant next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

SQL Database Assistant compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
SQL Database Assistant this skillalirezarezvani/claude-skills28k—~4kAutomated safety check: PassMIT
DB Review312362115/claude107—~1.8kAutomated safety check: PassMIT
Dsqlawslabs/agent-plugins912—~6.9kAutomated safety check: PassApache-2.0
Database Testingpetrkindlmann/qa-skills163—~4.2kAutomated safety check: PassMIT
Tsh SQL And Database UnderstandingTheSoftwareHouse/copilot-collections284—~11kAutomated safety check: PassMIT
Database FundamentalsDanielPodolsky/ownyourcode2901 repos~1.6kAutomated safety check: PassMIT

Similar skills

  • DB Review

    312362115/claude

    数据库代码审查 + Migration 安全检查. An agent skill from 312362115/claude.

    107 GitHub stars~1.8k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Dsql

    awslabs/agent-plugins

    Official

    Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, diagnose cluster performance, load data, and develop applications with a serverless, distributed…

    912 GitHub stars~6.9k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Database Testing

    petrkindlmann/qa-skills

    Validate database integrity, test migrations forward and backward, verify schema constraints, manage seed data, detect migration drift, and identify query performance issues.

    163 GitHub stars~4.2k tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Tsh SQL And Database Understanding

    TheSoftwareHouse/copilot-collections

    SQL writing and database engineering patterns, standards, and procedures.

    284 GitHub stars~11k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Database Fundamentals

    DanielPodolsky/ownyourcode

    Reviews schema design, SQL queries, ORM patterns. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.6k tokens
    DatabasesAuto-check passed
  • Database Expert

    cin12211/orca-q

    Database performance optimization, schema design, query analysis, and connection management across PostgreSQL, MySQL, MongoDB, and SQLite with ORM integration.

    223 GitHub stars~2.8k tokensUpdated 15 days ago
    DatabasesAuto-check passed

More from alirezarezvani/claude-skills

All 342 skills in this repo
  • Agile Product Owner

    alirezarezvani/claude-skills

    Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.

    28k GitHub starsUsed in 3 repos~3.2k tokens
    Auto-check passed
  • Product Strategist

    alirezarezvani/claude-skills

    OKR cascade toolkit for product leaders: generates aligned company-to-team OKRs from five strategy types and scores how well they line up.

    28k GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • App Store Optimization

    alirezarezvani/claude-skills

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • AWS Solution Architect

    alirezarezvani/claude-skills

    Design AWS architectures for startups using serverless patterns and IaC templates.

    28k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Campaign Analytics

    alirezarezvani/claude-skills

    Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Code to PRD

    alirezarezvani/claude-skills

    Reverse-engineers a frontend, backend or fullstack codebase into a product requirements document with per-page docs, an enum dictionary and an API inventory.

    28k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed

Categories

Questions about SQL Database Assistant

What does SQL Database Assistant do?

A skill your agent uses when the user asks to write SQL queries, optimize database performance, generate migrations, explore database schemas, or work with ORMs like Prisma, Drizzle, TypeORM, or…. SQL Database Assistant is an agent skill from alirezarezvani/claude-skills. Use when the user asks to write SQL queries, optimize database performance, generate migrations, explore database schemas, or work with ORMs like Prisma, Drizzle, TypeORM, or SQLAlchemy.

When should I use SQL Database Assistant?

SQL Database Assistant fits situations like: the user asks to write SQL queries; optimize database performance; generate migrations; explore database schemas.

How do I install SQL Database Assistant in Claude Code?

Run `npx skills add alirezarezvani/claude-skills --skill sql-database-assistant -a claude-code`. Or copy the skill folder (engineering/skills/sql-database-assistant in alirezarezvani/claude-skills) into .claude/skills/sql-database-assistant in your project. Claude Code loads it when a task matches its description.

How do I install SQL Database Assistant in Codex?

Run `npx skills add alirezarezvani/claude-skills --skill sql-database-assistant -a codex`. Or copy the skill folder (engineering/skills/sql-database-assistant in alirezarezvani/claude-skills) into .agents/skills/sql-database-assistant in your project. Codex loads it when a task matches its description.

Can I use SQL Database Assistant in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-skills --skill sql-database-assistant -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sql-database-assistant, .gemini/skills/sql-database-assistant, .github/skills/sql-database-assistant and .opencode/skills/sql-database-assistant in your project.

What does SQL Database Assistant need to run?

Going by SKILL.md and its folder, SQL Database Assistant needs Python for the scripts in its folder and the command-line tools its instructions call (python, npx, pg_dump, mysql and sqlite3). Our summary lists: Python 3; Node.js.

Does SQL Database Assistant access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is SQL Database Assistant safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does SQL Database Assistant use?

SQL Database Assistant is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does SQL Database Assistant use?

About 4k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.3k tokens, read only when the agent opens those files.

What are the alternatives to SQL Database Assistant?

Skills that share tags, products or a category with SQL Database Assistant: DB Review (312362115/claude, 107 stars), Dsql (awslabs/agent-plugins, 912 stars), Database Testing (petrkindlmann/qa-skills, 163 stars) and Tsh SQL And Database Understanding (TheSoftwareHouse/copilot-collections, 284 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains SQL Database Assistant?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-skills, which has 27,788 GitHub stars. The repository holds 342 skills in this directory. The repository was last updated on August 30, 2026.

Source: alirezarezvani/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.