database

database is an agent for Claude Code from nxtg-ai/forge-plugin. It costs 152 tokens per session (691 once invoked), scanned A, original, MIT.

A specialist for how an application stores and retrieves data. It covers database structure, data models, migrations, queries, and storage choices such as SQLite, JSON files, memory, or browser storage.

In plain words
What is it for?
Designing schemas, creating reversible migrations, improving queries, and deciding where configuration, session data, or relational records should live.
Why use it?
It helps prevent data rules from being left only in application code and helps choose storage that fits each use case. It also addresses slow queries and risky changes to stored data.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the TodoWrite tool.

Part of the nxtg-forge plugin — 27 skills, 24 commands, 33 agents shipped together

Good fit Designing schemas, creating reversible migrations, improving queries, and deciding where configuration, session data, or relational records should live.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nxtg-ai/forge-plugin/database
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.

Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin

Made for: Claude Code.

Or install nxtg-forge, the plugin that ships this one along with the rest of its 27 skills, 24 commands, 33 agents.

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 database

README.md
[![agentmods](https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/database/github.svg)](https://agentmods.dev/agents/nxtg-ai/forge-plugin/database)
Your own site
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/database"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/database/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 database

Your own site · 80×15
<a href="https://agentmods.dev/agents/nxtg-ai/forge-plugin/database"><img src="https://agentmods.dev/badge/agents/nxtg-ai/forge-plugin/database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 152 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 691 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.00152 $0.00691
Opus 5.5 $0.00061 $0.00276
Sonnet 5.5 $0.00030 $0.00138
Haiku 4.5 $0.00015 $0.00069

Measured 1mo ago against content hash 5b2a68fcf9c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

plugins/nxtg-forge/agents/database.md · 101 lines

How it starts

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

Forge Database Agent

You are the Forge Database Agent - the data layer specialist for NXTG-Forge.

Your Role

You design and optimize all data storage and retrieval. Your mission is to:

  • Design schemas that express business rules
  • Create safe, reversible migrations
  • Optimize queries and indexing strategies
  • Model data for performance and consistency
  • Troubleshoot data integrity issues
  • Choose appropriate storage for each use case

Data Storage in NXTG-Forge

This project currently uses:

  • JSON files for state persistence (.claude/state/)
  • In-memory stores for runtime data (activities, sessions)
  • localStorage for client-side state

When adding persistent storage, consider:

  • SQLite for structured relational data
  • JSON files for configuration and state
  • In-memory stores for ephemeral/session data

Schema Design Principles

Normalization

  • Eliminate data duplication
  • Each fact stored once
  • Foreign keys for relationships
  • Denormalize only for proven performance needs

Type Safety

// Define schemas with Zod for runtime validation
import { z } from 'zod';

const ActivitySchema = z.object({
  id: z.string().uuid(),
  type: z.enum(['agent.start', 'agent.complete', 'agent.error']),
  agentId: z.string(),
  timestamp: z.string().datetime(),
  data: z.record(z.unknown()),
});

type Activity = z.infer<typeof ActivitySchema>;

Migration Safety

  • Always create up AND down migrations
  • Never modify existing migrations
  • Test migrations on a copy of production data
  • Include data migration, not just schema changes

Query Optimization

  1. Identify slow queries - Add timing to data access
  2. Add indexes for frequently queried fields
  3. Paginate all list endpoints
  4. Cache frequently read, rarely written data
  5. Batch multiple writes into transactions

Principles

  1. Schema is documentation - Types enforce business rules
  2. Migrations are code - Version controlled, reviewed, tested
  3. Data integrity first - Constraints prevent bad data
  4. Query what you need - No SELECT *, no over-fetching
  5. Plan for growth - Index strategy scales with data

Read the full file on GitHub · 101 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. 1mo ago Changed · -36 lines · +152 tokens per session 5b2a68fcf9c3
  2. 1mo ago First seen · 137 lines · 0 tokens per session scan A 792d4de1d937

Subscribe to this mod's changes

database is an agent published in the GitHub repository nxtg-ai/forge-plugin (6 stars, last pushed 4d ago), licensed MIT. It adds 152 tokens to every session and 691 once invoked, about $0.0006 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-08-31.

Related

Other agents, from other repositories

postgresql-specialist

PostgreSQL database administration, SQL optimization, and schema management specialist with deep PostgreSQL expertise and seamless integration with the Claude Code agent ecosystem.

FortiumPartners/ensemble · 32 tokens

database-admin

Manage database schema, queries, and migrations.

nth5693/gemini-kit · 12 tokens

database-reviewer

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

sifxprime/kodelyth-ecc · 48 tokens

migration-specialist

Expert in database migrations, framework upgrades, and legacy system modernization. Use for planning and executing migrations with minimal downtime. Triggers on migrate, migration, upgrade, legacy, modernize, database migration, framework upgrade, breaking change.

hoangatg/ai-agent-toolkit · 50 tokens

database-reviewer

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

multiplex-ai/muggle-ai-teams · 48 tokens

database-architect

Expert database architect for schema design, query optimization, migrations, and modern serverless databases. Use for database operations, schema changes, indexing, and data modeling. Triggers on database, sql, schema, migration, query, postgres, index, table.

hoangatg/ai-agent-toolkit · 55 tokens