skill-db

skill-db is a skill for Claude Code from marcoguillermaz/Tierward. It costs 0 tokens per session (4,911 once invoked), scanned A, original, MIT.

A database review covering table structure, indexes, relationships, access controls, and common query patterns. Row-level access control limits which records each user can see or change.

In plain words
What is it for?
It helps review schemas, foreign-key delete rules, access policies, API queries, and database metadata, with live SQL checks where supported.
Why use it?
It can expose missing indexes, unsafe record access, broken delete behavior, and inefficient queries before they cause production problems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions CLAUDE.md; mentions subagents.

Part of the tierward plugin — 29 skills, 1 command, 1 hook, 1 MCP server shipped together

Good fit It helps review schemas, foreign-key delete rules, access policies, API queries, and database metadata, with live SQL checks where supported.

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

Made for: Claude Code.

Or install tierward, the plugin that ships this one along with the rest of its 29 skills, 1 command, 1 hook, 1 MCP server.

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 skill-db

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/marcoguillermaz/tierward/skill-db"><img src="https://agentmods.dev/badge/skills/marcoguillermaz/tierward/skill-db.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,911 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.
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.00000 $0.04911
Opus 5 $0.00000 $0.02455
Sonnet 5 $0.00000 $0.00982
Haiku 4.5 $0.00000 $0.00491

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

Security

Grade A, and why

skill-db 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 9d 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.

packages/cli/templates/tier-l/.claude/skills/skill-db/SKILL.md · 254 lines

How it starts

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

Configuration (adapt before first run)

Replace these placeholders:

  • [DB_SYSTEM] - e.g. PostgreSQL, MySQL, SQLite, MongoDB
  • [ORM_OR_CLIENT] - e.g. Prisma, Drizzle, Supabase JS client, SQLAlchemy, raw SQL
  • [API_ROUTES_PATH] - path to API route files for N+1 check
  • [ACCESS_CONTROL] - e.g. row-level security policies, middleware guards, model-level scopes
  • [SITEMAP_OR_ROUTE_LIST] - file listing API routes with method, path, roles (e.g. docs/sitemap.md). Required for S1A cross-reference and Step 3 query pattern scope.

Database scope: S4 (row-level access-control) states a universal principle; its PostgreSQL instance (RLS verification SQL) lives in PATTERNS.md, and non-Postgres engines verify the equivalent guard per S4's inline guidance. The remaining live-SQL checks (Step 4: S1B/S3/S5/S6) still target PostgreSQL system tables - on a non-PostgreSQL engine, adapt them to the engine's catalog or skip with an explicit note (never a silent ✅).

Step 0 - Target resolution

Parse $ARGUMENTS for a target: token.

Pattern Meaning
target:section:<other> Resolve to matching tables in db-map.md whose name contains <other>
target:table:<tablename> Focus on a specific table and its direct FKs.
No argument Full audit - ALL tables in docs/db-map.md. Maximum depth across every schema, access-control, and query check (S1–S7).

STRICT PARSING - mandatory: derive target ONLY from the explicit text in $ARGUMENTS. Do NOT infer target from conversation context, recent work, active block names, or project memory. If $ARGUMENTS contains no target: token → full audit of the entire schema in db-map.md at maximum depth. When a target IS provided → act with maximum depth and completeness on that specific scope only.

Target scoping - comparative vs independent checks (mandatory): a subset of checks verify a schema-wide surface that cannot be partitioned by table; the rest evaluate one table, column, FK, or route file in isolation.

  • Comparative checks - full-project by design; the target: filter does NOT apply to them: S4 property 3 (no-bypass) and its live verification S4E (views without security_invoker). They MUST run across the FULL schema even when a target is given. A view or aggregate defined outside the targeted tables can still return rows the guard should hide - narrowing the bypass scan to the target subset reads as "no bypass" while the leaking view sits elsewhere in the schema.
  • Independent checks - target-safe: every other check (S1A-S1D, S2, S2b, S3, S4A-S4D, S5, S6, S7, and Step 3 Q1-Q5) evaluates a single table/column/FK/route and safely honors the target: filter per the Target filter semantics below.
  • When a target: is given: apply the filter to the independent checks only; run the comparative checks across the full schema and state in the report that they ran full-project by design.

Read the full file on GitHub · 254 lines

Files

What ships with it

2 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.

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. 9d ago First seen · 254 lines · 0 tokens per session scan A c6bd4044aaeb

Subscribe to this mod's changes

skill-db is a skill published in the GitHub repository marcoguillermaz/Tierward (4 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,911 tokens. 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-08-31.

Related

Other skills, from other repositories

jpa-patterns

JPA/Hibernate patterns and common pitfalls (N+1, lazy loading, transactions, queries). Use when user has JPA performance issues, LazyInitializationException, or asks about entity relationships and fetching strategies.

decebals/claude-code-java · 47 tokens

data-store

Govern provider-agnostic data reads and state transitions through declared data-source operations, not model-authored raw queries.

runxhq/runx · 26 tokens

harness-engineering

Use when the user asks to improve, fix, or build their repository's AI harness — AGENTS.md, rules, skills, commands, hooks, guardrails, CI sensors — or to act on harness-score audit findings and raise their maturity level.

paladini/harness-score · 55 tokens

entity-design

Design EF Core entities with navigation properties, value objects, Fluent API configuration, and audit fields. Use when creating new database entities, adding relationships, configuring owned types, designing a domain model for Entity Framework Core, or setting up table-per-hierarchy inheritance.

andresharpe/dotbot · 54 tokens

create-migration

Create and manage Entity Framework Core database migrations including schema changes, seed data, and rollback strategies. Use when adding or modifying EF Core entities, setting up a new DbContext, applying data seeding, running dotnet ef commands, or troubleshooting migration conflicts.

andresharpe/dotbot · 55 tokens

sql-analyst

Answer a bounded data question from one declared governed read; use the explicit plan runner when only a schema-validated analysis plan is wanted.

runxhq/runx · 32 tokens