Agent skill

Version Bump

by Vilin97 in Vilin97/lean-pool

Migrate the entire Lean Pool to a new Lean/Mathlib version — bump the toolchain + Mathlib + docbuild pins, repair every project's API breakage and build warnings, pass all CI gates, and open a…

Apache-2.0Auto-check passedAgent Workflows

Install Version Bump

skills CLI
$ npx skills add Vilin97/lean-pool --skill version-bump -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Vilin97/lean-pool version-bump --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Vilin97/lean-pool.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/version-bump .claude/skills/version-bump && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
version-bump
GitHub stars
1
Token cost
~1.9k tokens
SKILL.md length
945 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
Apache-2.0

At a glance

Migrate the entire Lean Pool to a new Lean/Mathlib version — bump the toolchain + Mathlib + docbuild pins, repair every project's API breakage and build warnings, pass all CI gates, and open a…

  • Works in 9 steps: Setup → RAM control — CRITICAL, get this right… → Discover breakage → …
  • The user asks to bump / migrate / upgrade the pool to a specific Lean
  • SKILL.md covers Hard constraints (never violate) and Recipe (learned from the…
  • Calls git, gh and uv

What it does

Version Bump is an agent skill from Vilin97/lean-pool. Migrate the entire Lean Pool to a new Lean/Mathlib version — bump the toolchain + Mathlib + docbuild pins, repair every project's API breakage and build warnings, pass all CI gates, and open a non-draft PR. Use when the user asks to bump / migrate / upgrade the pool to a specific Lean or Mathlib version (e.g. "bump to v4.33.0-rc1", "migrate to the latest Mathlib").

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. It works with Git. The licence is Apache-2.0.

When your agent uses it

  • The user asks to bump / migrate / upgrade the pool to a specific Lean
  • Mathlib version (e.g

Example prompts

  • “bump to v4.33.0-rc1”
  • “migrate to the latest Mathlib”
  • “/version-bump”

Requirements

  • Python 3

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Setup
  2. RAM control — CRITICAL, get this right first
  3. Discover breakage
  4. Fix errors — parallel agent Workflow (opt-in)
  5. Verify + guards
  6. Warnings — CI fails on ANY warning: line
  7. CI gates
  8. PR
  9. Cleanup

What it can do on your machine

Read from SKILL.md and the folder at commit 01db1d7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, gh and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Version Bump loads about 1.9k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 945 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Vilin97/lean-pool at commit 01db1d7, republished under its Apache-2.0 licence (© Vilin97). 945 words, ~1,871 tokens.

Download SKILL.mdSave it as .claude/skills/version-bump/SKILL.md (or your agent's skills folder).
name
version-bump
description
Migrate the entire Lean Pool to a new Lean/Mathlib version — bump the toolchain + Mathlib + docbuild pins, repair every project's API breakage and build warnings, pass all CI gates, and open a non-draft PR. Use when the user asks to bump / migrate / upgrade the pool to a specific Lean or Mathlib version (e.g. "bump to v4.33.0-rc1", "migrate to the latest Mathlib").
argument-hint
<target-version> e.g. v4.33.0-rc1

Lean Pool whole-pool version bump

Migrate the whole pool to the target version given as the argument (e.g. v4.33.0-rc1). If no version was given, ask for it before starting. Treat the constraints below as the directive.

Hard constraints (never violate)

  1. No statement drops. Every theorem/lemma/def/instance/structure/inductive/class/abbrev that exists now must still exist when done.
  2. Modify a statement only when the statement itself does not compile under the target (a renamed/removed Mathlib symbol in its type, or a name that now collides with a new Mathlib decl). Then make the minimal meaning-preserving change (usually a rename keeping statement + proof). Everything else: change only proof bodies / tactics / syntax. def→theorem keyword changes for Prop-valued decls flagged by the defProp linter are allowed (same statement).
  3. Keep RAM under 24 GB the whole time.
  4. Work in a new git worktree (e.g. ~/Github/lean-pool-v<ver>), not the main checkout.
  5. Open a non-draft PR once finished. Aim for all CI gates green before declaring done.
  6. Never add sorry/admit/native_decide/new axiom/unsafe/partial/maxHeartbeats increases/set_option linter.* false/nolint waivers. Fix the code, not the check. Never edit .github/workflows, quality.py, lint configs, or lakefile.toml's [leanOptions].

Recipe (learned from the v4.32.0-rc1 bump — see memory v432-bump-recipe.md)

0. Setup
  • Confirm the tags exist upstream: git ls-remote --tags for leanprover-community/mathlib4, leanprover/lean4, leanprover/doc-gen4.
  • git worktree add -b <branch> <dir> main.
  • Bump lean-toolchain, lakefile.toml (mathlib rev), docbuild/lean-toolchain, docbuild/lakefile.toml (doc-gen4 rev).
  • lake update mathlib then lake exe cache get; later cd docbuild && lake update doc-gen4 (verify its manifest's mathlib rev matches the main one).
1. RAM control — CRITICAL, get this right first
  • Lake 5.0 ignores LAKE_JOBS and -j. The only working lever is export LEAN_NUM_THREADS=2 in ~/.zshenv (so agent shells inherit it) — caps lake to ~3 concurrent compiles. Remove this line at the end.
  • The real RAM hog is the lean-lsp MCP: each query spawns a ~3 GB lean --worker; under parallel agents these pile up to 30+ GB. Disable it with a persistent pkill -9 -f 'lean-lsp-mcp' loop (1 s) so its calls fast-fail and agents fall back to CLI. Do NOT reap only lean --worker — that makes an agent's in-flight MCP call hang and stalls the whole run.
  • Run a watchdog Monitor on total Lean RSS; if it nears the cap, kill v<ver> processes and lower concurrency.
2. Discover breakage
  • lake build LeanPool (capped). Bucket errors per project and per root cause.
3. Fix errors — parallel agent Workflow (opt-in)
  • Use the Workflow tool: one agent per failing project, a custom poolMap(items, k, …) for concurrency 2–3 (the default 10 is too much RAM), effort:'high', CLI-only (tell agents lean-lsp is disabled; use lake build LeanPool.<P>, lake env lean <file>, rg over .lake/packages/mathlib).
  • Bake the hard constraints into every agent prompt. Have each return a structured summary (statementsModified, introducedForbidden).
  • Recurring v4.32-era API deltas (re-derive for the new version): coe_injective'→coe_injective (SetLike/DFunLike field), return→pure in metaprogram do-blocks, Set.diff_*→Set.sdiff_* family, Symmetric→local IsSymmetric (Mathlib's Symmetric deprecated for Std.Symm), @[expose] public collisions, defProp def→theorem.
  • Transient API "rate limited" / "session limit" failures kill whole rounds — just re-run the not-green subset. Commit after each clean milestone (an agent can leave the tree broken; commit = cheap recovery).
4. Verify + guards
  • Whole-pool lake build LeanPool → 0 errors.
  • Drop-guard: for each changed file, diff declaration names (git show main:<f> vs current) — any name present on main but missing now must be an intended forced rename, not a drop.
  • Forbidden scan: git diff main added lines must contain no sorry/admit/native_decide/maxHeartbeats/linter-disable.
Show full SKILL.md (385 more words)Show less
5. Warnings — CI fails on ANY warning: line
  • Collect warnings from the build; run a second per-project Workflow to clear them (deprecation renames per the warning's "Use X instead", unused-simp-arg removal, no-op/never-executed tactic removal, defProp def→theorem, import narrowing). Rebuild to 0 warnings.
6. CI gates

lake exe mk_all --check, lake exe runLinter LeanPool, lake exe lint-style LeanPool, and cd python && uv run python -m lean_pool.quality --repo ...

  • Watch the defProp × proof-size catch-22: def→theorem can push a Prop's large proof over quality.py's 200-line gate, and quality.py only delimits proofs at theorem/lemma (it lumps a following run of defs into the preceding theorem's count). Fix by extracting the proof's match/case sub-blocks into new private lemmas placed before the theorem, AND reordering any independent def block out of the measured region (before the first theorem). Proofs only — no signature changes.
7. PR
  • The content-pr-guard exempts bump metadata: a PR may carry content (LeanPool/**/*.lean) alongside ONLY lean-toolchain, lakefile.toml, lake-manifest.json, docbuild/{lean-toolchain,lakefile.toml,lake-manifest.json}. Anything else non-content alongside content fails the guard.
  • Commit, push, gh pr create --base main non-draft. PR body: list every statement-level change (collision renames, def→theorem) with reasons, and the verification (build 0/0, all gates pass).
  • Confirm all PR checks pass on the head commit SHA (gh pr checks, and verify the runs' head_sha == HEAD) before reporting done. Don't trust a stale CI run from an earlier failing commit.
8. Cleanup
  • Remove the LEAN_NUM_THREADS=2 line from ~/.zshenv; stop the lean-lsp reaper and watchdog monitors.
  • Worktrees / disk. Each worktree carries its own ~5 GB .lake, so reclaiming disk matters — but do it carefully. This machine runs multiple concurrent Claude sessions, and an old-campaign-named worktree (e.g. lean-pool-w2-*, compress*/…) may still be actively in use by another session. Remove ONLY: (a) the worktrees this bump created, and (b) verifiably-stale ones — where NO running process has the dir as cwd (check with lsof -a -d cwd) AND nothing was modified recently (find <wt> -newermt '-1 day' -not -path '*/.lake/*'). Use plain git worktree remove — its refusal on a dirty/active tree is the safety, so respect it. NEVER use git worktree remove --force, and never a blind loop/sweep over all worktrees. When unsure, list the candidates and ask the user. Removing a worktree keeps its branch (committed work is safe) but destroys any uncommitted changes — and yanks the cwd out from under any live process there.

© Vilin97, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/version-bump of Vilin97/lean-pool.

Open the folder on GitHubat commit 01db1d7

Compare with similar skills

Version Bump next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Version Bump compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Version Bump this skillVilin97/lean-pool1—~1.9kAutomated safety check: PassApache-2.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
O2 Review Loopopenobserve/openobserve22k—~3.7kAutomated safety check: PassAGPL-3.0
Beads Task Memorygastownhall/beads28k—~1.2kAutomated safety check: PassMIT
Bd To Br MigrationDicklesworthstone/beads_rust1.1k—~2.2kAutomated safety check: PassCustom licence
Readyprekuter/dryforge4131 repos~6.8kAutomated safety check: PassApache-2.0

Similar skills

  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Beads Task Memory

    gastownhall/beads

    Tracks multi-session work with dependencies in the bd issue tracker so the agent can find ready tasks and recover its context after conversation compaction.

    28k GitHub stars~1.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Bd To Br Migration

    Dicklesworthstone/beads_rust

    Migrate docs from bd (beads) to br (beadsrust). An agent skill from Dicklesworthstone/beads_rust.

    1.1k GitHub stars~2.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Ready

    prekuter/dryforge

    Understand what you mean before anything is built. An agent skill from prekuter/dryforge.

    413 GitHub starsUsed in 1 repo~6.8k tokens
    Agent WorkflowsAuto-check passed
  • A skill your agent uses when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git…

    5.6k GitHub starsUsed in 14 repos~2k tokens
    Agent WorkflowsAuto-check passed

More from Vilin97/lean-pool

  • Version Bump Project

    Vilin97/lean-pool

    Repair a SINGLE Lean Pool project's build against a new Lean/Mathlib release.

    1 GitHub stars~1.2k tokensUpdated 4 days ago
    Auto-check passed

Works with

Questions about Version Bump

What does Version Bump do?

Migrate the entire Lean Pool to a new Lean/Mathlib version — bump the toolchain + Mathlib + docbuild pins, repair every project's API breakage and build warnings, pass all CI gates, and open a…. Version Bump is an agent skill from Vilin97/lean-pool. Migrate the entire Lean Pool to a new Lean/Mathlib version — bump the toolchain + Mathlib + docbuild pins, repair every project's API breakage and build warnings, pass all CI gates, and open a non-draft PR.

When should I use Version Bump?

Version Bump fits situations like: the user asks to bump / migrate / upgrade the pool to a specific Lean; mathlib version (e.g.

How do I install Version Bump in Claude Code?

Run `npx skills add Vilin97/lean-pool --skill version-bump -a claude-code`. Or copy the skill folder (.claude/skills/version-bump in Vilin97/lean-pool) into .claude/skills/version-bump in your project. Claude Code loads it when a task matches its description.

How do I install Version Bump in Codex?

Run `npx skills add Vilin97/lean-pool --skill version-bump -a codex`. Or copy the skill folder (.claude/skills/version-bump in Vilin97/lean-pool) into .agents/skills/version-bump in your project. Codex loads it when a task matches its description.

Can I use Version Bump in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Vilin97/lean-pool --skill version-bump -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/version-bump, .gemini/skills/version-bump, .github/skills/version-bump and .opencode/skills/version-bump in your project.

What does Version Bump need to run?

Going by SKILL.md and its folder, Version Bump needs the command-line tools its instructions call (git, gh and uv). Our summary lists: Python 3.

Does Version Bump access the network?

SKILL.md contains no URLs. Its commands use git, gh and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Version Bump safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Version Bump use?

Version Bump is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Version Bump use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Version Bump?

Skills that share tags, products or a category with Version Bump: Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars), O2 Review Loop (openobserve/openobserve, 22k stars), Beads Task Memory (gastownhall/beads, 28k stars) and Bd To Br Migration (Dicklesworthstone/beads_rust, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Version Bump?

Vilin97 (a GitHub user) maintains it in Vilin97/lean-pool, which has 1 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

Source: Vilin97/lean-pool on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.