agentleFS
Ghost7802Ghost7802/awesome-api-skills/skills/neon/SKILL.md

neon

Skill13 starsChanged 29 days agoMITView on GitHub

  • Installs packages

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use neon-ai-gateway, neon-functions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jaaklaSkill

    neon-ai-gateway

    One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks. Use when a user wants to call an LLM, add AI/chat/an agent to their app, route between model providers (OpenAI, Anthropic, Google/Gemini, Meta, Alibaba, and more), or avoid juggling separate provider API keys and accounts — especially when they already use Neon and want AI requests to branch with their project. Works with the OpenAI SDK, Anthropic SDK, google-genai, the Vercel AI SDK, and Mastra by changing only the base URL. Triggers include "call an LLM", "add AI to my app", "chat completion", "model routing", "LLM proxy/gateway", "one API for all models", "use Claude/GPT/Gemini", "AI SDK", "Mastra agent", "Neon AI Gateway", and "log/rate-limit AI calls".

    Also in 5 projects that use this

  • jaaklaSkill

    neon-functions

    Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your data. Use when a user wants to host an API, an AI agent with long streaming responses, a WebSocket or server-sent-events (SSE) server, a webhook handler, a Discord bot, an MCP server, or any request/response workload that risks timing out on short, lambda-style serverless functions — and wants it to branch with their database. Also use for Function Triggers: a cron or an object-storage event that POSTs to a function. Triggers include "serverless function", "deploy an API", "long-running function", "streaming agent", "SSE server", "WebSocket server", "webhook handler", "MCP server", "cron", "function trigger", "scheduled function", "cron job", "object storage trigger", "on upload", "run code next to my database", "function that won't time out", "function logs", "Neon Functions", "Neon Compute", "DDoS protection", "rate limiting", and "production hardening".

    Also in 5 projects that use this

  • xAISkill

    neon-postgres-branches

    Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, or branch creation via Neon CLI or Neon MCP. Triggers include "Neon branch", "test migrations safely", "branch production data", "schema-only branch", "reset branch" and "sensitive data testing".

    Also in 5 projects that use this

  • sayuru-akashSkill

    neon-postgres-egress-optimizer

    Diagnose and fix excessive Postgres egress (network data transfer) in a codebase. Use when a user mentions high database bills, unexpected data transfer costs, network transfer charges, egress spikes, "why is my Neon bill so high", "database costs jumped", SELECT * optimization, query overfetching, reduce Neon costs, optimize database usage, or wants to reduce data sent from their database to their application. Also use when reviewing query patterns for cost efficiency, even if the user doesn't explicitly mention egress or data transfer.

    Also in 4 projects that use this

  • bergsideSkill

    neobrutalism

    Modern take on brutalism with bold borders, vivid accent colors, and raw, high-contrast layouts on warm surfaces.

    Also in 4 projects that use this

  • bergsideSkill

    ant

    Structured, enterprise-focused design system emphasizing clarity, consistency, and efficiency for data-dense web applications.

    Also in 3 projects that use this

  • +2 more from jaakla
  • +4 more from bergside

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Never expose your raw Neon connection string in client-facing applications.

    line 22
  2. Distinctive:

    Do not mock the database. Instead, integrate Neon API calls into your test setup phase to instantly provision an exact clone of your …

    line 28
  3. Very specific:

    If queries inexplicably hang in Edge environments, verify you are not attempting to use standard TCP connections.

    line 31
  4. Distinctive:

    Use this when your agent works with neon — structured patterns beat pasted docs and prevent common hallucinations.

    line 41

“Common” is measured: kept by at least 6 in 10 of the 19 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Neon API Skill

Quick Start

Neon separates compute and storage, allowing instant database branching and autoscaling. For most Node.js applications, use the @neondatabase/serverless driver over standard pg to leverage WebSocket connections, which bypass serverless environment connection limits.

npm install @neondatabase/serverless

Common Workflows

Instant Branching

Neon allows you to create isolated database branches for preview environments. In Vercel or GitHub Actions, trigger the Neon API to branch your primary DB instantly before running integration tests, then delete the branch upon PR merge.

Production Patterns

Connection Pooling vs WebSockets

In traditional long-running servers (like Express on EC2), standard connection pooling with pg is acceptable. In Edge environments (Cloudflare Workers, Vercel Edge), always utilize the Neon WebSocket driver to eliminate connection exhaustion.

Error Recovery

Handle standard PostgreSQL error codes (e.g., 23505 for Unique Violation). If encountering connection timeouts (ETIMEDOUT) during cold starts in serverless functions, implement a retry wrapper using an exponential backoff strategy (e.g., async-retry package).

Security Notes

Never expose your raw Neon connection string in client-facing applications. Restrict database access by explicitly binding to static IP ranges where possible, though serverless environments may require 0.0.0.0/0 with strict password enforcement.

Performance Considerations

Neon's compute scales down to zero when inactive. The first query after scale-to-zero will experience a 'cold start' latency (typically 500ms-1s). To mitigate this for user-facing routes, implement keep-alive cron jobs or utilize read replicas for globally distributed edge applications.

Testing Guidance

Do not mock the database. Instead, integrate Neon API calls into your test setup phase to instantly provision an exact clone of your production schema, run tests against it, and destroy the branch in the teardown phase.

Troubleshooting

If queries inexplicably hang in Edge environments, verify you are not attempting to use standard TCP connections. Ensure neonConfig.fetchConnectionCache = true is set for the serverless driver to reuse connections effectively.

References

Related Skills

  • Vercel
  • Supabase

Why use this skill

Use this when your agent works with neon — structured patterns beat pasted docs and prevent common hallucinations.

AI pitfalls

  • Inventing column names or schema fields
  • Using deprecated driver methods or wrong connection strings
  • Omitting connection pooling or transaction boundaries

Production checklist

  • Migrations version-controlled and applied via CI
  • Connection limits and pooling configured
  • Backups and restore procedure documented

Related skills

  • vercel — related to
  • supabase — related to

Last Verified: 2026-07-02

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.