gstack-sync-gbrain

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

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/tayiorbeii/paperclip-factory-kit-hermes --skill gstack-sync-gbrain-tayiorbeii
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gstack-sync-gbrain
Source: https://github.com/tayiorbeii/paperclip-factory-kit-hermes/tree/main/skills/paperclip/gstack-sync-gbrain
Command: npx skills add https://github.com/tayiorbeii/paperclip-factory-kit-hermes --skill gstack-sync-gbrain-tayiorbeii

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code search indexes drift out of date as a repository changes, causing semantic search tools like gbrain to return stale or missing results. This Skill re-indexes the repo, registers the code surface, and updates agent search guidance so gbrain queries stay accurate. ## Core Features & Use Cases - State probing and capability checks: Detects whether gbrain is configured, whether the current worktree is pinned via a .gbrain-source file, and whether remote MCP mode is active before syncing. - Idempotent re-indexing: Wraps the gstack-gbrain-sync orchestrator to refresh indexes safely on repeat runs, with a verdict block reporting the outcome. - CLAUDE.md guidance refresh: Updates the GBrain Search Guidance section so agents know when to prefer gbrain search and code-def/code-refs over Grep. - Use Case: After a large refactor, an agent notices gbrain search is not finding new functions. Running this Skill re-indexes the repo, pins the worktree, and confirms the sync verdict. ## Quick Start Ask the agent to sync gbrain and re-index this repository so semantic code search finds the latest changes.

Frequently Asked Questions about gstack-sync-gbrain

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

FAQPage Schema
How do I re-index a repository for gbrain semantic search?

Invoke the sync gbrain workflow, which probes current state, registers the code surface, and re-runs the gstack-gbrain-sync orchestrator. It is idempotent, so repeated runs safely refresh the index without duplicating data.

Why is gbrain search not finding recent code changes?

The index is stale relative to the repo, or the current worktree is not pinned with a .gbrain-source file at the git toplevel. Running a full sync re-indexes the repo and pins the worktree so queries resolve against current code.

Does gbrain sync work in remote MCP mode?

In remote-http MCP mode, local artifacts sync is a no-op because the brain server pulls from GitHub or GitLab on its own cadence. The skill detects this mode from claude.json and reports it instead of running a local sync.

What tools are required to run a gbrain sync?

The workflow expects the gbrain CLI on PATH, gstack helper binaries under the gstack skills directory, git for worktree detection, and jq for reading MCP configuration. Missing AskUserQuestion support blocks the skill entirely.

When should I use gbrain search instead of Grep?

Use gbrain search and query for semantic questions about the codebase, and gbrain code-def, code-refs, and code-callers for symbol-aware lookup. Fall back to Grep only when the worktree is not yet pinned or gbrain is not configured.