Skip to content

Brain Link Discipline

Makes the agent always send a working, verified link to any brain page it reports, in the same message.

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

What it does

When an agent creates or edits a page in a git-backed knowledge base (a 'brain'), this skill makes it commit and push the change, then include a clickable link to that page in the same reply so you never have to ask where it is. It also tells the agent how to build the correct link path from the git repository root and, when a hosted remote exists, check the link actually resolves before sending it. Inside brain pages it instead asks for relative links so the internal link graph keeps working.

Great for

  • Developers running gbrain or a similar git-backed knowledge base with a hosted remote such as GitHub
  • Teams with several agents or subagents writing pages to a shared checkout who need consistent links
  • People who keep getting broken or 404 links to pages their agent wrote

Skip it if

  • Users without a git-backed brain repository, since the path derivation and push steps have nothing to act on
  • Private repositories where the token is not set up, because verification will fail and the fallback chain applies
  • Anyone expecting enforced behaviour: the file describes a reporting convention the harness applies, not a tool-enforced guarantee

Try asking

  • “Give me the link to the page you just created about Alice Example”
  • “Why does this link 404? Check the path for the brain page we pushed”
  • “Report the pages you created in this batch, with a clickable link for each”
  • “Rewrite the subagent's paths so I can open them from chat”
Step-by-step guide: how to use Brain Link DisciplineInstall, 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.

    brain-link-discipline.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip brain-link-discipline.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip brain-link-discipline.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

  • Make sure the repo is pushed before asking for links, since hosted URLs return 404 until the push completes.
  • Only supply GITHUB_TOKEN for github.com remotes; the skill says never to send it to other hosts, and you should check that the remote URL is the one you expect.
  • Ask the agent to use relative links inside brain page bodies and absolute links only in chat replies.

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.