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.
npx skills add j4flmao/agent-skills --skill database-patternsgit clone --depth 1 https://github.com/j4flmao/agent-skillsWrote 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.
[](https://agentmods.dev/skills/j4flmao/agent-skills/database-patterns)<a href="https://agentmods.dev/skills/j4flmao/agent-skills/database-patterns"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/database-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.
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/database-patterns"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/database-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
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 →
- medium Prompt Injection · line 396 Subtle instructions detected that may alter agent decision-making or introduce hidden biases.Fix: Review content for implicit steering or bias. Ensure instructions are explicit and align with the skill's stated purpose.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00076 | $0.03602 |
| Opus 5.5 | $0.00030 | $0.01441 |
| Sonnet 5.5 | $0.00015 | $0.00720 |
| Haiku 4.5 | $0.00008 | $0.00360 |
Grade A, and why
backend-database-patterns 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 16d 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.
How it starts
The opening of the file, as written. The whole thing — 414 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backend Database Patterns
Purpose
Design efficient, maintainable database schemas and queries. Every schema change must be backward-compatible. Every query must be verifiable with EXPLAIN ANALYZE.
Agent Protocol
Trigger
Exact user phrases: "database design", "schema design", "query optimization", "slow query", "migration", "index", "ORM pattern", "repository pattern", "N+1 problem", "transaction", "table design", "data model".
Input Context
Before activating, verify:
- The database type is known (PostgreSQL, MySQL, MongoDB, SQLite).
- The ORM or query framework is known (TypeORM, Prisma, SQLAlchemy, Diesel, GORM, Spring Data JDBC/JPA).
- The specific schema, query, or problem is described.
Output Artifact
No file output unless requested. Produces text guidance.
Response Format
Schema design:
## {entity}
| Field | Type | Constraints | Index |
|-------|------|-------------|-------|
Query fix:
## Problem: {description}
Root cause: {specific cause}
Fix: {specific change}
Verification: EXPLAIN ANALYZE {query}
Migration:
## Migration: {description}
Up: {SQL}
Down: {SQL}
Backward-compatible: {yes/no}
Completion Criteria
- Schema design follows normalization principles (3NF by default).
- Indexes are specified for every foreign key and filtered column.
- N+1 queries are identified and fixed.
- Migration includes up AND down scripts.
- Migration is verified to be backward-compatible.
- Transaction boundaries are documented.
Max Response Length
Schema: unlimited. Query fix: 6 lines. Migration: 10 lines.
Architecture Decision Tree
Normalize or Denormalize?
Is the data write-heavy with complex relationships?
├── Yes → Normalize (3NF by default)
└── No → Is there a proven read performance problem (profiled)?
├── Yes → Denormalize (with documented trade-offs)
└── No → Normalize first, optimize later
Primary Key Choice
Is the system single-node with no sharding?
├── Yes → BIGSERIAL (auto-increment)
└── No → Is time-sortable ordering needed?
├── Yes → UUID v7 (time-ordered, distributed-safe)
└── No → UUID v4 (random, distributed-safe)
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/connection-pooling.md 18 KB
- references/database-fundamentals.md 6.4 KB
- references/database-migration-patterns.md 6.6 KB
- references/database-sharding.md 7.8 KB
- references/database-testing.md 7.0 KB
- references/migration-guide.md 2.7 KB
- references/migration-strategies.md 15 KB
- references/query-optimization.md 1.5 KB
- references/table-design-rules.md 19 KB
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.
- 16d ago Changed · +1 lines · -60 tokens per session b1d8593f226a
- 17d ago Changed 5a9ada14f46b
- 1mo ago Changed · -123 lines 835c043c4178
- 3mo ago First seen · 536 lines · 136 tokens per session scan A 9785fc2294cd
backend-database-patterns is a skill published in the GitHub repository j4flmao/agent-skills (47 stars, last pushed 17d ago), licensed MIT. It adds 76 tokens to every session and 3,602 once invoked, about $0.0003 per session on Opus 5.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.
backend-database-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| backend-database-patternsj4flmao/agent-skills | Skill | 47 | 17d ago | MIT | A | 76 | Claude Code, Codex |
| event-store-designwshobson/agents | Skill | 43k | 2d ago | MIT | A | 33 | Claude Code |
| platform-custom-field-generateforcedotcom/sf-skills | Skill | 1.2k | 7d ago | Apache-2.0 | A | 139 | Claude Code |
| field-service-sobject-create-configureforcedotcom/sf-skills | Skill | 1.2k | 7d ago | Apache-2.0 | A | 74 | Claude Code |
| nornicdb-grpcorneryd/NornicDB | Skill | 936 | today | MIT | A | 98 | Claude Code, Codex |
| firebaseericrisco/rsc-harness | Skill | 707 | 2d ago | MIT | A | 77 | Claude Code, Codex |
| azure-resource-manager-sql-dotnetbenjaminasterA/antigravity-awesome-skills | Skill | 527 | yesterday | MIT | A | 0 | Claude Code, Codex |