sqlmodel-expert — Claude Code skill: what it does, how to install
sqlmodel-expert is a Claude Code skill that guides SQLModel schema design and Alembic migrations. It helps configure table relationships and resolve N+1 query latency issues.
no license 159 installs ★ 1 updated 2026-01-27
npx skills add bilalmk/todo_correct --skill sqlmodel-expert -a claude-codeWhat sqlmodel-expert does
The skill guides the assistant through SQLModel architecture patterns. It covers relational definitions, table inheritance, and timestamp mixins. Many-to-many links require intermediate association models. The guides provide explicit patterns for them.
Query optimization is another focal area. The instructions fix N+1 query bottlenecks by applying eager loading via selectinload. The project also supplies utility scripts: scripts/migrate.sh for Alembic tasks and scripts/init_db.py for database bootstrapping.
Testing the generated migrations requires an active database connection and installed Alembic packages.
What it helps with
- define many-to-many table relationships with link models
- eliminate N+1 query bottlenecks using selectinload
- autogenerate and apply Alembic schema revisions
- configure composite keys and database indexes
Example prompts for the agent
- Set up a one-to-many relationship between
AuthorandBookmodels in SQLModel - Fix N+1 query latency in this endpoint by adding eager loading with
selectinload - Generate an Alembic migration script to add a unique constraint on user slugs
How to install sqlmodel-expert
1Skills CLI (Vercel)
npx skills add bilalmk/todo_correct --skill sqlmodel-expert -a claude-code2Manually: put the files in place
~/.claude/skills/sqlmodel-expert/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sqlmodel-expert/
1Skills CLI (Vercel)
npx skills add bilalmk/todo_correct --skill sqlmodel-expert -a codex2Manually: put the files in place
.agents/skills/sqlmodel-expert/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add bilalmk/todo_correct --skill sqlmodel-expert -a cursor2Manually: put the files in place
.cursor/skills/sqlmodel-expert/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install bilalmk/todo_correct .claude/skills/custom/sqlmodel-expert2Manually: put the files in place
.github/skills/sqlmodel-expert/SKILL.md1Skills CLI (Vercel)
npx skills add bilalmk/todo_correct --skill sqlmodel-expert -a gemini-cli2Platform CLI
gemini skills install https://github.com/bilalmk/todo_correct --path .claude/skills/custom/sqlmodel-expertManually: put the files in place
.devin/skills/sqlmodel-expert/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add bilalmk/todo_correct --skill sqlmodel-expert -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about sqlmodel-expert
How do I install sqlmodel-expert in Claude Code?
Run npx skills add bilalmk/todo_correct --skill sqlmodel-expert -a claude-code. The file will be placed in ~/.claude/skills/sqlmodel-expert/SKILL.md.
What does sqlmodel-expert do?
It provides architecture patterns for SQLModel ORM models, query eager loading strategies, and Alembic database migration workflows.
Does this skill include migration management scripts?
Yes, it references helper utilities including scripts/init_db.py for database setup and scripts/migrate.sh for common Alembic tasks.