agent-database

A setup for running PostgreSQL, a relational database, in Docker and defining User and Todo data models with Prisma, a tool that lets application code work with the database. It also creates the initial database migration and Prisma client.

In plain words
What is it for?
Use it to prepare a local PostgreSQL database with Docker Compose, define user-to-do relationships, and create the first database migration for a to-do app.
Why use it?
It removes the manual work of installing and configuring the database and describing its tables. It gives the application a defined structure for users and to-do items before feature code is added.

Agent

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.

agentmods
npx agentmods add agents/jeftarmascarenhas/context-mesh/agent-database
Clone the repo
git clone --depth 1 https://github.com/jeftarmascarenhas/context-mesh
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 627 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00627
Opus 5 $0.00000 $0.00313
Sonnet 5 $0.00000 $0.00125
Haiku 4.5 $0.00000 $0.00063

Measured 3d ago against content hash 4d7782adab94, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-database 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 3d 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.

examples/todo-app-complete/context/agents/agent-database.md · 112 lines

How it starts

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

Agent: Database - Todo App

Purpose

Configure PostgreSQL with Docker Compose and setup Prisma schema with User and Todo models.

Context Files to Load

  • @context/decisions/003-database-schema.md
  • @context/decisions/004-dev-environment.md
  • @context/knowledge/patterns/docker-compose.md

Scope

  • Allowed: Root project, backend/prisma/
  • Prohibited: Don't implement application logic

Execution Steps

  1. Create Docker Compose

    • Create docker-compose.yml with PostgreSQL
    • Configure persistent volume
    • Set credentials: user=todoapp, password=todoapp_password, db=todoapp
  2. Create Prisma Schema

    • Configure datasource for PostgreSQL
    • Create User model (id, email, password, name, createdAt)
    • Create Todo model (id, title, description, completed, userId, createdAt)
    • Configure relations
  3. Run Migrations

    • Generate initial migration
    • Generate Prisma client

Expected Output

docker-compose.yml

services:
  postgres:
    image: postgres:15
    environment:
      POSTGRES_USER: todoapp
      POSTGRES_PASSWORD: todoapp_password
      POSTGRES_DB: todoapp
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  postgres_data:

prisma/schema.prisma

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model User {
  id        String   @id @default(uuid())
  email     String   @unique
  password  String
  name      String?
  createdAt DateTime @default(now())
  todos     Todo[]
}

model Todo {
  id          String   @id @default(uuid())
  title       String
  description String?
  completed   Boolean  @default(false)
  createdAt   DateTime @default(now())
  updatedAt   DateTime @updatedAt
  userId      String
  user        User     @relation(fields: [userId], references: [id])
}

Definition of Done

  • docker-compose.yml created
  • Prisma schema has User and Todo models
  • Relations configured correctly
  • docker-compose up -d starts PostgreSQL
  • npx prisma migrate dev runs successfully
  • npx prisma generate creates client

Read the full file on GitHub · 112 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. 3d ago First seen · 112 lines · 0 tokens per session scan A 4d7782adab94

Subscribe to this mod's changes

agent-database is an agent published in the GitHub repository jeftarmascarenhas/context-mesh (39 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 627 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-30.

Related

Other agents, from other repositories

storage

Read this file before changing SQLite, PostgreSQL, CockroachDB, DuckDB, archive resync, or storage queries.

kenn-io/agentsview · 0 tokens

database-attacker

Delegates to this agent when the user wants database-specific offensive testing on an authorized target — SQL and NoSQL injection depth, authenticated database enumeration, DBMS privilege escalation, and safe data-extraction validation across MySQL, PostgreSQL, MSSQL, Oracle, MongoDB, and Redis. Executes with…

0xSteph/pentest-ai-agents · 71 tokens

database-performance-reviewer

Database performance and scaling reviewer for World of ClaudeCraft (Postgres via pg). Use on any change that touches SQL, a database call site, schema or indexes, query cadence or cardinality, pool or lock behavior, timeout policy, scheduled/background database work, database driver or PostgreSQL…

levy-street/world-of-claudecraft · 132 tokens

database-engineer

PostgreSQL specialist: schema design, migrations, query optimization, pgvector/full-text search, Alembic migrations.

yonatangross/orchestkit · 28 tokens

database-expert-csk

PostgreSQL + EF Core + Redis data-layer expert. Applies the db-migration skill. Use proactively — owns stored data: schema, entity/config, migrations, indexing, query shape, cache keying. Any request about it is yours whatever its size or wording.

byerlikaya/claude-starter-kit · 64 tokens

database-reviewer

Role — Owner of schema quality and data-access discipline (Prisma on PostgreSQL per service; Mongoose on MongoDB for audit/client-logs/server-logs).

ihabkhaled/ClawAI · 0 tokens