orm

orm is a skill for Claude Code from arbazkhan971/godmode. It costs 8 tokens per session (1,132 once invoked), scanned A, original, MIT.

A guide for choosing and improving object-relational mappers and database access code. An ORM is a library that represents database records as program objects, and the guide covers tools such as Prisma, Drizzle, TypeORM, SQLAlchemy, Django ORM, and GORM.

In plain words
What is it for?
Use it to compare ORMs, inspect query patterns, choose connection settings, and fix loading, transaction, or connection-pool problems.
Why use it?
It helps identify slow or excessive database queries, including N+1 problems where a list causes one extra query per item.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the godmode plugin — 132 skills, 1 command, 7 agents, 3 MCP servers shipped together

Good fit Use it to compare ORMs, inspect query patterns, choose connection settings, and fix loading, transaction, or connection-pool problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arbazkhan971/godmode/orm
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 arbazkhan971/godmode --skill orm
Clone the repo
git clone --depth 1 https://github.com/arbazkhan971/godmode

Made for: Claude Code.

Or install godmode, the plugin that ships this one along with the rest of its 132 skills, 1 command, 7 agents, 3 MCP servers.

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 orm

README.md
[![agentmods](https://agentmods.dev/badge/skills/arbazkhan971/godmode/orm/github.svg)](https://agentmods.dev/skills/arbazkhan971/godmode/orm)
Your own site
<a href="https://agentmods.dev/skills/arbazkhan971/godmode/orm"><img src="https://agentmods.dev/badge/skills/arbazkhan971/godmode/orm/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 orm

Your own site · 80×15
<a href="https://agentmods.dev/skills/arbazkhan971/godmode/orm"><img src="https://agentmods.dev/badge/skills/arbazkhan971/godmode/orm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,132 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 137
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
Origin original 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.00008 $0.01132
Opus 5 $0.00004 $0.00566
Sonnet 5 $0.00002 $0.00226
Haiku 4.5 $0.00001 $0.00113

Measured 8d ago against content hash 6dc4a3eccd92, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

orm scanned grade A with 0 findings 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/orm/SKILL.md · 149 lines

How it starts

The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Activate When

  • /godmode:orm, "which ORM", "Prisma vs Drizzle"
  • "N+1 query", "connection pool", "transaction"
  • ORM usage audit for performance issues

Workflow

1. Detect Environment

grep -r "prisma\|drizzle-orm\|typeorm\|sqlalchemy" \
  package.json requirements.txt go.mod 2>/dev/null
grep -r "include:\|select_related\|joinedload" \
  --include="*.ts" --include="*.py" -l 2>/dev/null
Language: <TS|Python|Go|Ruby|Java>
ORM: <Prisma|Drizzle|TypeORM|SQLAlchemy|Django|GORM>
Database: <PostgreSQL|MySQL|SQLite>
Connection: <direct|pooler|serverless>

2. ORM Selection

TypeScript/JavaScript:

  • Prisma: max type safety, great DX, schema-first. Heavy engine (~2MB). Best for most projects.
  • Drizzle: SQL-first, ~30KB, edge-ready. Best for performance-critical or serverless.
  • TypeORM: decorator-based, NestJS integration.

Python: SQLAlchemy 2.0 (FastAPI), Django ORM. Go: GORM, Ent, sqlc. Ruby: ActiveRecord.

IF edge/serverless: Drizzle (smallest bundle). IF max type safety: Prisma.

3. N+1 Detection & Resolution

Enable query logging, load list page, count queries. If count = 1 + N, you have N+1.

// BAD (N+1): queries in loop
const posts = await prisma.post.findMany();
for (const p of posts) {
  await prisma.user.findUnique({
    where: { id: p.authorId }
  });
}

// GOOD (1 query with JOIN)
const posts = await prisma.post.findMany({
  include: { author: true }
});

ORM equivalents: Django select_related/prefetch, SQLAlchemy joinedload/selectinload, Rails includes/eager_load, GORM Preload/Joins.

4. Connection Pooling

Formula: pool_size = (core_count * 2) + 1
Typical: 10-20 connections per instance
         | Dev  | Prod
min      | 1    | 5
max      | 5    | 20
idle_timeout | 30s | 300s

WARNING: PostgreSQL degrades above ~100 connections. Use PgBouncer/RDS Proxy for multiplexing. Coordinate: pool * instances < max_conn * 0.8.

IF pool utilization > 80%: alert and investigate.

Read the full file on GitHub · 149 lines

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. 8d ago First seen · 149 lines · 8 tokens per session scan A 6dc4a3eccd92

Subscribe to this mod's changes

orm is a skill published in the GitHub repository arbazkhan971/godmode (26 stars, last pushed 14d ago), licensed MIT. It adds 8 tokens to every session and 1,132 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. 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

mysql-tuner

Optimisation MySQL/MariaDB incluant slow query log, stratégie d'index, tuning InnoDB, réplication et monitoring. Se déclenche avec "MySQL", "MariaDB", "slow query", "InnoDB", "MySQL tuning", "requête MySQL lente. Also triggers on "MySQL slow query", "InnoDB tuning", "MariaDB performance".

khalilbenaz/claude-skills-collection · 85 tokens

database-query-optimizer

Analyse et optimise des requêtes SQL ou NoSQL pour améliorer les performances. À utiliser quand l'utilisateur a une requête lente ou veut optimiser sa base de données. Se déclenche aussi avec "requête lente", "optimiser SQL", "EXPLAIN", "index", "performance DB", "N+1", ou toute question d'optimisation de requêtes.…

khalilbenaz/claude-skills-collection · 99 tokens

frappe-errors-database

Use when handling database errors in Frappe/ERPNext. Covers DuplicateEntryError, LinkValidationError, MandatoryError, TimestampMismatchError, CharacterLengthExceededError, InReadOnlyMode, QueryTimeoutError, SQL injection errors, frappe.db.sql parameter format (% vs %s), getvalue returning None, transaction deadlocks…

Impertio-Studio/Frappe_Claude_Skill_Package · 142 tokens

cloud-sql-mysql-data

Use these skills when you need to explore your database schema, execute SQL queries to interact with your data, and inspect how MySQL plans to execute your statements.

tmolavi/mcp-agent-skills-hub · 39 tokens

oracle-sql-diagnosis

Oracle SQL workflow for backend diagnosis, support analysis, and data validation. Use when the answer depends on proving behavior through queries, checking day-by-day availability or state, validating catalog/config rows, or separating code defects from data defects.

gabrielrovesti/ai-agent-skills · 53 tokens

database-query-profiler

Profile database query profiler operations. Auto-activating skill for Performance Testing. Triggers on: database query profiler, database query profiler Part of the Performance Testing skill category. Use when working with database query profiler functionality. Trigger with phrases like "database query profiler"…

nek1987/auto-agent-harness · 64 tokens