neon-js

neon-js is a skill for Claude Code from neondatabase/ai-rules. It costs 49 tokens per session (1,254 once invoked), scanned A, original, MIT.

A setup workflow for Neon’s JavaScript SDK, combining user authentication with API-based database queries.

In plain words
What is it for?
Use it to build apps with authentication and data queries, migrate from Supabase, or generate typed database data.
Why use it?
It provides one documented path for applications that need both account management and database access.

Skill for Claude Code ✓ vendor

Written for Claude Code: allowed-tools in frontmatter.

Part of the neon-plugin plugin — 6 skills, 1 MCP server shipped together

Good fit Use it to build apps with authentication and data queries, migrate from Supabase, or generate typed database data.

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

Any agent
npx skills add neondatabase/ai-rules --skill neon-js
Clone the repo
git clone --depth 1 https://github.com/neondatabase/ai-rules

Made for: Claude Code.

Or install neon-plugin, the plugin that ships this one along with the rest of its 6 skills, 1 MCP server.

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-js

README.md
[![agentmods](https://agentmods.dev/badge/skills/neondatabase/ai-rules/neon-js/github.svg)](https://agentmods.dev/skills/neondatabase/ai-rules/neon-js)
Your own site
<a href="https://agentmods.dev/skills/neondatabase/ai-rules/neon-js"><img src="https://agentmods.dev/badge/skills/neondatabase/ai-rules/neon-js/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-js

Your own site · 80×15
<a href="https://agentmods.dev/skills/neondatabase/ai-rules/neon-js"><img src="https://agentmods.dev/badge/skills/neondatabase/ai-rules/neon-js.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,254 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00049 $0.01254
Opus 5.5 $0.00020 $0.00502
Sonnet 5.5 $0.00010 $0.00251
Haiku 4.5 $0.00005 $0.00125

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

Security

Grade A, and why

neon-js scanned grade A with 0 findings 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.

The scan reads SKILL.md. This mod also ships 1 executable file (templates/full-client.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

neon-plugin/skills/neon-js/SKILL.md · 112 lines

How it starts

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

Neon JS SDK Integration

Set up the unified Neon JS SDK for authentication and database queries in one package.

When to Use This Skill

  • Building apps that need both auth and database queries
  • Migrating from Supabase to Neon
  • Using PostgREST-style API for database access
  • Need type-safe database queries with generated types

Package: @neondatabase/neon-js (full SDK with auth + data API)

Need auth only? Use the neon-auth skill instead for @neondatabase/auth with a smaller bundle.

Code Generation Rules

When generating TypeScript/JavaScript code, follow these rules:

Complete reference: See Code Generation Rules for:

  • Import path handling (path aliases vs relative imports)
  • Neon package imports (subpath exports, adapter patterns)
  • CSS import strategy (Tailwind detection, single import method)
  • File structure patterns

Key points:

  • Check tsconfig.json for path aliases before generating imports
  • Use relative imports if unsure or no aliases exist
  • BetterAuthReactAdapter MUST be imported from auth/react/adapters subpath
  • Adapters are factory functions - call them with ()
  • Choose ONE CSS import method (Tailwind or CSS, not both)

Available Guides

Each guide is a complete, self-contained walkthrough with numbered phases:

  • guides/setup.md - Complete setup guide for Next.js with auth + data API

I'll automatically detect your context (package manager, framework, existing setup) and select the appropriate guide based on your request.

For troubleshooting, see the Troubleshooting Guide in references.

Quick Examples

Tell me what you're building - I'll handle the rest:

  • "Set up Neon JS for my Next.js app" -> Loads full stack guide, configures auth + data
  • "Add database queries to my auth setup" -> Configures data API client
  • "Migrate from Supabase" -> Uses SupabaseAuthAdapter for compatibility

Read the full file on GitHub · 112 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 112 lines · 49 tokens per session scan A b328c175ef63

Subscribe to this mod's changes

neon-js is a skill published in the GitHub repository neondatabase/ai-rules (86 stars, last pushed 6mo ago), licensed MIT. It adds 49 tokens to every session and 1,254 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

neon-js compared with skills from other repositories

neon-js next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
neon-jsneondatabase/ai-rulesSkill866mo agoMITA49Claude Code
event-store-designwshobson/agentsSkill43k2d agoMITA33Claude Code
platform-custom-field-generateforcedotcom/sf-skillsSkill1.2k4d agoApache-2.0A139Claude Code
durable-objectsfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A22Claude Code
field-service-sobject-create-configureforcedotcom/sf-skillsSkill1.2k4d agoApache-2.0A74Claude Code
nornicdb-grpcorneryd/NornicDBSkill937todayMITA98Claude Code, Codex
firebaseericrisco/rsc-harnessSkill695todayMITA77Claude Code, Codex