skills/skillpack-harvest/SKILL.md
Lift a proven skill from a host repo (e.g. your OpenClaw fork) back into gbrain's bundle so other clients can scaffold it. Editorial workflow: the CLI does the file copy + privacy lint; this skill drives the judgment-heavy genericization (scrub real names, generalize triggers, lift fork-specific conventions to references).
npx skillsauth add garrytan/gbrain skillpack-harvestInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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/wintermute, not ~/git/wintermute/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
Wintermute → your OpenClaw (or OpenClaw deployment)Neuromancer, Zion, <personal-fork-name> → same treatmentgarry, jane, etc.) → the user /
you / a generic placeholderReal entities → placeholders
alice-example, acme-example, fund-a, etc.)[email protected]#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: \bWintermute\b, email, Slack channels)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. "Wintermute 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 alphabeticallyresearch
Self-evolving skill optimization via SkillOpt-paper-grounded text-space optimizer.
development
Keep gbrain current. When a `gbrain` invocation prints an `UPGRADE_AVAILABLE <old> <new>` marker (or `gbrain self-upgrade --check-only` reports an update), apply it per the configured self_upgrade.mode: notify (prompt the operator with a 4-option question + snooze) or auto (apply silently). The action is always the hardcoded `gbrain self-upgrade` — never a command read from the marker.
data-ai
Set up GBrain with auto-provision Supabase or PGLite, AGENTS.md injection, first import
tools
--- name: query-helper triggers: - find a page tools: - search - query writes_pages: false --- # query-helper This skill helps you query the brain. The first prose line becomes the description when no `description:` frontmatter is present.