brain-link-discipline
O que ela faz
Esta skill define uma regra de relato para o agente quando ele cria ou edita páginas em um cérebro de conhecimento. É voltada para quem precisa abrir as páginas que o agente menciona.
Quando usar
- ✓Quando seu agente cria ou edita uma página do cérebro e informa o resultado a você.
- ✓Quando um agente relata várias páginas de uma vez e cada uma precisa do seu próprio link.
- ✓Quando os resultados de um subagente mencionam páginas do cérebro que você precisa abrir.
Link da skill
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/brain-link-discipline/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Você atualizou a página de integração no cérebro? Por favor, me envie o link para ela.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente descobre o caminho da página, envia a mudança antes de criar o link, verifica se o link funciona e recorre a uma opção declarada se não conseguir.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
brain-link-discipline — The Link Is Part of the Deliverable
Convention: see _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 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:
| Surface | Link form | Why |
|---|---|---|
| Chat message to the user | Absolute, verified URL (or the fallback chain below) | Repo-relative paths aren't clickable in chat surfaces |
| Inside a brain page body | RELATIVE markdown link: [Alice Example](../people/alice-example.md) |
gbrain's link extraction builds the links/backlinks graph — which powers relational retrieval — from filesystem-relative links. An absolute URL between two brain pages is invisible to that graph |
Never write absolute URLs for page-to-page references inside a brain
page. Absolute URLs in a page body are for genuinely external targets
only. Frontmatter related: / people: keys stay bare relative paths
(machine-parsed, not rendered prose). After a link-heavy write,
gbrain check-backlinks check audits the graph and gbrain sync --no-pull
makes the pages searchable.
Deriving the path mechanically
The repo-relative path a hosted git remote serves is relative to the git
repo root (git rev-parse --show-toplevel), NOT your current working
directory. When the repo root sits above your working directory, hand-
stripping your cwd prefix silently drops the intermediate directory segment
and every link you build 404s. Never hand-strip a prefix. Derive:
# From anywhere inside the repo, prints the EXACT path the remote serves:
cd "$(dirname <file>)" && git ls-files --full-name "$(basename <file>)"
# e.g. people/alice-example.md
Then assemble:
https://<host>/<owner>/<repo>/blob/<branch>/<that-exact-path>
<host>/<owner>/<repo>fromgit remote get-url origin<branch>fromgit rev-parse --abbrev-ref HEAD(or the remote's default branch)/blob/for files,/tree/for directories (GitHub-style hosts)
Sequence (push BEFORE link)
- Write/edit the brain file.
scripts/brain-commit-push.sh "<msg>" <file>(orgbrain git commit-push -m "<msg>" -- <file>when the brain has no helper). It commits only that file under the checkout's writer lock and pushes, merging remote commits without touching other agents' files.- Verify the push landed — the command must exit 0 and print
pushed <sha> to origin/<branch>(ornothing to commit; a[gbrain notice]that the checkout lags is still a landed push). A hosted URL 404s until the push completes. On a non-zero exit, output no link: retry once oncommit_lock_busy; stop and tell the user onintegrate_conflictorwriter_coordinator_required; never fall back to stash,pull --rebaseor a plain push (outcomes). - In the SAME message that reports the commit, output the link — as a clickable markdown link or bare URL, never a backticked code span.
Perguntas frequentes
Por que enviar antes de criar o link?
A skill diz que um link deve apontar para um conteúdo que já existe online, então o envio vem primeiro.
E se não houver um remoto hospedado?
A skill descreve uma cadeia de alternativas para esse caso, para que você ainda tenha uma referência utilizável.
A regra vale dentro das páginas?
A skill diz que a regra funciona de forma diferente dentro das páginas, onde são usados links relativos.
Detalhes
Descrição original do autor
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.
repo: garrytan/gbrain
Popularidade
- Estrelas no GitHub
- 31 mil
- Posição no ranking
- #9249
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
gbrain
31 milPermite que seu agente pesquise em um cérebro de conhecimento compartilhado da empresa, buscando fatos sobre pessoas, projetos e decisões, e salve notas duráveis nele.
brain-ingest-gate
31 milVerifica um novo conteúdo contra um cérebro de conhecimento existente antes de adicioná-lo, para evitar duplicatas e resolver entidades nomeadas primeiro.
brain-ops
31 milOferece ao seu agente a rotina básica de um cérebro de conhecimento: consultar o contexto, salvar notas com a fonte e ligar páginas relacionadas.
concept-synthesis
31 milTransforma um grande conjunto de páginas de conceitos dispersas em um mapa de ideias organizado em níveis, sem duplicatas, mostrando como cada ideia evoluiu.
Skills parecidas
technical-documentation
394 milAjuda seu agente a escrever e revisar documentação técnica clara e arquivos de instruções, para que pessoas e ferramentas de IA sigam tudo com facilidade.
architecture-decision-records
280 milFaz seu agente registrar decisões importantes sobre a estrutura do projeto. Ajuda a entender o porquê das escolhas feitas e a manter um histórico claro das mudanças.
code-tour
280 milFaz seu agente criar guias passo a passo no código, com arquivos e linhas exatos. Útil para apresentar projetos, explicar código ou revisar mudanças.