neon-api-operations

neon-api-operations is a cursor rule for Cursor from neondatabase/ai-rules. It costs 21 tokens per session (1,691 once invoked), scanned A, original, MIT.

A set of rules for monitoring long-running Neon operations. These are background tasks such as creating a database branch or starting compute.

In plain words
What is it for?
Listing operations for a Neon project, paging through large result sets, and tracking background database or compute changes.
Why use it?
It helps an agent check whether an operation has finished before starting another task that depends on it.

Cursor rule for Cursor ✓ vendor

Written for Cursor: a Cursor rule (.mdc).

Good fit Listing operations for a Neon project, paging through large result sets, and…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/neondatabase/ai-rules/neon-api-operations
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.

Clone the repo
git clone --depth 1 https://github.com/neondatabase/ai-rules

Made for: Cursor.

Wrote 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.

agentmods badge for neon-api-operations

README.md
[![agentmods](https://agentmods.dev/badge/rules/neondatabase/ai-rules/neon-api-operations.svg)](https://agentmods.dev/rules/neondatabase/ai-rules/neon-api-operations)
Your own site
<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>
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 1,691 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00021 $0.01691
Opus 5 $0.00010 $0.00846
Sonnet 5 $0.00004 $0.00338
Haiku 4.5 $0.00002 $0.00169

Measured 7d ago against content hash e742a944e065, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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' \
neon-api-operations.mdc · 151 lines

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

  1. Action: Retrieves a list of operations for the specified Neon project. The number of operations can be large, so pagination is recommended.
  2. Endpoint: GET /projects/{project_id}/operations
  3. Path Parameters:
    • project_id (string, required): The unique identifier of the project whose operations you want to list.
  4. 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.
  5. Procedure:
    • Make an initial request with a limit to get the first page of results.
    • The response will contain a pagination.cursor value.
    • To get the next page, make a subsequent request including both the limit and the cursor from the previous response.

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"
  }
}

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

Subscribe to this mod's changes

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.