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 rules/neondatabase/ai-rules/neon-api-branchesgit 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-branches)<a href="https://agentmods.dev/rules/neondatabase/ai-rules/neon-api-branches"><img src="https://agentmods.dev/badge/rules/neondatabase/ai-rules/neon-api-branches.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.00013 | $0.09819 |
| Opus 5 | $0.00006 | $0.04909 |
| Sonnet 5 | $0.00003 | $0.01964 |
| Haiku 4.5 | $0.00001 | $0.00982 |
Grade A, and why
neon-api-branches 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 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.
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/branches' \ How it starts
The opening of the file, as written. The whole thing — 990 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 branches in a Neon project using the Neon API.
Manage branches
Create branch
-
Action: Creates a new branch within a specified project. By default, a branch is created from the project's default branch, but you can specify a parent branch, a point-in-time (LSN or timestamp), and attach compute endpoints.
-
Endpoint:
POST /projects/{project_id}/branches -
Path Parameters:
project_id(string, required): The unique identifier of the project where the branch will be created.
-
Body Parameters: The request body is optional. If provided, it can contain
endpointsand/orbranchobjects.endpoints(array of objects, optional): A list of compute endpoints to create and attach to the new branch.type(string, required): The endpoint type. Allowed values:read_write,read_only.autoscaling_limit_min_cu(number, optional): The minimum number of Compute Units (CU). Minimum value is0.25.autoscaling_limit_max_cu(number, optional): The maximum number of Compute Units (CU). Minimum value is0.25.provisioner(string, optional): The compute provisioner. Specifyk8s-neonvmto enable Autoscaling. Allowed values:k8s-pod,k8s-neonvm.suspend_timeout_seconds(integer, optional): Duration of inactivity in seconds before a compute is suspended. Ranges from -1 (never suspend) to 604800 (1 week). A value of0uses the default of 300 seconds (5 minutes).
branch(object, optional): Specifies the properties of the new branch.name(string, optional): A name for the branch (max 256 characters). If omitted, a name is auto-generated.parent_id(string, optional): The ID of the parent branch. If omitted, the project's default branch is used as the parent.parent_lsn(string, optional): A Log Sequence Number (LSN) from the parent branch to create the new branch from a specific point-in-time.parent_timestamp(string, optional): An ISO 8601 timestamp (e.g.,2025-08-26T12:00:00Z) to create the branch from a specific point-in-time.protected(boolean, optional): Iftrue, the branch is created as a protected branch.init_source(string, optional): The source for branch initialization.parent-data(default) copies schema and data.schema-onlycreates a new root branch with only the schema from the specified parent.expires_at(string, optional): An RFC 3339 timestamp for when the branch should be automatically deleted (e.g.,2025-06-09T18:02:16Z).
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 · 990 lines · 13 tokens per session scan A 8e714c65d1d7
neon-api-branches is a cursor rule published in the GitHub repository neondatabase/ai-rules (86 stars, last pushed 3mo ago), licensed MIT. It adds 13 tokens to every session and 9,819 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
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
as-contract-cast-smell
// ❌ WRONG — bypasses the family ContractSerializer seam const contract = JSON.parse(raw) as Contract; const contract = JSON.parse(raw) as Contract .
no-backward-compatibility
Do not add backward-compatibility shims or migration scaffolding.
sqlmodel
Satisfying the type checker when working with SQLModel.
aws-rds-best-practices
AWS RDS PostgreSQL best practices - database configuration, connection management, authentication, backup, and performance optimization standards.
database
Database rules — apply when working with database schemas, queries, migrations, or ORM models.