
Postgres Adopt
Detect your gbrain database engine and safely move a brain from PGLite to Postgres
- Repository
- garrytan/gbrain
- Stars
- 31,447
- Licence
- MIT
- Files
- 1 file
What it does
This skill teaches an AI agent to check which database engine a gbrain memory store uses (the lightweight built-in PGLite or a full Postgres server), and to set up or upgrade it to Postgres when the operator wants that. It asks for consent before creating databases or Docker containers, and moves existing data through gbrain's own planned, confirmed migration commands rather than by editing config files.
Great for
- Developers running gbrain who want to know whether their brain is on PGLite or Postgres
- Operators with several agents or machines who need to move a growing brain (1000+ pages) to Postgres or Supabase
- Users troubleshooting a gbrain database connection or engine mismatch
Skip it if
- Single-user, small brains where PGLite is already sufficient; the skill itself says PGLite is fine there
- Anyone without database credentials or access to the target server, since the migration cannot complete without them
- Thin-client setups where the brain lives on a remote host; the skill stops there because engine choices belong to that server
Try asking
- “Which gbrain engine am I using right now?”
- “Switch my gbrain to Postgres and move my existing brain over to Supabase”
- “Install Postgres for the brain, asking me before creating any database or Docker container”
- “Check the status of my gbrain migration and resume it if it was interrupted”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
postgres-adopt.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip postgres-adopt.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip postgres-adopt.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Ask for the plan first: the migrate command reports what moves and what stays local before anything changes, and you confirm before it runs.
- Put the connection string in an environment variable rather than pasting it into chat, so it does not appear in transcripts.
- Keep the old PGLite data folder until you are satisfied; deleting it is your decision.
What's inside
- SKILL.md
Redistributed unmodified from garrytan/gbrain under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.