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.
git clone --depth 1 https://github.com/nxtg-ai/forge-pluginWrote 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.
[](https://agentmods.dev/agents/nxtg-ai/forge-plugin/database)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
- Identify slow queries - Add timing to data access
- Add indexes for frequently queried fields
- Paginate all list endpoints
- Cache frequently read, rarely written data
- Batch multiple writes into transactions
Principles
- Schema is documentation - Types enforce business rules
- Migrations are code - Version controlled, reviewed, tested
- Data integrity first - Constraints prevent bad data
- Query what you need - No SELECT *, no over-fetching
- Plan for growth - Index strategy scales with data
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.
- 1mo ago Changed · -36 lines · +152 tokens per session 5b2a68fcf9c3
- 1mo ago First seen · 137 lines · 0 tokens per session scan A 792d4de1d937
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.
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.
database-admin
Manage database schema, queries, and migrations.
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.
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.
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.
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.