sync-gbrain
An agent skill by garrytan, from garrytan/gstack. Tags: cli, codebase, documentation, sync.
What it does
Keep gbrain current with this repo's code and refresh agent search guidance in CLAUDE.md. (gstack)
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add garrytan/gstack --skill sync-gbrain
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/garrytan/gstack
cp -r gstack/sync-gbrain ~/.claude/skills/sync-gbrain
Safety box score
Grade D, elevated risk: 56 of 100 risk points, rated 2026-10-16. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill runs a local gbrain sync pipeline, rewrites the repo’s `CLAUDE.md` guidance block, and can also ingest session transcripts into `~/.gstack` or a remote brain setup. The main risks are broad local execution through helper scripts, home-directory writes, and potential exposure of transcript contents and repo metadata to remote sync paths.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | It shells out to multiple local commands and helpers, including `~/.claude/skills/gstack/bin/gstack-skill-start`, `bun run .../gstack-gbrain-sync.ts`, `gbrain ...`, and `mv`, so it can run substantial local code. |
| Network access | 2 (moderate) | The skill explicitly supports `remote-http` brain mode and says brain-sync can travel via `git push`/`git pull`, so code/search metadata and transcripts may leave the machine. |
| Filesystem reach | 2 (moderate) | It writes the repo’s `CLAUDE.md` via a temp file + `mv`, and also reads/writes user-state under `~/.gstack/` and `~/.gbrain/`. |
| Secrets & credentials | 2 (moderate) | Transcript ingestion can pull Claude Code and Codex sessions from every allowed repo, which may contain pasted secrets, tokens, or sensitive snippets. |
| Privilege & persistence | 1 (low) | It does not ask for sudo or system-wide installs, but it does change persistent user-level config and repo files such as `~/.gbrain/config.json` and `CLAUDE.md`. |
| Instruction hijack surface | 1 (low) | It tells the agent to honor `GSTACK_INSTRUCTION_BEGIN` blocks from tool output and to treat the skill file as executable instructions, which creates a limited instruction-injection channel. |
| Irreversible actions | 2 (moderate) | Once invoked, it can auto-run sync stages, reindex code, update `CLAUDE.md`, and log telemetry without further human approval inside the workflow. |
| Transparency | 2 (moderate) | Most real behavior is delegated to unreviewed helpers under `~/.claude/skills/gstack/bin/` and `bun run ...gstack-gbrain-sync.ts`, so the full blast radius is not visible from `SKILL.md` alone. |
Before installing
- Review the helper scripts under `~/.claude/skills/gstack/bin/` before trusting the sync path; `SKILL.md` delegates most behavior to them.
- Decide up front whether transcript ingestion should be `off`, `recent`, or `all`, since that can import sensitive session history.
- Check whether you want this skill to rewrite `CLAUDE.md` in the repo and persist gbrain settings under `~/.gbrain/`.
- If you use remote brain mode, confirm you are okay with sync data leaving the machine via the brain-sync/git path.
Rated 2026-10-16 by an automated review of 1 file from the skill's repository.
Source
- Repository
- garrytan/gstack (all skills from this repository)
- Path
- sync-gbrain/SKILL.md
- Branch
- main
- Updated
- 2026-10-05
Related skills
- caveman-help — Quick-reference card for the three caveman skills and their commands. Trigger: /caveman-help or "caveman help".
- cli-demo-generator — Generates professional animated CLI demos as GIFs using VHS terminal recordings.
- cli-developer — Use when building CLI tools, implementing argument parsing, or adding interactive prompts.
- context7-cli — Use the ctx7 CLI to fetch library documentation, manage AI coding skills, and configure Context7 MCP.
- address-sanitizer — Builds and runs code under AddressSanitizer to catch buffer overflows, use-after-free, and other memory errors during fuzzing or tests.
- aflpp — Sets up and runs AFL++ for multi-core fuzzing of C/C++ projects built with afl-clang-fast or afl-gcc-fast.