neon-api-projects

A set of rules for managing Neon projects through its API. Neon is a hosted database platform, and a project is a container for its database resources.

In plain words
What is it for?
Automating project administration, finding project IDs, searching projects, and managing projects with Neon API requests.
Why use it?
It explains how to create, find, update, and delete Neon projects and how to handle project lists with filters and pagination.

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-projects
Clone the repo
git clone --depth 1 https://github.com/neondatabase/ai-rules
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,506 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.00021 $0.06506
Opus 5 $0.00010 $0.03253
Sonnet 5 $0.00004 $0.01301
Haiku 4.5 $0.00002 $0.00651

Measured 2d ago against content hash 5e989ea25dd5, 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-projects 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 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.

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?limit=10' \
neon-api-projects.mdc · 581 lines

How it starts

The opening of the file, as written. The whole thing — 581 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 Neon projects programmatically. It covers creation, retrieval, updates, and deletion.

Manage projects

List projects

  1. Action: Retrieves a list of all projects accessible to the account associated with the API key. This is the primary method for obtaining project_id values required for other API calls.
  2. Endpoint: GET /projects
  3. Query Parameters:
    • limit (optional, integer, default: 10): Specifies the number of projects to return, from 1 to 400.
    • cursor (optional, string): Used for pagination. Provide the cursor value from a previous response to fetch the next set of projects.
    • search (optional, string): Filters projects by a partial match on the project name or id.
    • org_id (optional, string): Filters projects by a specific organization ID.
  4. When iterating through all projects, use a combination of the limit and cursor parameters to handle pagination correctly.

Example request:

# Retrieve the first 10 projects
curl 'https://console.neon.tech/api/v2/projects?limit=10' \
  -H 'Accept: application/json' \
  -H "Authorization: Bearer $NEON_API_KEY"

Example response:

{
  "projects": [
    {
      "id": "old-fire-32990194",
      "platform_id": "aws",
      "region_id": "aws-ap-southeast-1",
      "name": "old-fire-32990194",
      "provisioner": "k8s-neonvm",
      "default_endpoint_settings": {
        "autoscaling_limit_min_cu": 0.25,
        "autoscaling_limit_max_cu": 2,
        "suspend_timeout_seconds": 0
      },
      "settings": {
        "allowed_ips": {
          "ips": [],
          "protected_branches_only": false
        },
        "enable_logical_replication": false,
        "maintenance_window": {
          "weekdays": [5],
          "start_time": "19:00",
          "end_time": "20:00"
        },
        "block_public_connections": false,
        "block_vpc_connections": false,
        "hipaa": false
      },
      "pg_version": 17,
      "proxy_host": "ap-southeast-1.aws.neon.tech",
      "branch_logical_size_limit": 512,
      "branch_logical_size_limit_bytes": 536870912,
      "store_passwords": true,
      "active_time": 0,
      "cpu_used_sec": 0,
      "creation_source": "console",
      "created_at": "2025-09-10T06:58:33Z",
      "updated_at": "2025-09-10T06:58:39Z",
      "synthetic_storage_size": 0,
      "quota_reset_at": "2025-10-01T00:00:00Z",
      "owner_id": "org-royal-sun-91776391",
      "compute_last_active_at": "2025-09-10T06:58:38Z",
      "org_id": "org-royal-sun-91776391",
      "history_retention_seconds": 86400
    }
  ],
  "pagination": {
    "cursor": "old-fire-32990194"
  },
  "applications": {},
  "integrations": {}
}

Read the full file on GitHub · 581 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. 2d ago First seen · 581 lines · 21 tokens per session scan A 5e989ea25dd5

Subscribe to this mod's changes

neon-api-projects 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 6,506 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.