Pigsty is an open-source PostgreSQL distribution that packages database deployment, high availability, point-in-time recovery, infrastructure automation, monitoring, and PostgreSQL extensions into one platform. It is for teams that self-host PostgreSQL from laptops to datacenters.
Borrowing it
Nothing to install: this file belongs to pgsty/pigsty. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/pgsty/pigsty/main/AGENTS.mdgit clone --depth 1 https://github.com/pgsty/pigstyWrote 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/pgsty/pigsty/agents-md)<a href="https://agentmods.dev/instructions/pgsty/pigsty/agents-md"><img src="https://agentmods.dev/badge/instructions/pgsty/pigsty/agents-md/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/instructions/pgsty/pigsty/agents-md"><img src="https://agentmods.dev/badge/instructions/pgsty/pigsty/agents-md.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.05172 | $0.05172 |
| Opus 5.5 | $0.02069 | $0.02069 |
| Sonnet 5.5 | $0.01034 | $0.01034 |
| Haiku 4.5 | $0.00517 | $0.00517 |
Grade C, and why
pigsty AGENTS.md scanned grade C with 1 finding 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 2d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- rm -rf /pg/* # Delete data directories How it starts
The opening of the file, as written. The whole thing — 494 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Pigsty Production Environment - Agent Guide
Pigsty v4.5.0 | PostgreSQL RDS/DBaaS | Apache-2.0
- EN Docs: https://pigsty.io/docs
- CN Docs: https://pigsty.cc/docs
- Expert Support: https://pigsty.io/price ([email protected])
Important Files
pigsty.yml, source of truth of this deployment, always read it to understand current environment.
Sometimes the real state may drift from the config file, especially after manual changes / failover. trust by verify.
files/pki/ca/ca.key - highly sensitive CA private key. Keep it safe, never share it, don't lose it.
If pig cli is available, you can use it to perform operation command with caution. https://pigsty.io/docs/pig
Standard Operating Procedures
Before Any Change
- Identify scope: Which cluster? Which nodes?
- Check current state:
pig pg list, system status - Verify backup:
pig pb info- is backup recent? - Dry run first: Add
--checkto playbook
For Dangerous Operations
- Confirm with user - even in YOLO mode
- Verify backup exists and is recent
- Ask user to type exact target name
- Execute with explicit
-llimit flag
Incident Response
- Read logs first, understand the situation, you can get it from
/pg/log, or query victorialogs API - Check Patroni/HA status
- Do NOT take any action without user confirmation
- Recommend rollback/recovery options before executing
Permission Boundaries
ALWAYS ALLOWED (No confirmation needed)
Read-only operations:
- Read
pigsty.ymlconfiguration file - Read Ansible inventory and playbook files
- Read system monitoring metrics (CPU, memory, disk, network)
- Read PostgreSQL/Patroni cluster status via
pg list,patronictl - Read backup status via
pb info,pgbackrest info - Read service status via
systemctl status - Read logs:
/pg/log/, system journal, nginx access logs - Query monitoring dashboards and Grafana metrics
- Dry-run playbooks with
--checkflag - Read extension catalog and documentation
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.
- 2d ago Changed · +8 lines · +193 tokens per session 27cbd5bd84e7
- 2mo ago First seen · 486 lines · 4,979 tokens per session scan C e4326e8a0098
pigsty AGENTS.md is an instructions file published in the GitHub repository pgsty/pigsty (5,908 stars, last pushed 2d ago), licensed Apache-2.0. It adds 5,172 tokens to every session, about $0.0207 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
pigsty AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| pigsty AGENTS.mdpgsty/pigsty | Instructions file | 5.9k | 2d ago | Apache-2.0 | C | 5,172 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |