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/neondatabase/ai-rulesWrote 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/neondatabase/ai-rules/neon-api-operations)<a href="https://agentmods.dev/rules/neondatabase/ai-rules/neon-api-operations"><img src="https://agentmods.dev/badge/rules/neondatabase/ai-rules/neon-api-operations.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.1 | $0.00021 | $0.01691 |
| Opus 5 | $0.00010 | $0.00846 |
| Sonnet 5 | $0.00004 | $0.00338 |
| Haiku 4.5 | $0.00002 | $0.00169 |
Grade A, and why
neon-api-operations scanned grade A 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 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl 'https://console.neon.tech/api/v2/projects/hidden-river-50598307/operations' \ How it starts
The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
This document outlines the rules for managing and monitoring long-running operations in Neon, including branch creation and compute management.
Operations
An operation is an action performed by the Neon Control Plane (e.g., create_branch, start_compute). When using the API programmatically, it is crucial to monitor the status of long-running operations to ensure one has completed before starting another that depends on it. Operations older than 6 months may be deleted from Neon's systems.
List operations
- Action: Retrieves a list of operations for the specified Neon project. The number of operations can be large, so pagination is recommended.
- Endpoint:
GET /projects/{project_id}/operations - Path Parameters:
project_id(string, required): The unique identifier of the project whose operations you want to list.
- Query Parameters:
limit(integer, optional): The number of operations to return in the response. Must be between 1 and 1000.cursor(string, optional): The cursor value from a previous response to fetch the next page of operations.
- Procedure:
- Make an initial request with a
limitto get the first page of results. - The response will contain a
pagination.cursorvalue. - To get the next page, make a subsequent request including both the
limitand thecursorfrom the previous response.
- Make an initial request with a
Example request
curl 'https://console.neon.tech/api/v2/projects/hidden-river-50598307/operations' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $NEON_API_KEY"
Example response
{
"operations": [
{
"id": "639f7f73-0b76-4749-a767-2d3c627ca5a6",
"project_id": "hidden-river-50598307",
"branch_id": "br-long-feather-adpbgzlx",
"endpoint_id": "ep-round-morning-adtpn2oc",
"action": "apply_config",
"status": "finished",
"failures_count": 0,
"created_at": "2025-09-10T12:15:23Z",
"updated_at": "2025-09-10T12:15:23Z",
"total_duration_ms": 87
},
{
"id": "b5a7882b-a5b3-4292-ad27-bffe733feae4",
"project_id": "hidden-river-50598307",
"branch_id": "br-super-wildflower-adniii9u",
"endpoint_id": "ep-ancient-brook-ad5ea04d",
"action": "apply_config",
"status": "finished",
"failures_count": 0,
"created_at": "2025-09-10T12:15:23Z",
"updated_at": "2025-09-10T12:15:23Z",
"total_duration_ms": 49
},
{
"id": "36a1cba0-97f1-476d-af53-d9e0d3a3606d",
"project_id": "hidden-river-50598307",
"branch_id": "br-super-wildflower-adniii9u",
"endpoint_id": "ep-ancient-brook-ad5ea04d",
"action": "start_compute",
"status": "finished",
"failures_count": 0,
"created_at": "2025-09-10T12:15:04Z",
"updated_at": "2025-09-10T12:15:05Z",
"total_duration_ms": 913
},
{
"id": "409c35ef-cbc3-4f1b-a4ca-f2de319f5360",
"project_id": "hidden-river-50598307",
"branch_id": "br-super-wildflower-adniii9u",
"action": "create_branch",
"status": "finished",
"failures_count": 0,
"created_at": "2025-09-10T12:15:04Z",
"updated_at": "2025-09-10T12:15:04Z",
"total_duration_ms": 136
},
{
"id": "274e240f-e2fb-4719-b796-c1ab7c4ae91c",
"project_id": "hidden-river-50598307",
"branch_id": "br-long-feather-adpbgzlx",
"endpoint_id": "ep-round-morning-adtpn2oc",
"action": "start_compute",
"status": "finished",
"failures_count": 0,
"created_at": "2025-09-10T12:14:58Z",
"updated_at": "2025-09-10T12:15:03Z",
"total_duration_ms": 4843
},
{
"id": "22ef6fbd-21c5-4cdb-9825-b0f9afddbb0d",
"project_id": "hidden-river-50598307",
"branch_id": "br-long-feather-adpbgzlx",
"action": "create_timeline",
"status": "finished",
"failures_count": 0,
"created_at": "2025-09-10T12:14:58Z",
"updated_at": "2025-09-10T12:15:01Z",
"total_duration_ms": 3096
}
],
"pagination": {
"cursor": "2025-09-10T12:14:58.848485Z"
}
}
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 · 151 lines · 21 tokens per session scan A e742a944e065
neon-api-operations is a cursor rule published in the GitHub repository neondatabase/ai-rules (86 stars, last pushed 3mo ago), licensed MIT. It adds 21 tokens to every session and 1,691 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
adapter-features
Database-specific features must be implemented in the specialized adapter only. Base adapters (postgres, mysql, etc.) must remain database-agnostic.
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
integration-tests
Human-readable integration test requests; helpers vs httptest; suites/ vs per-DB placement.
postgresql
PostgreSQL production rules. Safe migrations, parameterized queries, TIMESTAMPTZ, proper indexing strategy.
postgresql
This guide defines the definitive best practices for writing clean, performant, and maintainable PostgreSQL SQL, focusing on modern conventions and avoiding common pitfalls.
database-access
A database access pattern that separates browser reads from server-side reads and writes when using Supabase. Supabase is a hosted PostgreSQL service with rules that can restrict which users may access rows.