pREST is an API service that creates REST and Model Context Protocol endpoints for an existing or new PostgreSQL database, covering database operations, custom SQL routes, authentication, access control, and read-only MCP access. Developers use it to expose PostgreSQL data without writing a separate backend. The catalogue entries provide rules, skills, and instructions for using pREST.
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/prest/prestWrote 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/rules/prest/prest/planning-and-delegation)<a href="https://agentmods.dev/rules/prest/prest/planning-and-delegation"><img src="https://agentmods.dev/badge/rules/prest/prest/planning-and-delegation/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/rules/prest/prest/planning-and-delegation"><img src="https://agentmods.dev/badge/rules/prest/prest/planning-and-delegation.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.00912 | $0.00912 |
| Opus 5.5 | $0.00365 | $0.00365 |
| Sonnet 5.5 | $0.00182 | $0.00182 |
| Haiku 4.5 | $0.00091 | $0.00091 |
Grade A, and why
planning-and-delegation 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 7d 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 — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Planning, Parallelism & Model Selection
Applies to every task, before any edit. Complements agentic-loop.mdc (step 3) and token-optimization.mdc (§1).
1. Plan First — Always
No file edits before a written plan. Plan size scales with the task:
| Task | Plan shape |
|---|---|
| One-line / trivial fix | 1–2 lines: target + change + staffing ("1 agent, Haiku-tier") |
| Bug fix / small feature | Short numbered steps + staffing table |
| Feature, refactor, new DB engine | Full plan (all sections below) |
A full plan is as detailed as possible and contains:
- Goal & context — what and why; behavior change vs refactor; breaking-change risk.
- Files & symbols — exact paths, functions, ports, mocks to touch; existing code to reuse.
- Ordered steps — numbered, each small enough to hand to one agent without extra context.
- Dependencies — which steps block which (e.g. port change →
make mockgen→ handler). - Validation — exact commands per step (
go test ...,make test-integration-*). - Risks — auth/SQL safety, config fail-closed rules, shared globals, flaky tests.
- Staffing — see §3. The plan is not final until this section exists.
2. Parallelise by Default
- Split the plan into work units with no shared files and no ordering dependency.
- Independent units run concurrently (parallel sub-agents, batched tool calls). Run serially only when a real dependency exists — state it.
- One agent owns each file; never let two parallel agents edit the same file.
- Parallel agents that write code use isolated worktrees/branches; one integrator merges and validates.
- Typical parallel splits in pREST: per-package unit tests, per-adapter implementations (
adapters/<engine>/), per-DB integration suites (integration/<db>/), independent research/search questions. - Typical serial chains: port interface →
make mockgen→ adapter + handler → route → integration test.
3. Staffing Table (mandatory, last section of the plan)
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.
- 7d ago First seen · 66 lines · 912 tokens per session scan A e1924c59f210
planning-and-delegation is a cursor rule published in the GitHub repository prest/prest (4,623 stars, last pushed yesterday), licensed MIT. It adds 912 tokens to every session, about $0.0036 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-10-09.
Other cursor rules, from other repositories
go-service-errors
Go service error translation, nullable TIMESTAMPTZ scans, history, and side effects.
database-interaction-best-practices
Best practices when interacting with databases in backend Go code.
postgresql
This guide defines the definitive best practices for writing clean, performant, and maintainable PostgreSQL SQL, focusing on modern conventions and avoiding common pitfalls.
seed-data
Patterns for development seed data — stable UUIDs, realistic data, cross-references.
30-database-postgres
PostgreSQL and persistence rules.
neon-drizzle
Use this rules when integrating Neon (serverless Postgres) with Drizzle ORM.