Official agent skill

Neon Auth

by neondatabase in neondatabase/agent-skills

Add authentication to a new app. An agent skill from neondatabase/agent-skills.

OfficialApache-2.0Auto-check passedBackend & APIs

Install Neon Auth

skills CLI
$ npx skills add neondatabase/agent-skills --skill neon-auth -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install neondatabase/agent-skills neon-auth --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/neondatabase/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/neon-auth .claude/skills/neon-auth && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
neon-auth
GitHub stars
100
Token cost
~3.1k tokens
SKILL.md length
1,452 words
Files
3 (incl. references)
Skills in repo
8
Repo updated
First seen
Licence
Apache-2.0

At a glance

Add authentication to a new app. An agent skill from neondatabase/agent-skills.

  • Neon Auth (Managed Better Auth)
  • SKILL.md covers When to Use, What It Does, Availability and Managed setup, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Identity routing

What it does

Neon Auth is an agent skill from neondatabase/agent-skills, published by the product's own GitHub organization. Add authentication to a new app. Use for "add auth", "add login", Neon Auth (Managed Better Auth), identity routing, sign-up, sign-in, password reset, email OTP, magic links, organizations, phone OTP, OAuth, passkeys, MFA, trusted domains, invalid domain, and @neondatabase/auth. No existing identity: default to Managed Better Auth. Keep working Better Auth, Clerk, Supabase Auth, or another IdP. User asked to migrate from Supabase Auth: Managed Better Auth. A required plugin outside Managed support: self-managed…

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/managed-auth.md` and `references/self-managed.md`).

It sits in Backend & APIs, covering Authentication and OAuth and OpenID Connect. It works with Neon, Supabase, Better Auth and PostgreSQL. The repository describes itself as: Agent Skills for Neon Severless Postgres. The licence is Apache-2.0.

When your agent uses it

  • Neon Auth (Managed Better Auth)
  • Identity routing
  • Trusted domains
  • @neondatabase/auth

Example prompts

  • “add auth”
  • “add login”
  • “/neon-auth”

What it can do on your machine

Read from SKILL.md and the folder at commit bfd013c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • neon.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Neon Auth loads about 3.1k tokens when it runs, and up to ~5.9k if it reads all its reference files. Until then it costs about 158 tokens; SKILL.md has 1,452 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~158
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from neondatabase/agent-skills at commit bfd013c, republished under its Apache-2.0 licence (© neondatabase). 1,452 words, ~3,099 tokens.

Download SKILL.mdSave it as .claude/skills/neon-auth/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
neon-auth
description
Add authentication to a new app. Use for "add auth", "add login", Neon Auth (Managed Better Auth), identity routing, sign-up, sign-in, password reset, email OTP, magic links, organizations, phone OTP, OAuth, passkeys, MFA, trusted domains, invalid domain, and @neondatabase/auth. No existing identity: default to Managed Better Auth. Keep working Better Auth, Clerk, Supabase Auth, or another IdP. User asked to migrate from Supabase Auth: Managed Better Auth. A required plugin outside Managed support: self-managed Better Auth on a Neon Function or the existing app host. Also use for auth APIs in @neondatabase/neon-js.
metadata.parent
neon
metadata.source
https://github.com/neondatabase/agent-skills/tree/main/skills/neon-auth

FIRST: Use the parent neon skill for a Neon overview, getting started with Neon, Neon development best practices, and more.

If the neon skill is not installed, fetch it from https://neon.com/docs/ai/skills/neon/SKILL.md or install it with:

bash
neon skills -s neon -y

Neon Auth

Neon Auth is Managed Better Auth: users, sessions, and auth config live in the neon_auth schema on the branch's Lakebase Postgres, and auth state branches with the database. The client API is the Better Auth method set (signIn.email, signIn.social, getSession) through @neondatabase/auth. That wrapper is not a drop-in for bare better-auth/client: it pins the plugin list and adds Neon-specific OAuth verifier, iframe popup, and JWT handling. Stay on the wrapper while Auth is managed.

This skill chooses identity, then implements Managed Better Auth. It does not replace a working auth server in order to use Postgres, Functions, Object Storage, or the AI Gateway.

When to Use

Inspect existing identity and the required login features before provisioning. A supplied DATABASE_URL is not a reason to change identity. Adding a Neon Function is not a reason to change identity.

SituationWhat to do
No existing authDefault to Managed Better Auth. Managed setup, then references/managed-auth.md.
Needs a feature Managed does not offerSelf-managed Better Auth on the existing app host (Vercel or similar) or a Neon Function. Keep Lakebase Postgres. Confirm the installed Better Auth version documents that exact flow before recommending the move. If support stays unresolved, keep the current identity. references/self-managed.md.
Already has Better AuthKeep it. It works with the other Neon primitives. Migrate to Managed only if the user asks.
User asked to migrate from Supabase AuthManaged Better Auth. Supabase Auth. Moving only Postgres or adding a Function keeps Supabase Auth.
Clerk, Auth.js, Supabase Auth, or another working IdPKeep it unless the user asks to migrate.

Google, GitHub, and Vercel social OAuth are offered on Managed Auth. They are not a reason to leave Managed Auth. Other OAuth providers, generic OAuth, MFA, passkeys, API keys, MCP OAuth, SSO, custom plugins, hooks, and custom JWT claims are the plugin matrix check.

Before enabling Managed Auth, confirm the project is on AWS and does not use IP Allow or Private Networking. Leave those protections in place.

Configure supported Managed plugins through Neon (Console, API, or neon neon-auth), not by passing plugins into @neondatabase/auth. Enabling auth: true is not implementing login.

What It Does

  • Managed identity in Postgres — users and sessions in neon_auth, queryable with SQL, compatible with RLS.
  • Auth emails without an app mailer — verification, email OTP, magic links, and password reset. Getting started uses shared SMTP (auth@mail.myneon.app). You do not add Resend or SendGrid to implement login. Production needs custom SMTP: https://neon.com/docs/auth/production-checklist.md
  • Branches with the database — each branch has its own Auth URL and isolated auth state.
  • Better Auth client methods via the Neon SDK — @neondatabase/auth (auth only) or @neondatabase/neon-js/auth (combined SDK). Optional UI: @neondatabase/auth-ui.
  • Fixed plugin set — the Managed client does not accept a plugins option. See plugin support.

Availability

Managed Better Auth is generally available. AWS regions only. It cannot be enabled on a project with IP Allow or Private Networking.

Organization is separately Partial / Beta. Hosting self-managed Better Auth in a Neon Function follows Functions availability and claim rules; use the neon-functions skill for that host. An unclaimed project that can enable Auth still cannot use Functions until claim.

Managed setup

Merge Auth into the existing neon.ts. Do not replace other fields:

typescript
import { defineConfig } from "@neon/config/v1";

export default defineConfig({
  auth: true,
});
bash
neon deploy
neon neon-auth status

If Function env in that config reads process.env, use neon deploy --env <file> as the parent skill describes. The manual service command is neon neon-auth enable; do not run both enable and deploy as redundant required steps when neon.ts already declares auth: true.

Then implement login: references/managed-auth.md.

Claimable projects: follow the parent Claimable path, then auth: true and neon deploy when login is requested and no existing provider should be preserved.

Supabase Auth

When the user asked to migrate login from Supabase Auth, recommend Managed Better Auth and follow https://neon.com/docs/auth/migrate/from-supabase.md. Moving only Postgres or adding a Function is not that request: keep Supabase Auth.

SupabaseAuthAdapter() keeps method shapes such as signInWithPassword and signInWithOAuth. Those calls are not interchangeable with default Better Auth examples (signIn.email). Keep an existing adapter caller on that API.

Inventory the auth methods and database calls actually used:

  • Password hashes cannot transfer. Users create new accounts or sign in with OAuth.
  • Do not promise unchanged user IDs, sessions, or account linking. Plan application foreign keys with the owner.
  • updateUser() cannot change email or password on Managed Auth. Email verification needs application UI (codes work on shared SMTP; links need custom SMTP).
  • The migration guide lists Supabase phone/SMS/WhatsApp, SAML, and Web3 as unsupported on Managed Auth. Confirm the installed Better Auth version if the user still needs that exact flow; if support stays unresolved, keep Supabase Auth and stop the auth cutover. That page's "no phone auth" claim is about Supabase phone sign-in, not the constrained Managed Phone Number plugin (existing users link a number).
  • @supabase/supabase-js used only for Auth does not justify enabling the Data API. Keep Data API only for existing PostgREST / Supabase database-client queries.
Show full SKILL.md (608 more words)Show less

Verification

Managed path: sign-up, sign-in, sign-out, session restoration after reload, and protected access, including error and loading states. Exercise email verification (code on shared SMTP) when it is on. Report any flow that remains unverified.

A required plugin on the self-managed path is verified in that app's Better Auth setup, not as a Managed flow.

Plugin support

Checked 2026-09-17 against https://neon.com/docs/auth/guides/plugins.md, https://neon.com/docs/auth/roadmap.md, and the @neondatabase/auth client plugin list. Re-fetch those pages if this skill may be stale. An unlisted upstream plugin needs a live check; do not treat absence from this table as a dated roadmap item.

"Not exposed" means the Managed SDK/UI contract. It is not a claim that every raw server request was tested.

FeatureManaged AuthBoundary
Email/passwordSupportedsignUp.email, signIn.email
Social OAuth (Google, GitHub, Vercel)SupportedsignIn.social. Shared Google credentials are for development; production and GitHub/Vercel need your own OAuth apps. https://neon.com/docs/auth/guides/setup-oauth.md
AdminSupportedAdmin session required. Plugin customization is on the roadmap.
Email OTPSupportedManaged delivery. emailOtp.sendVerificationOtp, signIn.emailOtp.
Magic LinkSupportedEnable on the branch (off by default). signIn.magicLink.
OrganizationPartial, BetaMembers, invitations, owner/admin/member. No Teams, server hooks, custom roles/permissions, or dynamic access control. Emailed invitations: managed-auth.md.
JWTSupportedEdDSA (Ed25519), 15-minute expiry, no custom claims. Default client: .token() then data.token. SupabaseAuthAdapter(): getSession() then data.session.access_token (no .token()).
Open APISupportedServer routes /reference and /open-api/generate-schema.
Phone NumberSupported with constraintsBrowser client: existing users link a number, then sign in; no phone-first signup; own SMS webhook; custom UI. Next.js auth.handler() forwards the catch-all path, including phone OTP. A missing auth.phoneNumber server method is a missing typed helper, not a proxy rejection. https://neon.com/docs/auth/guides/plugins/phone-number.md
MFA / Two-FactorRoadmapUnavailable on Managed Auth. If required: self-managed.md, after confirming the installed Better Auth version.
Passkey, API Key, Generic OAuth, One Tap, Multi SessionNot exposed by Managed SDK/UIIf required: self-managed.md. Generic OAuth is not Google/GitHub/Vercel social sign-in.
MCP / OAuth ProviderNot Managed AuthThird-party MCP clients self-authorizing against your server. Keep existing login. See neon-functions references/mcp.md.
SSO / SAMLNot listed or exposedIf required: self-managed.md, after confirming the installed Better Auth version.

The default Managed client method is getAnonymousToken(). That JWT is a Neon anonymous Data API token. It is not Better Auth's Anonymous-account plugin (signIn.anonymous). anonymousTokenClient() is the SDK plugin factory, not a method on the public client. Do not call it, and do not call getAnonymousToken() on SupabaseAuthAdapter().

Trusted domains and webhooks are Neon settings, not installable Better Auth plugins.

Trusted domains

Auth redirects only to origins on its allowlist. invalid domain means the app origin is missing. Include the scheme, omit a trailing slash, register production and preview origins before pointing users at them, and target the correct branch:

bash
neon neon-auth domain add https://app.example.com
neon neon-auth domain list
neon neon-auth domain delete https://old.example.com

Localhost ports are pre-approved by default. An existing project can have that off: neon neon-auth domain allow-localhost get|enable|disable. Docs: https://neon.com/docs/auth/guides/configure-domains.md

OAuth provider redirect is {NEON_AUTH_BASE_URL}/callback/{provider} (the Auth URL includes its path). callbackURL on signIn.social is the later app landing origin and must be trusted.

The Managed SDK handles iframe OAuth popup and neon_auth_session_verifier. Keep the wrapper, callback route, and middleware. Do not reimplement that flow, and do not promise third-party cookies in every browser.

Functions and Data API

A Function authenticates whoever already signs the user in. Do not switch identity to call a Function. Verify the token in the neon-functions skill and https://neon.com/docs/compute/functions/authentication.md.

Managed Auth: injected NEON_AUTH_JWKS_URL, issuer from NEON_AUTH_BASE_URL. Token: default client .token() then data.token; SupabaseAuthAdapter() getSession() then data.session.access_token. A valid token is not permission to read another user's rows. Sign-out ends the browser session; do not claim it immediately revokes an already-issued JWT.

Data API identity: references/managed-auth.md. New apps query Postgres from Functions or existing handlers, not the Data API.

© neondatabase, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/neon-auth of neondatabase/agent-skills.

  • SKILL.md
  • references/managed-auth.md
  • references/self-managed.md

Open the folder on GitHubat commit bfd013c

Compare with similar skills

Neon Auth next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Neon Auth compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Neon Auth this skillneondatabase/agent-skills100—~3.1kAutomated safety check: PassApache-2.0
Authenticationlatitude-dev/latitude-llm4.7k—~303Automated safety check: PassMIT
Supabase Auth Storage Realtime Corejeremylongshore/tons-of-skills-marketplace2.8k—~1.8kAutomated safety check: PassMIT
Supabase Development and Debuggingsupabase/agent-skills2.7k3 repos~3.6kAutomated safety check: PassMIT
Supabasecurvenote/curvenote1705 repos~2.2kAutomated safety check: PassCustom licence
Project Mapgjovanovicst/golang-auth-api130—~2.6kAutomated safety check: PassMIT

Similar skills

  • Authentication

    latitude-dev/latitude-llm

    Sessions, sign-in/sign-up flows, OAuth, magic links, or organization context on the session.

    4.7k GitHub stars~303 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Supabase Auth Storage Realtime Core

    jeremylongshore/tons-of-skills-marketplace

    Implement Supabase Auth (signUp, signIn, OAuth, session management), Storage (upload, download, signed URLs, bucket policies), and Realtime (Postgres changes, broadcast, presence).

    2.8k GitHub stars~1.8k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Official

    General Supabase skill for database, auth, Edge Functions, Realtime and storage work, plus client libraries, migrations, security audits, debugging and reading logs.

    2.7k GitHub starsUsed in 3 repos~3.6k tokens
    Backend & APIsAuto-check passed
  • Supabase

    curvenote/curvenote

    A skill your agent uses when doing ANY task involving Supabase.

    170 GitHub starsUsed in 5 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • Project Map

    gjovanovicst/golang-auth-api

    Complete module inventory of the Auth API project with file paths, dependencies, and architecture overview.

    130 GitHub stars~2.6k tokensUpdated 2 mo ago
    Backend & APIsAuto-check passed
  • Workos

    usenotra/notra

    A skill your agent uses when the user asks for a WorkOS docs URL, term, or dashboard field (Sign-in endpoint, initiateloginuri, Redirect URI, WORKOS env vars), or is implementing, debugging, or…

    260 GitHub stars~6.2k tokensUpdated today
    Backend & APIsAuto-check passed

More from neondatabase/agent-skills

All 8 skills in this repo
  • Neon Postgres

    neondatabase/agent-skills

    Official

    Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching, autoscaling, scale-to-zero, instant restore, read replicas, IP…

    100 GitHub stars~4.1k tokensUpdated 2 days ago
    Auto-check: notes
  • Neon

    neondatabase/agent-skills

    Official

    Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, and the AI Gateway.

    100 GitHub stars~8.7k tokensUpdated 2 days ago
    Auto-check: notes
  • Neon AI Gateway

    neondatabase/agent-skills

    Official

    One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks.

    100 GitHub stars~5.1k tokensUpdated 2 days ago
    Auto-check: notes
  • Neon Functions

    neondatabase/agent-skills

    Official

    Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASEURL injected automatically and compute that runs next to your data.

    100 GitHub stars~12k tokensUpdated 2 days ago
    Auto-check: notes
  • Neon Object Storage

    neondatabase/agent-skills

    Official

    S3-compatible object storage that branches with your Neon project, so files and the database stay in sync across every branch.

    100 GitHub stars~3.5k tokensUpdated 2 days ago
    Auto-check: notes
  • Neon Postgres Branches

    neondatabase/agent-skills

    Official

    Choose and create the right Neon branch type for testing and development.

    100 GitHub stars~3.4k tokensUpdated 2 days ago
    Auto-check: notes

Categories

Questions about Neon Auth

What does Neon Auth do?

Add authentication to a new app. An agent skill from neondatabase/agent-skills. Neon Auth is an agent skill from neondatabase/agent-skills, published by the product's own GitHub organization. Add authentication to a new app.

When should I use Neon Auth?

Neon Auth fits situations like: neon Auth (Managed Better Auth); identity routing; trusted domains; @neondatabase/auth.

How do I install Neon Auth in Claude Code?

Run `npx skills add neondatabase/agent-skills --skill neon-auth -a claude-code`. Or copy the skill folder (skills/neon-auth in neondatabase/agent-skills) into .claude/skills/neon-auth in your project. Claude Code loads it when a task matches its description.

How do I install Neon Auth in Codex?

Run `npx skills add neondatabase/agent-skills --skill neon-auth -a codex`. Or copy the skill folder (skills/neon-auth in neondatabase/agent-skills) into .agents/skills/neon-auth in your project. Codex loads it when a task matches its description.

Can I use Neon Auth in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add neondatabase/agent-skills --skill neon-auth -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/neon-auth, .gemini/skills/neon-auth, .github/skills/neon-auth and .opencode/skills/neon-auth in your project.

What does Neon Auth need to run?

SKILL.md names no scripts, command-line tools or credentials: Neon Auth is instructions for the agent only.

Does Neon Auth access the network?

SKILL.md names 1 domain. As links in the text: neon.com. This is read from the text; nothing was executed.

Is Neon Auth safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Neon Auth use?

Neon Auth is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Neon Auth use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.8k tokens, read only when the agent opens those files.

What are the alternatives to Neon Auth?

Skills that share tags, products or a category with Neon Auth: Authentication (latitude-dev/latitude-llm, 4.7k stars), Supabase Auth Storage Realtime Core (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Supabase Development and Debugging (supabase/agent-skills, 2.7k stars) and Supabase (curvenote/curvenote, 170 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Neon Auth?

neondatabase (a GitHub organization, an official publisher) maintains it in neondatabase/agent-skills, which has 100 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on October 9, 2026.

Source: neondatabase/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.