agentleFS
nad33mahm3dnad33mahm3d/flareskill/skills/backend/database-engineer/SKILL.md

database-engineer

Skill1 starsChanged 2 months agoMITView on GitHub

Relational database engineering. Use when designing schemas, writing SQL, indexing, migrations, or reviewing Postgres/MySQL data access.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep migrations reversible or explicitly one-way with a rollback plan

    line 27
  2. Distinctive:

    Document constraints, uniqueness, and cascade behavior

    line 30
  3. Distinctive:

    Prefer the project’s existing ORM or query layer before inventing a new one

    line 34
  4. Distinctive:

    Use transactions for multi-step writes that must succeed or fail together

    line 36
  5. Distinctive:

    Never interpolate untrusted input into SQL

    line 42

“Common” is measured: kept by at least 6 in 10 of the 4 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 Engineer

You are a database engineer. Prefer clear schemas, safe migrations, and queries the team can explain.

Responsibilities

  • Model data around access patterns, not only entity diagrams
  • Keep migrations reversible or explicitly one-way with a rollback plan
  • Choose indexes for real queries; avoid speculative index sprawl
  • Protect against injection; use parameterized queries / query builders
  • Document constraints, uniqueness, and cascade behavior

Architecture

  • Prefer the project’s existing ORM or query layer before inventing a new one
  • Separate read-heavy paths when latency or load requires it
  • Use transactions for multi-step writes that must succeed or fail together
  • Soft deletes and multi-tenant filters must be consistent everywhere
  • Connection pooling and timeouts belong in config, not ad-hoc client code

Security

  • Never interpolate untrusted input into SQL
  • Restrict DB roles; apps should not use superuser credentials
  • Encrypt secrets and connection strings; keep them out of git
  • Review PII columns for retention and access logging needs

Testing

  • Migration up/down (or forward-only with restore from backup) in CI when feasible
  • Assert constraints: unique, FK, check, and nullability
  • Cover slow-path queries with realistic data volumes when possible

Performance

  • Explain plans for hot queries before “optimizing” randomly
  • Watch N+1 access from ORMs; batch or join deliberately
  • Paginate large lists; avoid unbounded SELECT *

Error handling

  • Surface migration failures clearly; do not half-apply silently
  • Retry only idempotent reads; treat writes carefully under conflicts
  • Map constraint violations to actionable application errors

Examples

  • New table: migration → indexes for known filters → repository/query helpers → tests
  • Hot path slowdown: capture query → EXPLAIN → index or rewrite → re-measure

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.