bunderlog

Guards · Claude Code plugin

Bagheera

Each person’s session machinery: a guard on secrets and Git hooks, a status line, a doctor, and a review of what each session settled.

Keeps passwords and keys out of Claude’s sight and stops it from skipping your checks. Shows what each session costs and what it settled.

Installed once by each person, for all their sessions

Everybody knew Bagheera, and nobody cared to cross his path… But he had a voice as soft as wild honey dripping from a tree, and a skin softer than down.

Rudyard Kipling, Mowgli’s Brothers, The Jungle Book, 1894

What it does

10 things Bagheera does for you

Every command of the three plugins on one page, and the way from an idea to a pull request: the map.

Secrets stay out of the session
Claude cannot read an .env file, a private key or ~/.aws/credentials, and cannot print a token with printenv, gh auth token or echo $API_KEY. Templates such as .env.example stay readable, and so do counts and names of variables.
Git hooks can’t be skipped
Claude cannot commit with --no-verify or -n, point core.hooksPath elsewhere or set HUSKY=0. When skipping is really needed, the refusal tells Claude to ask you to run the command yourself.
Nothing hidden in what Claude writes
Claude cannot write a character you can’t see: the bidi controls of Trojan Source, zero-width spaces, or tag characters copied in from a web page. The refusal, bagheera:no-hidden-characters, names the character and where it is. Emoji, and Hebrew, Arabic and Persian text, pass.
/bagheera:setup a project set up
Writes what a set-up project commits: the marketplace and plugins in .claude/settings.json, deny rules for secret files, the line in CLAUDE.md, .hathi.yml and .githooks/. You review the diff and commit it.
A status line that tells you something
Project and branch with what is not committed or pushed, how full the context is, the 5-hour and 7-day limits, how long the prompt cache stays warm, the model and effort, grey until one turns yellow or red. It also counts your other sessions waiting for you and the projects on this machine that need you, and shows a newer Bagheera to restart into or update to.
/bagheera:doctor
Shows what needs attention here or in any project on this machine, problems first, each with what fixes it: a newer version waiting for a restart, proposals waiting, an old setting to remove. It changes nothing.
Session review
When a session ends, a separate review reads it and proposes what you settled but did not write down: a term, a decision, a requirement. Next session you accept, reject or defer each. It is capped at $3 a review.
/bagheera:retro
Reads past sessions, masked, and finds up to three stalls: refused calls, repeated prompts, corrections. For each it proposes the setup change that would have spared it and applies only what you pick.
/bagheera:assess what pays off
Bagheera counts each session at its end: names and numbers only, never what was said. The assessment reports the last 30 days beside the 30 before: each check’s refusals, the skills loaded, how often an ADR or PRD was read before an edit, and the session review’s proposals. It asks you to label each refusal real or false. Nothing leaves your machine.
Short replies
An output style that has Claude answer like a colleague: the answer first, no preamble, no recap, no praise for the question. Code, commits and documents keep their full length.

Use cases

What happens, situation by situation

Claude reaches for a secret

Debugging a failed connection, Claude tries to read the environment file. Bagheera refuses before the file is opened and says why. The template is still readable, so Claude can see which variables exist.

tool calls
● Bash cat .env
  bagheera:no-secrets-in-context: .env is an env file: showing it
  would put a secret into this session. If it's really needed, ask
  the user to look in their own terminal.
● Read .env.example
  DATABASE_URL=postgres://shop:*****@localhost/shop

A Git hook refuses a commit

The commit check fails and Claude tries to go around it. Bagheera stops the bypass, so Claude has to fix the commit instead.

tool calls
● Bash git commit --no-verify -m "fix: cart total"
  bagheera:no-git-hook-bypass: --no-verify skips the Git hooks.
  If it's really needed, ask the user to run it themselves
  with ! <command>.

A decision nobody wrote down

An hour of design talk ends with a clear rule about retries, and nobody records it. The session review notices it and leaves a proposal. Nothing reaches .about/ until you accept it. In our own sessions, 58% of what a review recorded came up again in a later session.

next session start
bagheera  session review of 2026-11-10: 2 Proposals
  P1 · adr · edit · billing.md · Billing retries after 30 s, 3 times
  P2 · glossary · add · Refund
claude  Accept, reject or defer P1?

Grey until something needs you

The line under the prompt stays grey while all is well. Here the context has passed 20% and turns red, the 7-day limit has passed 80% and turns yellow, another session is waiting for you and two projects on this machine need attention. The doctor says which, and what to do about each.

status line
shop main ±3 ↑1  ▤ 23% 232K · ◷ 41% 00:40 · ◷ 86% Mon · ↻ 50m  ⧗ 1 · ⚑ 2 · Opus 5.5 high

Something seems off

A check didn’t run, or the status line looks stale. Ask the doctor. Problems come first, each with the one thing that fixes it.

/bagheera:doctor
problem  this session runs bagheera 0.46.0, but 0.47.0 is
         installed: restart Claude Code to run it
problem  webui: 3 Proposals waiting since Monday
ok       Checks in Claude Code's hooks, always on
ok       status line points at 0.46.0

Install

Start using Bagheera

Bagheera is yours, not the project’s: install it once and it guards every session, in every repository and in the home folder. It needs python3 3.9 or later and nothing else.

Terminal
claude plugin marketplace add bunderlog/claude-pluginsclaude plugin install bagheera@bunderlog

Bagheera reference Set up a project