run-lean-on-neon

run-lean-on-neon is a skill for Claude Code, Codex from lonormaly/builders-stack. It costs 80 tokens per session (1,490 once invoked), scanned A, original, MIT.

A guide to running a managed Neon PostgreSQL database efficiently under load and within its free limits. Neon is a hosted database service, so many traditional server-configuration settings are managed for you.

In plain words
What is it for?
Use it when choosing a database connection string, investigating failures under concurrent traffic, planning authentication or session checks, or trying to stay within Neon’s storage and compute limits.
Why use it?
It focuses attention on the settings the application can actually control, such as connections, session behavior, query shape, schema design, and wake-ups. This helps address overloads and unexpected free-tier usage.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/lonormaly/builders-stack/run-lean-on-neon
Any agent
npx skills add lonormaly/builders-stack --skill run-lean-on-neon
Clone the repo
git clone --depth 1 https://github.com/lonormaly/builders-stack

Made for: Claude Code, Codex.

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 run-lean-on-neon

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonormaly/builders-stack/run-lean-on-neon.svg)](https://agentmods.dev/skills/lonormaly/builders-stack/run-lean-on-neon)
Your own site
<a href="https://agentmods.dev/skills/lonormaly/builders-stack/run-lean-on-neon"><img src="https://agentmods.dev/badge/skills/lonormaly/builders-stack/run-lean-on-neon.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,490 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00080 $0.01490
Opus 5 $0.00040 $0.00745
Sonnet 5 $0.00016 $0.00298
Haiku 4.5 $0.00008 $0.00149

Measured 5d ago against content hash 9894bfcc1a39, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

run-lean-on-neon 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 5d 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.

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.

agents/skills/run-lean-on-neon/SKILL.md · 74 lines

How it starts

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

Run lean on Neon

The stack's prod DB is Neon (serverless, managed Postgres). That changes the whole "tune Postgres" story: you do not own a postgresql.conf, so most classic advice (PgTune output — shared_buffers, checkpoint_timeout, max_wal_size, maintenance_work_mem) does not apply — Neon manages it. What you do control is connections, the query/schema shape, a few session GUCs, and how often the app wakes the compute. Those are where "crashes at load" and "blew the free tier" actually come from.

When to use

  • Picking a connection string, or the DB falls over under concurrency.
  • Choosing how auth/session validation talks to the DB.
  • Staying inside Neon's free tier (storage or compute).

Neon free tier — the limits that bind (verify at https://neon.com/pricing, they change)

Limit Free What it means
Storage 0.5 GB / project overflow → writes fail. Don't put blobs in Postgres.
Compute 100 CU-hours / mo (~400 h at 0.25 CU) overflow → compute suspended till next month. The real bottleneck.
Autosuspend after 5 min idle (can't disable) your friend — an idle DB costs zero compute.
Branches 10 / project prune dev branches; change history counts toward storage.

Compute (CU-hours) — the bottleneck. Don't wake the DB for nothing.

An idle client makes zero requests → compute suspends → CU-hours preserved. Everything that pins compute awake is the enemy:

  • Never poll or keepalive the DB. This is the stack's "push, don't poll" law applied to Postgres — a setInterval health-ping or a per-minute cron holds compute open 24/7 and burns all 400 hours. Use SSE/WebSocket for status, let the DB sleep.
  • Cache the session cookie — the single biggest saver. Better Auth's getSession runs on nearly every request; each one is a DB round-trip that keeps compute awake. session.cookieCache (ON by default in libs/auth) serves the session from a signed 5-min cookie and only touches the DB on miss. Do not extend the TTL to "save more" — it's a revocation dial, not a cost dial (see the session ladder below).
  • Batch background work into one wake instead of trickling writes.

Read the full file on GitHub · 74 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. 5d ago First seen · 74 lines · 80 tokens per session scan A 9894bfcc1a39

Subscribe to this mod's changes

run-lean-on-neon is a skill published in the GitHub repository lonormaly/builders-stack (41 stars, last pushed today), licensed MIT. It adds 80 tokens to every session and 1,490 once invoked, about $0.0004 per session on Opus 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

Other skills, from other repositories