Fold the claimable path into the neon skill and gate it behind an account check - #69
Merged
Merged
Conversation
andrelandgraf
force-pushed
the
update-claimable-postgres-api
branch
from
August 13, 2026 14:22
31164de to
a013922
Compare
andrelandgraf
force-pushed
the
update-claimable-postgres-api
branch
from
August 16, 2026 16:01
95eb004 to
1a26b00
Compare
andrelandgraf
force-pushed
the
update-claimable-postgres-api
branch
from
August 25, 2026 03:38
567f617 to
6f9f267
Compare
The skill documented the neon.new REST API, CLI, SDK, and Vite plugin. That surface is replaced by a new service at https://claimable.neon.tech/v1 that implements the auth.md agent identity protocol and provisions the Data API and Neon Auth alongside Postgres. Replaces the provisioning documentation with agent registration, the JWT bearer token exchange, the capability decision model, the resource routes, and the structured error envelope. Skill name and directory are unchanged.
A standalone claimable-postgres skill taught curl to a provisioning API. Agents should start from the neon skill, install the CLI, write neon.ts, and follow auth.md. Delete the skill and document that path in skills/neon/references/claimable-neon.md.
The Claimable Neon reference is the new API only. neon.new remains a trigger phrase on the neon skill so old-name queries still land here.
REST issue stays on claimable.neon.tech. The skill file and path-issuer metadata live on neon.com.
andrelandgraf
force-pushed
the
update-claimable-postgres-api
branch
from
August 25, 2026 15:09
6f9f267 to
be13bc3
Compare
thisistonydang
approved these changes
Aug 25, 2026
thisistonydang
left a comment
Contributor
There was a problem hiding this comment.
Left a comment about possible repetition that may make skill longer than needed, but flow lgtm overall.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
neonskill opens Getting Started withnpx neon@latest init --agent. That command needs a Neon account. An agent working for someone who has never signed in runs it anyway and stalls atAwaiting authentication in web browser.The repo had a no-account skill,
claimable-postgres, but it documented a different service. Its API isPOST https://neon.new/api/v1/database, which hands back aconnection_stringand aclaim_url. Claimable Neon is the protocol published at claimable.neon.tech/auth.md: the agent exchanges an identity assertion for a temporary Neon project and can request Neon Auth and the Data API next to Postgres. A human claims that project into their org later.Nothing routed an agent from the
neonskill to either one and nothing told an agent when to stop and ask for a sign-in instead of provisioning something throwaway.Diagnosis
neon claimis not in the published CLI. Gating on whether the command runs does not work, becauseneon claim --helponneon@4.4.0prints the top-level help, lists noclaimcommand and exits 0:An agent that reads exit 0 as "the command exists" goes on to run
neon claim create. Onneon@4.4.0that call prints nothing and does not return. One run was killed still running at 60 seconds, a second run with stdin closed at 25 seconds, and neither had produced a byte of output.So the gate reads the help text: if
neon claim --helpdoes not listcreate, take the REST fallback. That test survives the release. Onceclaimships, the same call prints the claim help withcreatein it and the CLI path turns on with no change to the skill.What an agent now follows
The account check, once, in Getting Started
A
DEFAULTrow withaccount: "-"andfile: "missing"is not an account. Neither is a machine whereneonis not installed orprofile listcannot run. If none of the signals hold, the skill sends the agent to "Starting without a Neon account".NEON_PROFILEis not a signal. It names a profile that may not exist.Starting without a Neon account
Three behaviors, in order:
neon author mint an API key. Prefer that over Claimable Neon.Requests for neon.new, Claimable Postgres, claimable.neon.tech, instant Postgres or a no-signup database land in the same place.
neon init --agentandneon authare off this path entirely; both need a human account.The reference path
skills/neon/references/claimable-neon.md:npm i -g neon@latestneon claim --helpdoes not listcreate, skip to the REST fallback belowneon.tsdeclaring the services you need, or pass--serviceon create. Postgres is always requested.neon claim create --env-pull(add--service data-api --service authwithout aneon.ts)neon env pullneon-postgresskill for connections, schemas and queries. Install it if it is missing:neon skills -s neon-postgresneon claim createreadsneon.tswhen it is present, writes to an existing.envotherwise.env.localand gitignores that file.--api-keyand--profileare refused. Before the claim, Postgres is granted and Auth and the Data API are granted when requested. Functions, Object Storage and the AI Gateway come back refused. The agent reports what it was given rather than retrying or stripping the refusals.CLI and HTTP name the same things differently
The reference states both sides, because an agent on the REST fallback reads
auth.mdand an agent on the CLI reads printed output.verification_urlverification_uri_completeuser_codeuser_codeexpires_in_secondsexpires_indenied_capabilitiesgranted: false,reason: "requires_claim"Opening the claim URL and continuing to Neon are separate
Opening the URL changes nothing. Continuing to Neon starts the transfer:
DATABASE_URLrotates and existing access tokens are revoked. Auth and the Data API stay enabled when they were granted.That distinction decides what the agent does next. On the CLI,
neon claim statuspolls. On REST, the post-redemption token is the one that pollsGET /v1/projects/{id}/claim, not the token from create. Oncereconciledis true, the human signs in withneon authand the agent runsneon link --agentandneon env pullfor the newDATABASE_URL.Of the REST errors, only
invalid_grant,project_expiredandproject_claimedmean the stored identity assertion is dead.token_expiredmeans re-exchange it.REST fallback
Under the heading
If neon claim is missing, so the step-2 gate has somewhere to jump to. The claimable resource is/v1/projects/{id}onhttps://claimable.neon.tech:neon claim createPOST /v1/agent/identity, thenPOST /v1/oauth2/token, thenGET /v1/projects/{id}/credentialsneon claim accept --no-openPOST /v1/projects/{id}/claimneon claim statusGET /v1/projects/{id}/claimneon claim delete --yesDELETE /v1/projects/{id}Request and response fields are not copied into the skill. The reference tells the agent to fetch
https://claimable.neon.tech/auth.mdfor them, so a protocol change does not need a skill edit.Also in here
skills/claimable-postgres/SKILL.mdis deleted, with its README section and itsskills.sh.jsoncatalog row. The "Database Workflows" group description drops "Provision".neonREADME entry gains one sentence naming Claimable Neon and the skills table insideskills/neon/SKILL.mdloses theclaimable-postgresrow.descriptionof theneonskill picks up the no-account triggers, including the old skill's ones: neon.new,npx neon-new, temporary postgres, no credit card database.plugins/neon-postgres/is the vendored copy, regenerated bynpm run sync:plugins. It carries the same three changes: the editedneonskill, the new reference, the deleted skill.neon.tsexample under "Neon Infrastructure as Code" now writesfunctions: {}andbuckets: {}. The two// see the ... skillpointers on those lines are gone;aiGatewaykeeps its pointer.skills.sh.jsonarrays collapse to one line and theneon.logs.fieldValues(...)call in the observability example wraps across four lines.Verification
npm run validate:ciat8a4200b: plugin copies in sync, versions in sync at 1.1.2, 7 skills valid, reference graph fully linked. The graph check reaches the new file through the absolutehttps://neon.com/docs/ai/skills/neon/references/claimable-neon.mdlink, which it resolves back to the on-disk path.Against the published CLI:
npx neon@latest claim --helponneon@4.4.0: top-level help, zero occurrences ofclaim, exit 0. The step-2 gate sends an agent to REST today, which is the intended result.npx neon@latest profile list -o jsonreturns the documented shape, withaccountcarrying an email on a signed-in profile.npx neon@latest claim createonneon@4.4.0: no output, killed still running at 60 seconds, and again at 25 seconds on a second run with stdin closed.curl -s -o /dev/null -w "%{http_code}" https://claimable.neon.tech/auth.mdreturns200.Not verified: no project was provisioned from this branch. The identity-assertion exchange,
neon claim create --env-pull, the accept and poll loop, the revocation on continue and the post-reconciledneon link --agentplusneon env pullare written fromauth.mdand the CLI's own output, not from a run. The REST field names and error codes come fromauth.md.The
evals/suite coversneon-postgres-egress-optimizeronly, so nothing here exercises the routing automatically.For your attention
neon claimis not released, so every agent on this path lands in the REST fallback today. The help gate is what routes them there and it is also what turns the CLI path on later without another PR. Nothing in the repo pins a CLI version.neon-postgreswithneon skills -s neon-postgresand that is not behind the gate. Onneon@4.4.0,neon skillshas only anupdatesubcommand: the call prints help and exits 1 without installing anything. The agent can still fetch the skill over HTTP, but the command as written does nothing on the published CLI.main.https://neon.com/docs/ai/skills/neon/references/claimable-neon.mdis not live yet. An installed skill reads the file from disk, so this only affects an agent fetching the skill over HTTP.claimable-postgresdoes not reach anyone who already installed it. Their copy still provisions through neon.new andhttps://neon.com/docs/ai/skills/claimable-postgres/SKILL.mdkeeps serving it until the mirror updates.CONTRIBUTING.mdand none of them update from here. Each needs its own mirror PR.neon author an API key whenever either is possible and asks the user before provisioning an unclaimed project. That ordering is a product call and this is the file to change it in if agent-first products should get the claimable path first.