neon-api-endpoints

A set of rules for managing Neon compute endpoints. A compute endpoint is the running service that lets an application connect to and use a Neon database branch.

In plain words
What is it for?
Creating and configuring read-write or read-only endpoints, assigning them to branches, and setting their region and scaling limits.
Why use it?
It describes how to create endpoints correctly and choose whether they can write data or only read it.

Cursor rule

Install

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.

agentmods
npx agentmods add rules/neondatabase/ai-rules/neon-api-endpoints
Clone the repo
git clone --depth 1 https://github.com/neondatabase/ai-rules
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,880 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00014 $0.05880
Opus 5 $0.00007 $0.02940
Sonnet 5 $0.00003 $0.01176
Haiku 4.5 $0.00001 $0.00588

Measured 3d ago against content hash 46f36fd10ed7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

neon-api-endpoints 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/endpoints' \
neon-api-endpoints.mdc · 562 lines

How it starts

The opening of the file, as written. The whole thing — 562 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Overview

This section provides rules for managing compute endpoints associated with branches in a project. Compute endpoints are Neon compute instances that allow you to connect to and interact with your databases.

Manage compute endpoints

Create compute endpoint

  1. Action: Creates a new compute endpoint (a Neon compute instance) and associates it with a specified branch.
  2. Endpoint: POST /projects/{project_id}/endpoints
  3. Path Parameters:
    • project_id (string, required): The unique identifier of the project.
  4. Body Parameters: endpoint (object, required): The container for the new endpoint's properties.
    • branch_id (string, required): The ID of the branch to associate the endpoint with.
    • type (string, required): The endpoint type. A branch can have only one read_write endpoint but multiple read_only endpoints. Allowed values: read_write, read_only.
    • region_id (string, optional): The region where the endpoint will be created. Must match the project's region.
    • autoscaling_limit_min_cu (number, optional): The minimum number of Compute Units (CU). Minimum 0.25.
    • autoscaling_limit_max_cu (number, optional): The maximum number of Compute Units (CU). Minimum 0.25.
    • provisioner (string, optional): The compute provisioner. Specify k8s-neonvm to enable Autoscaling. Allowed values: k8s-pod, k8s-neonvm.
    • suspend_timeout_seconds (integer, optional): Duration of inactivity in seconds before suspending the compute. Ranges from -1 (never suspend) to 604800 (1 week).
    • disabled (boolean, optional): If true, restricts connections to the endpoint.

Example Request:

curl 'https://console.neon.tech/api/v2/projects/hidden-river-50598307/endpoints' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $NEON_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "endpoint": {
    "branch_id": "br-your-branch-id",
    "type": "read_only"
  }
}'

Example Response:

Read the full file on GitHub · 562 lines

Changes

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.

  1. 3d ago First seen · 562 lines · 14 tokens per session scan A 46f36fd10ed7

Subscribe to this mod's changes

neon-api-endpoints is a cursor rule published in the GitHub repository neondatabase/ai-rules (86 stars, last pushed 3mo ago), licensed MIT. It adds 14 tokens to every session and 5,880 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.

Related

Other cursor rules, from other repositories

aws-rds

Definitive guidelines for secure, performant, and maintainable database development and operations with AWS RDS, emphasizing modern best practices and common anti-patterns.

sanjeed5/awesome-cursor-rules-mdc · 2,798 tokens

aws-dynamodb

Provides definitive best practices and actionable code examples for interacting with AWS DynamoDB using the AWS SDK v3, focusing on data modeling, performance, security, and common pitfalls.

sanjeed5/awesome-cursor-rules-mdc · 1,363 tokens

edgeone-makers-storage

KV and Blob storage services on EdgeOne Makers. KV for edge key-value pairs, Blob for file/object storage in Cloud Functions. Covers SDK usage, setup, and troubleshooting.

TencentEdgeOne/edgeone-makers-tools · 35 tokens

aws-opensearch-best-practices

AWS OpenSearch best practices - domain configuration, index management, query optimization, access control, and audit logging standards.

beettlle/pi-spine · 0 tokens

aws-rds-best-practices

AWS RDS PostgreSQL best practices - database configuration, connection management, authentication, backup, and performance optimization standards.

beettlle/pi-spine · 0 tokens

netlify-database

Zero-config Postgres for Netlify apps via @netlify/database — querying data from Functions/Edge Functions, writing schema migrations, setting up Drizzle ORM, local dev with netlify dev, database branches for deploy previews, and migrating an existing Postgres project onto Netlify. Use when adding a database, building…

netlify/context-and-tools · 106 tokens