neon-api-keys

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

A set of rules for managing Neon API keys. An API key is a secret string that lets software authenticate with Neon.

In plain words
What is it for?
Automating API-key administration, checking existing keys, creating named keys, and revoking keys when they are no longer needed.
Why use it?
It clarifies how to list, create, and revoke keys, including the requirement for an existing personal key when creating another key through the API.

Cursor rule for Cursor ✓ vendor

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

Good fit Automating API-key administration, checking existing keys, creating named keys, and revoking keys when they are no longer needed.

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/neondatabase/ai-rules/neon-api-keys/github.svg)](https://agentmods.dev/rules/neondatabase/ai-rules/neon-api-keys)
Your own site
<a href="https://agentmods.dev/rules/neondatabase/ai-rules/neon-api-keys"><img src="https://agentmods.dev/badge/rules/neondatabase/ai-rules/neon-api-keys/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for neon-api-keys

Your own site · 80×15
<a href="https://agentmods.dev/rules/neondatabase/ai-rules/neon-api-keys"><img src="https://agentmods.dev/badge/rules/neondatabase/ai-rules/neon-api-keys.svg" alt="Reviewed on agentmods" width="80" 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 756 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.00756
Opus 5.5 $0.00008 $0.00302
Sonnet 5.5 $0.00004 $0.00151
Haiku 4.5 $0.00002 $0.00076

Measured 3mo ago against content hash 92f695136278, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

neon-api-keys 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 3mo 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/api_keys" \
neon-api-keys.mdc · 97 lines

What it actually says

Overview

This document outlines the rules for managing Neon API keys programmatically. It covers listing existing keys, creating new keys, and revoking keys.

Important note on creating API keys

To create new API keys using the API, you must already possess a valid Personal API Key. The first key must be created from the Neon Console. You can ask the user to create one for you if you do not have one.

List API keys

  • Endpoint: GET /api_keys
  • Authorization: Use a Personal API Key.

Example request:

curl "https://console.neon.tech/api/v2/api_keys" \
  -H "Authorization: Bearer $PERSONAL_API_KEY"

Example response:

[
  {
    "id": 2291506,
    "name": "my-personal-key",
    "created_at": "2025-09-10T09:44:04Z",
    "created_by": {
      "id": "487de658-08ba-4363-b387-86d18b9ad1c8",
      "name": "<USER_NAME>",
      "image": "<USER_IMAGE_URL>"
    },
    "last_used_at": "2025-09-10T09:44:09Z",
    "last_used_from_addr": "49.43.218.132,34.211.200.85"
  }
]

Create an API key

  • Endpoint: POST /api_keys
  • Authorization: Use a Personal API Key.
  • Body: Must include a key_name.

Example request:

curl https://console.neon.tech/api/v2/api_keys \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $PERSONAL_API_KEY" \
  -d '{"key_name": "my-new-key"}'

Example response:

{
  "id": 2291515,
  "key": "napi_9tlr13774gizljemrr133j5koy3bmsphj8iu38mh0yjl9q4r1b0jy2wuhhuxouzr",
  "name": "my-new-key",
  "created_at": "2025-09-10T09:47:59Z",
  "created_by": "487de658-08ba-4363-b387-86d18b9ad1c8"
}

Revoke an API key

  • Endpoint: DELETE /api_keys/{key_id}
  • Authorization: Use a Personal API Key.

Example request:

curl -X DELETE \
  'https://console.neon.tech/api/v2/api_keys/2291515' \
  -H "Authorization: Bearer $PERSONAL_API_KEY"

Example response:

{
  "id": 2291515,
  "name": "mynewkey",
  "created_at": "2025-09-10T09:47:59Z",
  "created_by": "487de658-08ba-4363-b387-86d18b9ad1c8",
  "last_used_at": "2025-09-10T09:53:01Z",
  "last_used_from_addr": "2405:201:c01f:7013:d962:2b4f:2740:9750",
  "revoked": true
}
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. 3mo ago First seen · 97 lines · 21 tokens per session scan A 92f695136278

Subscribe to this mod's changes

neon-api-keys is a cursor rule published in the GitHub repository neondatabase/ai-rules (86 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 756 once invoked, about $0.0001 per session on Opus 5.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

neon-api-keys compared with cursor rules from other repositories

neon-api-keys next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
neon-api-keysneondatabase/ai-rulesCursor rule866mo agoMITA21Cursor
ponytailDietrichGebert/ponytailCursor rule203k10d agoMITA604Cursor
angular-20angular/angularCursor rule102ktodayMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor