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.
npx agentmods add instructions/lvtd-llc/pgsandbox/agents-mdgit clone --depth 1 https://github.com/LVTD-LLC/pgsandboxWrote 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/instructions/lvtd-llc/pgsandbox/agents-md)<a href="https://agentmods.dev/instructions/lvtd-llc/pgsandbox/agents-md"><img src="https://agentmods.dev/badge/instructions/lvtd-llc/pgsandbox/agents-md.svg" alt="Measured on agentmods" 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 | $0.01392 | $0.01392 |
| Opus 5 | $0.00696 | $0.00696 |
| Sonnet 5 | $0.00278 | $0.00278 |
| Haiku 4.5 | $0.00139 | $0.00139 |
Grade A, and why
pgsandbox AGENTS.md 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.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PGSandbox Agent Guide
Scope
This file is the repo-level operating manual for coding agents working on
pgsandbox. Apply it to the whole repository unless a more specific
steering file says otherwise.
Project Summary
PGSandbox is a local-first MCP server that lets coding agents create, inspect, use, and delete disposable Postgres databases. The goal is to make a real isolated database the easy default for migrations, SQL validation, seeded demo states, and backend bug reproduction.
The package is a Rust native CLI and MCP stdio server. It does not install or manage Postgres itself. It targets one or more existing Postgres admin connections configured by environment variables or a JSON config file.
First Files To Read
README.mdfor user-facing install and workflow.docs/architecture.mdfor the resource model and future backend ideas.docs/mcp-tools.mdfor MCP tool contracts.docs/open-questions.mdbefore expanding scope.PRODUCT.md,TECH.md,STRUCTURE.md,VISION.md, andDESIGN.mdfor steering context.
Reliable Commands
Run these from the repo root:
npm run check
npm test
npm run build
These npm scripts delegate to Cargo. The direct equivalents are:
cargo check
cargo test
cargo build --release
Useful manual checks with the managed local runtime:
pgsandbox local status
pgsandbox doctor
pgsandbox smoke-test
Release packaging check:
npm run package:homebrew
Implementation Rules
- Keep the MCP tool surface narrow and explicit in
rust-src/mcp.rs; put database lifecycle behavior inrust-src/postgres.rs. - Preserve the distinction between admin connections and sandbox role connections. Admin connections are for lifecycle and metadata only.
- Destructive operations must only target databases recorded in the
pgsandbox_databasesmetadata table for the selected profile. - Keep TTL enforcement and
maxTtlMinutescaps intact when changing create or cleanup behavior. - Do not log full connection strings. Mask or omit passwords in user-facing output unless the tool intentionally returns sandbox credentials to the caller.
- Use
quote_identandquote_literalfromrust-src/names.rsfor generated SQL identifiers/literals. Do not interpolate identifiers by hand. - Preserve
run_sqlrow limiting and truncation behavior. New query paths should have tests that prove large result sets do not dump unbounded rows. - Prefer structured parsing and validation through Rust types, Serde, JSON, TOML, or Postgres client APIs over regex/string manipulation when practical.
- Do not make Docker a hard requirement.
docker-compose.example.ymlis only a local demo helper. - Treat the current server as local/private infrastructure. Hosted database platform work is allowed as an explicit product direction, but it needs a deliberate design for auth, tenancy, quotas, billing, and security before adding a public network admin surface.
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.
- 3d ago First seen · 164 lines · 1,392 tokens per session scan A 320b08aeb5f7
pgsandbox AGENTS.md is an instructions file published in the GitHub repository LVTD-LLC/pgsandbox (2 stars, last pushed 4d ago), licensed MIT. It adds 1,392 tokens to every session, about $0.0070 per session on Opus 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 instructions, from other repositories
supabase copilot-instructions.md
Copilot instructions for supabase/supabase, covering copilot code review instructions, review policy — read this first, confidence threshold, what not to comment on and what to comment on (priority order).
prest copilot-instructions.md
Copilot instructions for prest/prest, covering copilot instructions for prest go backend, project scope, core engineering principles, solid principles for go and s — single responsibility.
MCP-PostgreSQL-Ops copilot-instructions.md
Instructions for call518/MCP-PostgreSQL-Ops, covering architecture overview, core components, key patterns, in functions.py and development workflows.
postgres-skills AGENTS.md
Instructions for neondatabase/postgres-skills, covering agents.md, repository overview, creating a new skill, directory structure and naming conventions.
pg_exporter AGENTS.md
Instructions for nbari/pg_exporter, covering agents.md, project shape, first steps, devpod workflow (preferred) and local commands.
counterpoise-ledger CLAUDE.md
Instructions for jeffjjohnston/counterpoise-ledger, covering claude.md, project overview, development commands, essential commands and testing.