From ai-brain
Sync the current project's context into your AI Brain. Reads project files, compares against existing brain knowledge via progressive disclosure, and captures only new or changed information.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ai-brain:brain-syncThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Sync the current project's context into the AI Brain so future conversations have up-to-date knowledge about this project.
Sync the current project's context into the AI Brain so future conversations have up-to-date knowledge about this project.
$ARGUMENTS — Optional:
--name <project-name> — Override the auto-derived project nameParse the name value from $ARGUMENTS if provided.
Read the following from the current working directory. Skip any that don't exist.
Project identity:
README.mdpackage.json, Cargo.toml, pyproject.toml, or go.mod (whichever exists)CLAUDE.mdGit state:
git branch --show-currentgit log --oneline -20gh pr list --limit 10 (skip if gh is unavailable)Project structure:
ls -la at the project rootStrategic context:
docs/ exists, list its contents and selectively read files that reveal project direction (specs, architecture docs, roadmaps). Do not read every file.GOALS.md, TODO.md, or similar planning files if they exist.If --name was provided, use that. Otherwise, derive the project name using this precedence:
name field from package.json / Cargo.toml / pyproject.tomlREADME.md3a. Triage via compact index.
Call mcp__ai-brain__search_thoughts with:
query: the project namelimit: 10This returns a compact index: each hit has {id, summary, snippet, type, topics, score}. Do NOT assume full content is present — there is none; snippet is ~240 chars.
3b. Identify hydration candidates.
From the index rows, select up to 5 candidates that look materially related (by summary + snippet + topics). Discard unrelated or obviously-stale rows based on snippet alone.
3c. Hydrate.
Call mcp__ai-brain__get_thoughts with ids: [<up to 5 ids>]. This returns full content for those specific thoughts. Only these hydrated results participate in the diff.
Compare the current project state (from Step 1) against the hydrated thoughts (from Step 3c):
For each unchanged fact, note the thought:<id> that already captures it — you'll reference these in the report.
Based on the diff from Step 4:
First sync (no hydrated thoughts, or all candidates were unrelated):
Capture a comprehensive project summary via mcp__ai-brain__capture_thought. Structure the content with the project name first. Example format:
Project: <name> — <one-line description>. Tech stack: <technologies>. Key features: <features>. Current status: <status>. Next steps: <direction>.
If the summary would be excessively long, split into 2-3 focused thoughts (e.g., project overview, current status/roadmap). Collect each thoughtId returned.
Subsequent syncs (hydrated thoughts found): Only capture thoughts for meaningful changes. Frame each as an update:
Update: <project-name> — <what changed> (<date>). <new status or direction>.
Skip unchanged information. If nothing meaningful has changed, capture no thoughts.
No changes: Tell the user the brain is already up to date and skip to Step 6.
Briefly tell the user:
thought:<id>thought:<new-id> and the prior thoughts they supersede as thought:<old-id> where applicablethought:<id> so the user can confirm coveragenpx claudepluginhub flippyhead/ai-brain-plugin --plugin ai-brainProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.