bl-undo

bl-undo is a skill for Claude Code from jpoutrin/product-forge. It costs 16 tokens per session (1,206 once invoked), scanned A, original, MIT.

A Git-branchless recovery helper for undoing repository operations and restoring earlier states. Git-branchless is a Git workflow that tracks changes as a navigable stack of commits.

In plain words
What is it for?
Use it to undo the last operation, browse repository history, hide or restore commits, and recover from Git workflow mistakes.
Why use it?
It helps recover from mistakes involving commits, rebases, merges, branches, or checkouts while showing which earlier state can be restored.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the git-workflow plugin — 11 skills, 8 agents shipped together

Good fit Use it to undo the last operation, browse repository history, hide or restore commits, and recover from Git workflow mistakes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jpoutrin/product-forge/bl-undo
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jpoutrin/product-forge --skill bl-undo
Clone the repo
git clone --depth 1 https://github.com/jpoutrin/product-forge

Made for: Claude Code.

Or install git-workflow, the plugin that ships this one along with the rest of its 11 skills, 8 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bl-undo

README.md
[![agentmods](https://agentmods.dev/badge/skills/jpoutrin/product-forge/bl-undo/github.svg)](https://agentmods.dev/skills/jpoutrin/product-forge/bl-undo)
Your own site
<a href="https://agentmods.dev/skills/jpoutrin/product-forge/bl-undo"><img src="https://agentmods.dev/badge/skills/jpoutrin/product-forge/bl-undo/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bl-undo

Your own site · 80×15
<a href="https://agentmods.dev/skills/jpoutrin/product-forge/bl-undo"><img src="https://agentmods.dev/badge/skills/jpoutrin/product-forge/bl-undo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,206 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.01206
Opus 5.5 $0.00006 $0.00482
Sonnet 5.5 $0.00003 $0.00241
Haiku 4.5 $0.00002 $0.00121

Measured 1mo ago against content hash 3250cd778337, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bl-undo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/git-workflow/skills/bl-undo/SKILL.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/bl-undo - Git-Branchless Undo & Recovery

Category: Git Workflow

Recover from mistakes using git-branchless's powerful undo system. Browse repository history and restore previous states.

Usage

/bl-undo [options]

Options

Option Description
(none) Quick undo of last operation
-i Interactive mode - browse history
--hide <hash> Hide a commit from smartlog
--unhide <hash> Restore a hidden commit

Examples

# Undo the last operation
/bl-undo

# Interactive undo - browse and select state
/bl-undo -i

# Hide an experimental commit
/bl-undo --hide abc1234

# Restore a hidden commit
/bl-undo --unhide abc1234

What Can Be Undone

  • Commits and amended commits
  • Rebases and merges
  • Branch creations, moves, deletions
  • Checkouts

What Cannot Be Undone

  • Uncommitted file changes
  • Untracked file changes
  • Pushed commits (remote changes)

Execution

This command delegates to the bl-undo-expert agent:

Task(subagent_type="git-workflow:bl-undo-expert",
     prompt="Execute undo: <options>")

Execution Instructions

  1. Assess Situation

    • Show current state with git sl
    • Identify what might need undoing
  2. Execute Undo

    • For quick: Run git undo, confirm
    • For interactive: Run git undo -i, guide navigation
    • For hide/unhide: Run respective command
  3. Verify Result

    • Show final state with git sl
    • Confirm expected commits are present

Interactive Flow

User: /bl-undo

Agent: Checking last operation...

Last operation: git rebase -i main
  - Dropped: "feat: add OAuth"
  - Reordered: 2 commits

This will restore:
◆ abc1234 (main) initial commit
┃
◯ def5678 feat: add auth base
┃
◯ ghi9012 feat: add OAuth       ← Will be restored
┃
◯ jkl3456 feat: add Google login
┃
● mno7890 feat: add GitHub login

Undo this operation? [y/n]:
User: /bl-undo -i

Agent: Opening interactive undo...

git undo -i

This opens a browser interface. Use:
  ← → arrow keys to navigate through time
  Each state shows the smartlog at that point
  Find the state BEFORE your mistake
  Press Enter to select, then y to confirm

[User navigates in terminal]

After user confirms...

◆ abc1234 (main) initial commit
┃
◯ def5678 feat: add User class
┃
◯ ghi9012 feat: add validation
┃
● jkl3456 feat: add repository

Restored to state before the bad rebase.
All 3 commits recovered.

Read the full file on GitHub · 219 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 219 lines · 16 tokens per session scan A 3250cd778337

Subscribe to this mod's changes

bl-undo is a skill published in the GitHub repository jpoutrin/product-forge (16 stars, last pushed 7mo ago), licensed MIT. It adds 16 tokens to every session and 1,206 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.