Setup
28.9kConfigura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
- Costo de contexto al activarse
- 7.4k tok
- Tamaño del paquete
- 1 archivo
- Última actualización
- hace 4 días
Lleva una skill probada de un repo host de vuelta al bundle de gbrain: el CLI copia y aplica el lint de privacidad; esta skill dirige la genericización editorial.
en todo el repo
0–100, la ruta de este skill
último commit aquí
últimos 90 días
81 tok en reposo
12 KB
Funciona con cualquier agente que lea SKILL.md
npx -y skills add garrytan/gbrain --skill skillpack-harvest --agent claude-codeSe instala solo en este repositorio.
Di cualquiera de estas frases y el agente debería cargar este skill.
Convention: see _brain-filing-rules.md for file placement rules. This skill writes into gbrain's own tree, not the brain repo's notes.
This skill is the inverse of gbrain skillpack scaffold. Scaffold ships
skills downstream (gbrain → host). Harvest lifts proven patterns
upstream (host → gbrain) so they become references every other client
can scaffold.
A harvest is "properly done" when:
gbrain skillpack harvest --dry-run previewed the file set.gbrain skillpack harvest <slug> --from <host> succeeded
with status: harvested (no privacy-lint hits).bun test test/skills-conformance.test.ts passes on the new
skills/<slug>/SKILL.md.If any of these is incomplete, the skill is NOT yet harvested — the files may sit in gbrain's working tree, but they're not landed.
This skill produces three artifacts in gbrain's working tree:
skills/<harvested-slug>/SKILL.md (and any sibling files like
routing-eval.jsonl)src/commands/<slug>.ts) when the host SKILL.md declared them
in frontmatter sources:openclaw.plugin.json with the new slug added to
skills: (sorted)The session output to the user is a one-line success summary plus
a list of files written. JSON mode (--json) returns the full
HarvestResult shape for machine consumption.
git checkout away, but you
shouldn't need to.--no-lint without justification. The lint exists
for a reason. If you bypass it, document why in the commit.rm -rf the source after harvesting.Do NOT invoke when:
Before running this skill, confirm:
The skill is mature. Recent routing-eval.jsonl cases pass; the
skill has been used in production at least a few times.
The skill is generalizable. Strip-test in your head: replace every fork-specific name. Does it still make sense as a skill?
The user owns the gbrain checkout. The harvest writes into gbrain's working tree. They'll review and commit. Don't harvest into a checkout the user doesn't intend to commit from.
Ask the user:
~/git/agent-fork, not ~/git/agent-fork/skills/foo.)sources: array.)Run the CLI with --dry-run:
gbrain skillpack harvest <slug> --from <host-repo-root> --dry-run
The output shows:
Do not skip the dry-run. The privacy linter only runs on a real harvest, but the dry-run preview lets you see the files before they land. Spot-check the SKILL.md and any paired source for things the linter might miss (proper nouns, internal project names, etc.).
Before running the real harvest, walk the host's skills/<slug>/
files and apply this checklist. If anything matches, edit the host
file FIRST, then run harvest.
Fork-specific names → generic phrasing
<personal-fork-name> → your OpenClaw (or OpenClaw deployment);
any pet name for the user's private agent gets the same treatmentgarry, jane, etc.) → the user /
you / a generic placeholderReal entities → placeholders
alice-example, acme-example, fund-a, etc.)example@example.com#some-channel or stripFork-specific conventions → references
<host-repo>/docs/... files → either lift the doc
into gbrain OR replace with a generic placeholder explanation<host-repo>/skills/<other-fork-only-skill> → either
decide to harvest that one too, or replace with a generic
pattern referenceTriggers array generalizes
triggers:. None should
reference the user's name, fork name, or internal tools.routing-eval.jsonl examples are scrubbed
skills/<slug>/routing-eval.jsonl. Every intent field
gets the same scrub as triggers:.Code comments + log strings
Once Phase 3 is complete, run the real harvest:
gbrain skillpack harvest <slug> --from <host-repo-root>
Default behavior:
~/.gbrain/harvest-private-patterns.txt
(plus built-in defaults — the canonical private fork name, email
addresses, Slack channels; see src/core/skillpack/harvest-lint.ts)openclaw.plugin.json updated to add the slug, sortedOutcomes:
harvested — success, manifest updated, files in gbrain's treelint_failed — privacy linter caught something. Go back to Phase 3,
scrub the host file, retry.slug_collision — gbrain already has a skill at that slug. Either
use a different slug, or pass --overwrite-local if you really
mean to replace.After a successful harvest:
bun test test/skills-conformance.test.ts — confirms the new
SKILL.md meets the frontmatter contract.gbrain skillpack check --strict — confirms no drift between
bundle and gbrain's own checkout.gbrain skillpack list — confirms the slug shows up in the bundle.cd <gbrainRoot> && git diff -- skills/<slug>/If other gbrain clients should pick up the new skill:
CHANGELOG.md under "Skills added" for the next release--no-lintThe privacy linter is the safety net. The editorial pass is the
primary defense. If you've completed Phase 3 thoroughly and the
linter is still firing on a false positive, use --no-lint:
gbrain skillpack harvest <slug> --from <host-repo-root> --no-lint
Document the bypass in the commit message. Future maintainers should be able to see WHY the lint was bypassed (e.g. "the fork name appears in a citation, not a real reference — verified manually").
Never bypass the linter on a casual basis. The whole point of the default-on lint is that real names occasionally slip through the editorial pass.
skills/<slug>/
stays in place.--all (no batch harvest). One skill at a
time keeps the editorial review tractable.skills/<slug>/ — every file in the host skill dir
(copy)src/commands/<slug>.ts if the host SKILL.md declares it
in frontmatter)openclaw.plugin.json — adds the slug to skills:
array, sorted alphabetically, without removing OpenClaw-native plugin fields
like id, configSchema, or contractsReproducido de garrytan/gbrain bajo licencia MIT. Leer esta página en markdown.
2 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.
El usuario debe poseer el checkout de gbrain y la skill host debe ser madura, con casos recientes de routing-eval que pasen.
Este repo incluye 75 skills. Si instalas uno, normalmente ya tienes los demás.
Configura GBrain con auto-aprovisionamiento de Supabase o PGLite, inyección en AGENTS.md y primera importación.
Chequeos de salud del brain: aplicación de back-links, auditoría de citas, validación de filing, detección de info obsoleta, páginas huérfanas y benchmarks.
Migra un brain de gbrain-base a la taxonomía de 14 tipos canónicos de gbrain-base-v2 usando gbrain onboard --check y el handler Minion unify-types.
Cuándo y qué recuperar: abre la página del brain de una entidad relevante antes de responder desde memoria.
Operaciones del brain: búsqueda primero, ciclo leer-enriquecer-escribir, atribución de fuentes, enriquecimiento ambiental y back-linking. Leer antes de cualquier interacción con el brain.
Importa exports de ChatGPT, Claude y Perplexity y transcripciones de sesiones como páginas fechadas en conversations/, valida y extrae hechos, y mantiene el archivo sin huecos con detección y backfill.
Cuando reportas una página de brain, el enlace que funciona debe ir en el mismo mensaje: ruta derivada de git, push antes de enlazar, verificación del enlace y una cadena de fallback si no hay remoto.
Auditoría de higiene de tokens del stack siempre cargado (CLAUDE.md, AGENTS.md, MEMORY.md, SOUL.md, etc.): detecta redundancia, contradicciones y candidatos a compresión. Solo informa, nunca edita archivos.
Valida y repara automáticamente el frontmatter YAML de las páginas del brain antes de que entren corruptas, envolviendo la CLI `gbrain frontmatter`.”