Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

postgres-adopt

Skill by garrytan

Detects which database engine a gbrain brain uses, PGLite or Postgres. It prefers Postgres for agent-harness installs and moves an existing PGLite brain to Postgres with its history, after a plan and user confirmation.

  • Score 92
  • 34k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install postgres-adopt

Built from the published package, never by AI.

git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.claude/skills && cp -r /tmp/gbrain/skills/postgres-adopt ~/.claude/skills/postgres-adopt

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install postgres-adopt in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The postgres-adopt skill tells an agent which database engine a gbrain brain runs on, PGLite or Postgres. Detection uses one read-only command, gbrain engine status --json, which works even when the database is down. For fresh installs it prefers Postgres, trying an environment URL, Supabase discovery, a local Postgres and then Docker, and falls back to PGLite.

For an existing PGLite brain, the skill plans a move with gbrain migrate --to postgres, asks the user to confirm, runs the migration against a plan hash, and verifies every table. It never changes engines by editing config, and it keeps the target URL out of commands and output. It is aimed at operators who run gbrain with concurrent agents, multiple machines, or large brains.

Written from the project's SKILL.md and checked against it.

What it can do

  • Detect engineReports whether the brain runs on PGLite or Postgres using gbrain engine status --json.
  • Postgres-first installRuns gbrain init --prefer-postgres, trying each provisioning rung in order and reporting which one won.
  • Supabase discoveryFinds a Supabase project through the Management API when SUPABASE_ACCESS_TOKEN is set.
  • PGLite to Postgres movePlans, confirms and runs gbrain migrate --to postgres, then verifies the target with doctor.
  • Resume or roll back a moveReads migration state with gbrain migrate --status and resumes or rolls back an interrupted move.

What you need

  • gbrain installed and its CLI available
  • Supabase account and SUPABASE_ACCESS_TOKEN for Supabase discovery (optional)
  • Local Postgres with PGHOST, PGPORT, PGUSER and PGPASSWORD set, or --local-postgres (optional)
  • Docker for the opt-in docker rung (optional)

Try asking

  • Which gbrain engine am I on right now?
  • Plan a move of my gbrain brain from PGLite to Postgres
  • Set up Postgres for my gbrain brain, falling back to PGLite if needed

Good to know

  • Engine changes happen only through gbrain migrate; gbrain config set engine is refused by design.
  • The docker rung needs explicit opt-in with --allow-docker, and creating a database needs --allow-create-db.
  • Per-turn bootstrap hook injection is PGLite-only, according to the source.
  • PGLite has a chunk vector index ceiling of about 200k embedded chunks at 1,024 dimensions.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/postgres-adopt/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md9 KB
  • routing-eval.jsonl870 B

Alternatives to postgres-adopt

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

postgres-adopt: common questions

Can I move a gbrain PGLite brain to Postgres without losing data?

The skill uses gbrain migrate --to postgres, which plans first, runs only with user confirmation, and verifies every table before flipping routing. The old data directory is kept as a .graduated backup.

Does this skill require Docker?

No. The Docker rung runs only when the operator passes --allow-docker, and if no rung works the install falls back to PGLite.

How does the skill keep the database URL secret?

The target URL is stored in the GBRAIN_TARGET_URL environment variable, and commands use --url-env so the URL never appears in command lines or output.

How do I install postgres-adopt?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is postgres-adopt free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is postgres-adopt safe to use?

It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to postgres-adopt?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

postgres-adopt Install

Add to stack

Loading.