sync-gbrain

Synchronizes the gbrain index with repository code and refreshes agent search guidance in CLAUDE.md.

Updated Sep 13, 2026
One-click install
npx skills add https://github.com/abdulazeezoj/monovella-poc --skill sync-gbrain-abdulazeezoj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-gbrain
Source: https://github.com/abdulazeezoj/monovella-poc/tree/main/.agents/skills/gstack/sync-gbrain
Command: npx skills add https://github.com/abdulazeezoj/monovella-poc --skill sync-gbrain-abdulazeezoj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code search indexes go stale as a repository changes, so agents relying on gbrain search miss new or renamed code. This Skill re-syncs gbrain against the repo's current state and updates the agent-facing guidance in CLAUDE.md so the coding agent knows when to prefer gbrain search over Grep. ## Core Features & Use Cases - Repository re-indexing: Wraps the gstack-gbrain-sync orchestrator with state probing, native code-surface registration (gbrain sources add, gbrain sync --strategy code, gbrain reindex-code), and capability checks. - Agent guidance refresh: Updates CLAUDE.md so the agent knows when to use gbrain code-def, code-refs, code-callers, and code-callees instead of plain text search. - Idempotent and re-runnable: Safe to run repeatedly; emits a verdict block reporting sync health. - Use Case: After a large refactor, run the sync so gbrain's code surface reflects the new structure and the agent stops missing symbols during search. ## Quick Start Ask the agent to sync gbrain and re-index this repository so code search reflects the current codebase.

Frequently Asked Questions about sync-gbrain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I re-index a repository with gbrain?

Invoke the sync-gbrain skill, which wraps the gstack-gbrain-sync orchestrator. It probes current state, registers native code surfaces with gbrain sources add, runs gbrain sync --strategy code, and finishes with a verdict block reporting sync health.

Why is gbrain search not finding code in my repo?

The index is likely stale relative to recent code changes. Running sync-gbrain re-indexes the repository against its current state and refreshes the CLAUDE.md guidance so the agent prefers gbrain search over Grep where appropriate.

What version of gbrain does sync-gbrain require?

The skill uses gbrain v0.20.0 or later, which provides native code surfaces such as gbrain sources add, gbrain sync --strategy code, gbrain reindex-code, and the code-def, code-refs, code-callers, and code-callees query commands.

Is it safe to run sync-gbrain multiple times?

Yes. The skill is designed to be re-runnable and idempotent. It performs state probing and capability checks before syncing, so repeated runs converge on the same up-to-date index without duplicating work.

What is the difference between setup-gbrain and sync-gbrain?

setup-gbrain installs gbrain once, while sync-gbrain is the recurring verb that keeps the brain current with the repo's code and refreshes the agent-side search guidance in CLAUDE.md on each run.