Skip to content

Schema Unification Migration

Migrates a gbrain knowledge base from its old 94-type page scheme to a 15-type canonical taxonomy.

Repository
garrytan/gbrain
Stars
31,447
Licence
MIT
Files
1 file

What it does

This skill is a step-by-step playbook for an AI agent managing a gbrain personal knowledge store (a brain of pages). Over time such a store collects many inconsistent page types, and this skill guides the agent to preview and then apply a consolidation into 15 canonical types, converting redirect and link-like pages into aliases and links and keeping original types as frontmatter for rollback. It is a run-only migration: it changes how the brain's data is organised once the user agrees to the steps.

Great for

  • Developers who run a gbrain instance on the gbrain-base pack and want to move to gbrain-base-v2
  • Maintainers cleaning up a large brain with many overlapping page types

Skip it if

  • Brains that are already on gbrain-base-v2 (the skill says to skip the migration)
  • Managed brains with managed persistence on: the skill itself says applying the migration is refused there, so only the preview step applies
  • Anyone without a backup, since the apply step rewrites page types across the whole brain and rollback depends on restore being available

Try asking

  • “Unify my types in my gbrain and show me a preview first”
  • “Check whether my brain needs a pack upgrade to gbrain-base-v2”
  • “Migrate to gbrain-base-v2 and verify the type count afterwards”
  • “What does the canonical taxonomy look like for my page types?”
Step-by-step guide: how to use Schema Unification MigrationInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    schema-unify.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip schema-unify.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip schema-unify.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 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

  • Always run gbrain onboard --check --explain and review the preview before applying; the skill says not to proceed if the proposed changes look wrong.
  • Take a backup before applying, since the migration rewrites page types and the skill references gbrain restore for recovery.
  • On PGLite, include --follow when submitting the job, otherwise it stays queued with no worker running.

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.