buf-bump
Skill0 starsChanged 5 months agoMITView on GitHub
Bumps generated protobuf packages in the flow-frontend monorepo and fixes the resulting TypeScript breakage. Use when the user says "buf bump", "bump protos", "update proto types", "pull the latest protos for a service", or "/buf-bump". User-invoked only — this rewrites package pins and patches consuming code.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-server-actionSkill
- brainstormingSkill
- e2e-test-fixtureSkill
- frontend-testingSkill
- new-componentSkill
- new-pageSkill
- proto-migrationSkill
- receiving-code-reviewSkill
- systematic-debugSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Ask which service(s) to bump.
- Distinctive: line 36
Canary — verify the bump actually changed versions: Run git diff pnpm-workspace.yaml.
- Distinctive: line 37
If it is empty, the pins were already current OR the bump silently no-op'd (bad auth, wrong service).
- Very specific: line 59
Do not run pnpm build:rpc as part of a bump.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Proto Bump Workflow
Runs in flow-frontend. Updates the @bufteam/* proto packages pinned in the
pnpm-workspace.yaml catalog and resolves the TypeScript breakage in consuming code. The
packages are prebuilt on the BSR npm registry (hadrian.buf.dev/gen/npm/v1) — nothing is
built locally; pnpm install fetches them. Side-effecting: it mutates lockfiles, reinstalls,
and edits source. User-invoked only.
Prerequisites
- Authenticated to the Buf registry:
buf registry login hadrian.buf.dev(cross-repo requirement). Without it,buf-bump:*cannot resolve the upstream modules.
Step 0: Confirm scope
Ask which service(s) to bump. Read the available targets from the root package.json —
do not rely on a memorized list. They drift:
node -e "console.log(Object.keys(require('./package.json').scripts).filter(s=>s.startsWith('buf-bump')).join('\n'))"buf-bump:main pulls every service from main; buf-bump:<service> pulls one.
Steps
- Capture the before-state so you can prove the bump changed something:
git diff --stat pnpm-workspace.yaml > /tmp/buf-before.txt - Run
pnpm buf-bump:<service>(orpnpm buf-bump:main). - Canary — verify the bump actually changed versions. Run
git diff pnpm-workspace.yaml. If it is empty, the pins were already current OR the bump silently no-op'd (bad auth, wrong service). Stop and report — do not proceed as if it succeeded. - Install. The bump script runs
pnpm installitself; it is what actually fetches the prebuilt packages. Canary:git diff --stat pnpm-lock.yamlmust show the new@bufteam/*versions. If the lockfile is unchanged, the install pulled nothing — stop and report; do not proceed as if it succeeded. (If the script's install step failed, runpnpm installyourself and re-check.) - Type-check with
pnpm lint:tscto surface breakage. - Fix the breakage, distinguishing mechanical from non-mechanical:
- Mechanical (renamed field, widened type, new optional field): update the
rpcToForm*/formToRpc*converters, server actions referencing the RPC, and direct proto usage in components. Use*Requiredtypes fromhadrian_protoc-gen-es-requiredfor form validation. - Non-mechanical (a field was removed, an enum value dropped, semantics changed): escalate to the user. A removed field is a backend contract change — surface it; do not silently insert a null-check or default that hides lost data.
- Mechanical (renamed field, widened type, new optional field): update the
- Test with
pnpm test. - Report the version delta (from step 3), what you fixed mechanically, and any non-mechanical changes you escalated.
Gotchas
- Do not run
pnpm build:rpcas part of a bump. Its turbo filter (turbo build --filter *-proto) matches zero workspace packages — the proto packages moved to prebuilt BSR npm packages (Nov 2024), so there is nothing to build locally.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

