# Brain Link Discipline

When you report a brain page to the user, created, edited, committed, or relayed from...

- Repository: https://github.com/garrytan/gbrain (31427 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add garrytan/gbrain --skill brain-link-discipline -g -a claude-code -y`
Codex: `npx skills add garrytan/gbrain --skill brain-link-discipline -g -a codex -y`
Cursor: `npx skills add garrytan/gbrain --skill brain-link-discipline -g -a cursor -y`
Gemini CLI: `npx skills add garrytan/gbrain --skill brain-link-discipline -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add garrytan/gbrain`

## Description

When you report a brain page to the user, created, edited, committed, or relayed from a subagent, a working link is part of the deliverable, in the SAME message. Derive the path mechanically (git ls-files --full-name), push BEFORE linking, verify the link resolves when a hosted remote exists, and degrade through a defined fallback chain when it doesn't. Inside brain pages the rule inverts: relative links preserve the link graph; absolute URLs are for chat deliverables only.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# brain-link-discipline, The Link Is Part of the Deliverable

> **Convention:** see [_output-rules.md](../_output-rules.md), the
> Deterministic Links section carries the cross-skill canon (in-page relative
> vs in-message verified, plus the fallback chain). This skill carries the
> mechanics: path derivation, push-before-link ordering, verification, the
> subagent-relay rewrite, and bulk-list formatting.
>
> **Convention:** [conventions/brain-first.md](../conventions/brain-first.md)
> states the one-line principle ("every brain page reference in output should
> use a clickable link format appropriate to the deployment"). This skill is
> that line's full expansion.

This is a reporting convention the harness routes brain-page delivery
messages through, a standing rule to apply when composing such messages,
not a mechanical guarantee enforced by tooling.

## The rule (same message)

If you commit and push a brain page, the link goes in the SAME message that
reports the work. Every time. No "let me commit and push" without the link
landing in that same reply once the push succeeds. The user should never
have to ask "give me the link" or "where is the page."

This applies to:

- Any message reporting a created or edited brain page
- Bulk reports ("5 pages created", every page gets its own link line)
- Referencing a brain page in normal conversation
- Relaying subagent results that mention brain paths (rewrite first, see below)

The most common link bug is committing a brain page and forcing the user to
go find it. The link is a deliverable, not a follow-up.

## Scope split: in-message vs in-page (the inversion)

The two output surfaces take OPPOSITE link forms:

The rest: https://github.com/garrytan/gbrain/blob/HEAD/plugin-variants/gbrain-coding/skills/brain-link-discipline/SKILL.md
