Skip to content
claudemods

Mindful Claude: a Claude Code Breathing Exercise While You Wait

Guided breathing animation above the Claude Code prompt while Claude works; the spinner counts the breath with you.

Permissions

  • Changes the UIDraws into the Claude Code interface: bands, panes, status text, toasts (ui.render / $.ui.*).
  • Adds commands/toolsRegisters new slash commands or tools that you or Claude can invoke ($.command.register / $.tool.register).
  • Stores dataKeeps data between sessions in the plugin's private store ($.store.*).
tested with
v2.1.291
last tested
requires
Claude Code ≥ 2.1.287
surfaces
above-prompt, spinner

Install inside Claude Code:

/plugin install mindful-claude --marketplace halluton/Mindful-Claude
All install options ↓

What does this mod do?

Mindful Claude is a community mod by Anthony (halluton). It turns the time you spend waiting for Claude into a short guided Claude Code breathing exercise. When Claude starts working, a nine-row breathing animation appears above the input box, with a phase line such as Breathe in... 4s and the exercise name under it. At the same time the spinner word changes to the breath, so it reads Breathe in 4s… instead of its usual text. When Claude answers, the band disappears.

The author's reasoning, from the README: slow breathing at about 5.5 breaths per minute raises heart rate variability, so every Claude turn becomes a small breathing session without leaving the terminal. There are four exercises (Coherent Breathing, Physiological Sigh, Box Breathing and 4-7-8 Breathing) and four animation styles (pulse, ripples, dots and wave). By default the style is picked at random for each turn, never the same one twice in a row. A /breathe slash command changes the settings, and they persist across sessions. The README says it needs Claude Code 2.1.269 or later.

Demo

The recording starts Claude Code with the mod loaded and asks Claude to read three files and describe the project. While the turn runs, the breathing band above the prompt expands and contracts with a Breathe in… 5s label (the default Coherent Breathing pattern), and the spinner line follows the same rhythm.

Install

Use any of the methods in the install block; they install straight from the author's own marketplace. Once it is installed, send any prompt and the band appears while Claude works.

$ install mindful-claude

Requires Claude Code ≥ 2.1.287

Installs from the author's own marketplace: halluton/Mindful-Claude

  1. 1.One line, inside Claude Code

    /plugin install mindful-claude --marketplace halluton/Mindful-Claude

    Paste into a running session (v2.1.275+). Claude Code asks to add the marketplace first.

  2. 2.From your shell

    claude plugin marketplace add halluton/Mindful-Claude
    claude plugin install mindful-claude@mindful-claude

    Then run /reload-plugins in any session that is already open.

  3. 3.Try it without installing

    git clone https://github.com/halluton/Mindful-Claude
    claude --plugin-dir ./Mindful-Claude

    Loads the mod for one session only. Nothing is added to your settings.

How it works

The mod has two parts. hooks/register.tsx is the hooks module: it remembers when the turn started and hooks the AbovePrompt render site. When the engine reports that a turn is working, it mounts a client surface module, hooks/breathe.tsx, which draws the animation ten times a second on its own clock. Here is the render hook from hooks/register.tsx:

on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
  if (e.surface !== 'terminal' || !config.enabled || !e.props.isWorking || e.props.hasSurvey) return next(e)
  const now = await $.clock.now()
  const running = turn ?? (turn = { startedAt: now, style: pickStyle(config.style, lastStyle) })
  const elapsedMs = now - running.startedAt
  if (elapsedMs < config.delay * 1000) return next(e)
  const { Box, Client } = $.ui.resolve(e)
  // ...
  return (
    <Box flexDirection="column">
      <Client key={key} module="./breathe.tsx" width={e.viewport?.columns ?? 80} height={rows}
        props={{ exercise: config.exercise, style: running.style, elapsedMs }} />
      {await next(e)}
    </Box>
  )
})

The band is keyed by the turn's start time, so each turn gets a fresh animation. Whenever the phase line changes, the surface posts the current word back with surface.post. The hooks module receives it in a ui.message hook and passes it to a second render hook on the Spinner component, which replaces the spinner's message prop. The turn.complete hook clears the turn, so the band goes away as soon as Claude answers. The exercises, the easing curve and the shapes live in hooks/breath/ as pure functions.

Customize it

Everything is set with the /breathe command, which the mod registers on session.start:

  • /breathe shows the current settings, and /breathe help lists every option.
  • /breathe on / off shows or hides the band.
  • /breathe hrv, sigh, box or 478 picks the exercise.
  • /breathe style wave pins one style (pulse, ripples, dots, wave), and /breathe style random goes back to the default.
  • /breathe delay 5 waits five seconds into a turn before showing the band, so quick answers stay quiet.
  • /breathe spinner off leaves the spinner text alone.

Settings are saved with $.store under one config key and read back at the next session start.

Permissions & safety

We read every file the plugin loads before we ran it. The plugin uses only UI, clock, command and store calls: no $.process.run, no network, no file access. It does not read your code, prompts or transcript. Its settings are stored in the mod's own $.store, and it never edits settings.json or shell rc files. Changes the UI covers the band and the rewritten spinner word; Adds commands/tools covers /breathe, and Stores data covers the saved settings.

The repository also contains a legacy/ folder with the original bash and tmux version. The plugin does not load it. Its install.sh edits ~/.claude/settings.json and writes to ~/.claude/mindful/, so only run it if you want the old version. claude plugin validate reports one warning: the plugin name contains "claude", which the validator says reads like an Anthropic plugin. It is a naming notice, not a problem with the code.

Changes the UI
Draws into the Claude Code interface: bands, panes, status text, toasts (ui.render / $.ui.*).
Adds commands/tools
Registers new slash commands or tools that you or Claude can invoke ($.command.register / $.tool.register).
Stores data
Keeps data between sessions in the plugin's private store ($.store.*).

Compatibility & troubleshooting

We validated it with Claude Code 2.1.291 on macOS, and the author's 31 bun test unit tests pass. claude plugin test cannot load them because they import bun:test. If the band does not show up:

  • Check that claude --version is 2.1.269 or later. The author's README also asks you to set CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 in the env block of ~/.claude/settings.json.
  • Run /breathe and check that it says breathe: on and delay 0s.
  • The band is only drawn in the terminal. It also steps aside while a survey is open above the prompt.
  • After installing into a session that is already open, run /reload-plugins.

FAQ

When does the breathing animation appear?
When a turn starts and the prompt shows Claude is working. It disappears when Claude answers. With /breathe delay 5 it only appears after Claude has worked for five seconds.
Which breathing exercises are included?
Four: Coherent Breathing (5.5s in, 5.5s out, the default), the Physiological Sigh (double inhale, long exhale), Box Breathing (4s in, hold, out, hold) and 4-7-8 Breathing (4s in, 7s hold, 8s out). Switch with /breathe hrv, sigh, box or 478.
Does it cost tokens or send anything to the model?
No. The mod only draws UI and keeps its settings in the plugin's own store. It makes no network calls and the model never sees the animation.
Can I keep the animation but leave the spinner alone?
Yes. Run /breathe spinner off. The band above the prompt keeps running and the spinner goes back to its normal words.
Does it work in the desktop app?
The band is only drawn when the render surface is the terminal; the code skips it everywhere else. The spinner text may still change.
Done Toast running in Claude Code

Done Toast

A "Done in 2m 14s" toast and a short chime when a long Claude turn finishes, plus an optional desktop notification.

  • toast
  • Runs commands
  • Changes the UI
  • Plays sound

tested with v2.1.291

Context Meter running in Claude Code

Context Meter

Context-window fill, 5-hour and 7-day plan usage and session cost in the status line, plus a warning near the limit.

  • status
  • toast
  • Changes the UI

tested with v2.1.291

More in Timers, todos, standups, Slash commands.