Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

brain-link-discipline

Skill by garrytan

Formats links to brain pages in chat replies for AI assistants. It derives the repo path with git, pushes before linking, and falls back to a local path or HTML artifact when no hosted remote exists.

  • Score 94
  • 34k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install brain-link-discipline

Built from the published package, never by AI.

git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.claude/skills && cp -r /tmp/gbrain/skills/brain-link-discipline ~/.claude/skills/brain-link-discipline

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install brain-link-discipline in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

brain-link-discipline is a reporting rule for AI assistants that write brain pages in a git-backed brain repo. When the assistant reports a created, edited, committed, or relayed page, it should include a working link in the same message. The skill sets the order: derive the repo path with git ls-files --full-name, push before linking, and verify the link when a hosted remote exists.

If no hosted remote exists, it falls back to a repo-relative path or a gbrain publish HTML artifact. Inside brain pages the rule inverts, so cross-references use relative markdown links to keep the links and backlinks graph intact. The skill is aimed at users of the gbrain brain workflow who want clickable page links in chat.

Written from the project's SKILL.md and checked against it.

What it can do

  • Same-message linksPuts a working link to each reported brain page in the same reply as the report.
  • Path derivationBuilds the repo-relative path with git ls-files --full-name instead of hand-stripping prefixes.
  • Push before linkConfirms the push landed before outputting any hosted URL.
  • Link verificationChecks a hosted link resolves before sending it, when a hosted remote exists.
  • Fallback chainFalls back to a repo-relative path or a gbrain publish HTML artifact when no hosted link is possible.
  • Subagent relay rewriteRewrites local brain paths from subagent results into links before replying.

What you need

  • git
  • gbrain
  • A GitHub token for verifying links in private repos

Try asking

  • Give me the link to the page you just created.
  • Report the brain pages you edited, each with its own link.
  • Rewrite the subagent's brain paths as links before you reply.

Good to know

  • Describes a reporting convention, not a rule enforced by tooling.
  • Hosted links into a private brain repo open only for people with repo access.
  • Link verification needs a hosted remote; otherwise the repo-relative path is given.
  • Inside brain pages, absolute URLs are not used for page-to-page references.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/brain-link-discipline/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md13 KB
  • routing-eval.jsonl1 KB

Alternatives to brain-link-discipline

All alternatives →

Compare with agentmemory-config, understand-knowledge or reports

brain-link-discipline: common questions

Why does the brain link need to be in the same message?

The source says the user should never have to ask for the link after a commit. The link is treated as part of the deliverable.

What happens if the brain repo has no hosted remote?

The assistant gives the repo-relative path and says it is a local path. It can also offer a gbrain publish HTML file to attach.

Should links inside a brain page be absolute?

No. Page-to-page references inside a brain page should be relative markdown links so the links and backlinks graph works.

How do I install brain-link-discipline?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is brain-link-discipline free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is brain-link-discipline safe to use?

It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to brain-link-discipline?

Similar skills: agentmemory-config, understand-knowledge, reports, forget.

brain-link-discipline Install

Add to stack

Loading.