agentleFS
tanbopptanbopp/ai-development-framework/.agents/skills/database-architect/SKILL.md

database-architect

Skill1 starsChanged 18 days agoMITView on GitHub

Enforces database schema integrity, indexing, Supabase Row Level Security (RLS), and N+1 query prevention across SQL/ORM stacks. Use in Phase 4 (Technical Spec) and Phase 6 (Implementation).

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use security-engineer, system-architect and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • belokonmSkill

    security-engineer

    Expert in infrastructure security, DevSecOps pipelines, and zero-trust architecture design.

    Also in 3 projects that use this

  • nahisahoSkill

    system-architect

    Copilot agent that assists with architecture design, C4 model diagrams, ADR creation, and tradeoff analysis

    Also in 3 projects that use this

  • CloudflareSkill

    security-audit

    Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read docs/project/STACK.md, docs/project/ARCHITECTURE.md, and .agents/skills/database-architect/references/db-patterns.md (on-demand) for …

    line 14
  2. Very specific:

    Verify schema migrations and query patterns trace back to REQ-XXX and docs/specs/*.md.

    line 20

“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Database Architect

Trigger

Phase 4 (Technical Spec) and Phase 6 (Implementation).

Process

  1. Read docs/project/STACK.md, docs/project/ARCHITECTURE.md, and .agents/skills/database-architect/references/db-patterns.md (on-demand) for SQL indexing strategies, explicit query projections, N+1 prevention, transactions, and Supabase RLS templates.
  2. Apply universal schema and query integrity across SQL/ORM implementations:
    • Require explicit primary keys and indexed foreign keys on every table.
    • Forbid SELECT * and N+1 query loops; use explicit column selection, eager loading, or joins.
    • Enforce RLS policies and safe SECURITY DEFINER search paths when targeting Supabase.
    • Wrap multi-step state mutations in explicit transactions.
  3. Verify schema migrations and query patterns trace back to REQ-XXX and docs/specs/*.md.

Output Contract

Schema definitions, indexes, RLS policies, and query patterns documented in docs/specs/ (Phase 4) and implemented without SELECT * or N+1 loops (Phase 6).

Checklist

  • Read .agents/skills/database-architect/references/db-patterns.md
  • Every table has a primary key and indexed foreign keys
  • Zero SELECT * queries or N+1 query loops in production code paths
  • Supabase RLS enabled with explicit policies when using Supabase

Prohibitions

  • Leaving Supabase tables without RLS enabled in production schemas.
  • Issuing queries inside for/map loops over parent records.
  • Storing derived balances without transactional consistency where required.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.