Manage the daiver-prompt-view Claude Code mod (the multi-line status line under the prompt - model/session/stime, modes, the agents line of the main loop and background agents/shells/monitors, ctx/lmt/rst/pch bars, git state, Clawd the mascot, color themes). Use when the user asks to check, enable, disable, update, change, debug, release, publish or uninstall the daiver-prompt-view mod/plugin, its status line, agents counters, Clawd (clodik), its themes, commands or statusLine wiring.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Daiver Prompt View?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/0exp-daiver-prompt-view)
---
name: daiver-prompt-view
description: Manage the daiver-prompt-view Claude Code mod (the multi-line status line under the prompt - model/session/stime, modes, the agents line of the main loop and background agents/shells/monitors, ctx/lmt/rst/pch bars, git state, Clawd the mascot, color themes). Use when the user asks to check, enable, disable, update, change, debug, release, publish or uninstall the daiver-prompt-view mod/plugin, its status line, agents counters, Clawd (clodik), its themes, commands or statusLine wiring.
---
# daiver-prompt-view mod
```
Opus 5.5 -> [demo] (sid:419e75ee) <stime:1h23m> <automemory:on> <in:1.2M·out:85k·cost:$4.31>
(effort:high) (outputstyle:Proactive) (thinkmode:thinking) (fastmode:false) ▐▛███▜▌
⚙ main:thinking (1m13s) │ agents:1 (sub:1 sh:0 mon:0) -> pending:0 running:1 … ▝▜█████▛▘
-> (haiku-4.5:low:none) Explore (time:1m01s) [Find lock usages] ▘▘ ▝▝
├───────────────────────────────────────────────────────────────────────────────┤ 2.1.303
ctx ███░░░░░░░ 37% (74k/200k) | lmt ████░░░░░░ 43% (12%) (fable:23%)
pch ████████░░ 85% | rst ██████░░░░ 1h56m (at 17:48) (fable: …) (all: …)
├───────────────────────────────────────────────────────────────────────────────┤
(08d3788a) main [+#?] +12/-3 | ~/Projects/demo
```
## Where things are
| What | Path |
| --- | --- |
| Source repo (also the marketplace) | `~/Projects/daiver-prompt-view/` (dev checkout of `github.com/0exp/daiver-prompt-view`; the status script reads `$DAIVER_PROMPT_VIEW_REPO` when it lives elsewhere) |
| Hooks module | `hooks/register.ts`: reads the options, the one `session.start` and the one `prompt.submit` (a module may hook each once without a matcher: they call `start*`, `forgetNotifiedTasks`, `collectPrompt`), the typeahead; calls each feature's `register*`/`start*` |
| Features | `hooks/features/statusline.ts` (script copy, config, auto memory, `statusline:show-usage`: the `statuslineUsage` option, `usage=` in config, the first line's `<in:…·out:…·cost:…>` segment; `statusline:show-week-reset`: the `statuslineWeekReset` option, off by default, `weekReset=` in config, the weekly reset's `-> dd-mm-yyyy HH:MM` in `lmt`'s brackets; `statusline:view`: the `statuslineView` option, `line-view` (default) | `block-view` from `STATUSLINE_VIEWS`, `view=` in config), `agents.ts` (the agents line, former agent-count), `clodik.ts` (Clawd's commands), `prompt.tsx` (the frame around the person's prompts, a `ui.render` hook on `UserMessage`), `reply.tsx` (the frame around Claude's replies, on `AssistantMessage`; on the terminal a block with a markdown table (not in a fence, not `isSummary`) is drawn by the mod, without `next`: the engine sizes its tables to the terminal, 4 columns wider than the frame's inside), `table.tsx` (`partsOf` cuts the text into prose, drawn as `Markdown`, and tables, drawn as a grid: each column a Box `width` = widest cell + 2 with `flexShrink: 1`, so cells and grid lines shrink alike; vertical lines an absolute `top: 0, bottom: 0` column of `│` clipped by `overflow: hidden`), `tool.tsx` (the frame around tool calls, on `ToolUse`; a subagent's calls (ids in `$.state` `subagentCalls`, from `session.append` door `response` and `tool.call` with `agentId`) are left unframed: the engine draws them as an `Agent` row's progress in one-row slots with no top margin, where a frame leaves only its two borders; a row the engine draws empty is left bare too, told by `onScreen.of` (fullscreen only): framed ≤ 3 rows (gap + borders) goes bare, bare ≥ 2 rows is framed again; the last drawing per id in a module `Map`, since a render hook cannot write state; a folded `ToolGroup` line framed the same, an `isExpanded` one left to its `ToolUse` rows), `spinner.tsx` (the frame around the spinner line, on `Spinner`), `command.tsx` (the frame around a slash command's output, on `CommandOutput`), `chat.ts` (`chat:show-borders`, `chat:show-chat-borders`, `chat:show-statusline-borders`: the `borders` option every frame and the script's `frame()` honour, `chatBorders` the five transcript frames alone, `statuslineBorders` the script's `frame()` alone, each drawn while it and `borders` are on; `chat:border-style`: the `borderStyle` option, `dashed` (default; Box `dashed`, the script's `╌`/`╎` with open corners) or `line` (Box `round`, `─`/`│`), from `BORDER_STYLES` and `frameStyle()` in `shared/config.ts`, for every frame, the history pane's included), `history.tsx` (the history pane: `history:show` and `history:mode` commands (`historyMode`: `fullstory` | `questions` | `answers` from `HISTORY_MODES`; in `fullstory` prompts get `marginLeft` and answers `marginRight`, `SHIFT` columns), `prompt.submit` collector, the `Pane`; the person's slash commands (`Ran`: name, args, output) in `$.state` `commands`, seeded on start from the transcript file (the echo is a user row for a built-in command, a `local_command` system row for a plugin's, both with `<command-name>`/`<command-args>`; the output the next `local_command` row's `<local-command-stdout>`), live from the one matcherless `command.run` in `register.ts` (`collectCommand`, beside `commandToast`), on the prompts' side in `command` color; a press scrolls to the CommandOutput row noted by `command.tsx` (`noteCommandRow`), else the echo's uuid; Claude's answers (each text block and each `tool_use`, as `Bash(ls)` by `toolLine`) in `$.state` `answers`, seeded on start from the transcript file's assistant rows (not `isSidechain`), live from `session.append` door `response` on main (no `agentId`); a press on an answer scrolls to its `toolUseId` (the ToolUse row), else its row `uuid`; its prompts in `$.state`, seeded on start from `~/.claude/history.jsonl` by session id, contract in `types/index.d.ts`; the pane scrolls itself: a `ui.scroll` hook on its id keeps the window (no `next`) and moves `skip` (messages scrolled past, in `$.state`) by `e.by / 4`, so the header stays, and a scrollbar column (`│`/`┃`) shows where the list stands, each row a plain `Button` (`s<row>`; a press carries no position) whose press sets `skip` so the thumb's middle stands on it, between `▲` (`up`) and `▼` (`down`) Buttons that move `skip` by one (the track `bodyRows - 4` tall then); a press scrolls the transcript to the row via `$.ui.scroll({ to: { requestId } })`; the row's uuid comes from `session.append` (door `prompt`) into the Prompt, else from the transcript file `~/.claude/projects/<cwd slug>/<session>.jsonl`, else from `prompt.tsx`'s `UserMessage` hook through `noteRow`), `copy.tsx` (`copyCorner` over `copyButton` (also the history pane's: a `⧉` per message, key `c<i>`, `copied` by `copyId`, text from `copyOf` at the press: the whole prompt, `/name args` + output, the whole text, a tool call's call and result read from the transcript file by `toolCopy`): the `⧉` Button, `plain`, in an absolute Box at `top: 0, right: COPY_RIGHT` (1: a column in from the border) of the prompt, reply, tool and command frames (a tool's text from `toolText`: `$ command` for Bash, else `toolLine`, then the result) (`-1, -1` drew nothing on screen), terminal with `viewport.isFullscreen` only; a press runs `$.ui.copy` with `e.props.text`, then `$.state` family `copied` (by requestId) shows `✓` for `COPIED_MS`; the state library's source is written inline as `memberOf(copied, …)` at each call, as the loader requires), `buttons.tsx` (the buttons row: a `ui.render` hook on `AbovePrompt`, yielding to `hasSurvey`, with `borders` (hotkey `b`, `setFrames` from `chat.ts` on `borders`) and `history` (hotkey `h`, `show` from `history.tsx`) Buttons whose labels read the option's state, each label a `Text` child in the theme's `buttons` color (a Button takes no color of its own); the row framed (`frameStyle()`, the theme's `buttonsFrame`) while `borders` is on; the row is the `buttons` option, `chat:show-buttons`; every switch calls `$.ui.invalidate('ui.render')` so the row redraws), `view.ts` (theme command), `doctor.ts` (`mod:doctor`: `settingsHook` probes a settings read for this mod's hook, `seen` in `shared/seen.ts` counts `settings.read`, `prompt.section`, `prompt.compose` (agents.ts: the main loop's output style, a fork's on its line) and `classic.Stop` runs, the drawn padding, `autoMemory`'s source), `toasts.ts` (the `Task complete` and `/-Command complete` toasts, `toasts:show`) |
| Shared | `hooks/shared/config.ts` (options -> `configs/<session_id>` + `themes/<session_id>.sh`, the session's own, which its status line reads, and the shared `config` + `theme.sh`, the fallback for an input with no `session_id`), `themes.ts` (ALL themes), `commands.ts` (command names, typeahead rows), `files.ts`, `options.ts` |
| Commands | `commands/<feature>/<name>.md` -> `/daiver-prompt-view:<feature>:<name>`, answered by a `command.run` hook (the .md body is only a fallback if the mod is not loaded) |
| Status line script (source of truth) | `statusline/daiver-prompt-view.sh` |
| Installed copy (what the status line runs) | `~/.claude/daiver-prompt-view/statusline.sh` (written on start and checked against the plugin's every 5 s, rewritten when it differs) |
| State, per session | `~/.claude/daiver-prompt-view/agents/<session_id>`, `.../automemory/<session_id>` (`on`, `off`, or `unknown`, drawn `?`: `autoMemoryState` reads the merged settings, and when that read is refused the user, project and local settings files, the last holding `autoMemoryEnabled` winning), `.../tokens/<session_id>` (the transcripts' sizes and the session's input/output token sums, summed again when a transcript grows) and `.../tokens/<session_id>.sum` (the transcripts' sizes and paths from one `stat`, then the sums: while they are the same, nothing is read; otherwise only the files whose size changed are read, and the total comes from one pass over `tokens/<session_id>`), `.../render/<session_id>` (the last drawing and what it was drawn from, printed again while that is unchanged and under 5 s old, never while Clawd moves); `.../agents.idle`, the agents line of a session with no state yet; `.../limits` (shared: `five rst week wrst`, the newest rate limits any session has seen; each window: the later reset wins when more than 1 h (week: 1 day) apart, else the higher percentage; written by the script only when it changes, so every session draws the account's latest `lmt`/`rst`); `.../fable` (shared: `pct resets_at asked_at`, or `- - asked_at` with no Fable window: the weekly Fable limit, absent from the status line's input, read by `features/fable.ts` from the plan's usage (`/api/oauth/usage`, its `limits` row `weekly_scoped` for `Fable`) with `$.session.authorize()`'s handle, every 3 min, skipped while the file is under 150 s old; drawn as `(fable:N%)` after the week's brackets in `c_fable`, and its reset as `(fable: dd-mm-yyyy HH:MM)` after `rst`'s `(at HH:MM)`, then the week's (all models, `wrst`) as `(all: dd-mm-yyyy HH:MM)` in `c_weekAll`); options in `.../config`, colors in `.../theme.sh` |
| Wiring | `statusLine.command` in `~/.claude/settings.json` = `sh "$HOME/.claude/daiver-prompt-view/statusline.sh"`, `refreshInterval: 1` |
| Installed as | `daiver-prompt-view@daiver-prompt-view`, user scope; for development a `directory` marketplace pointing at the repo (read from the folder itself: never move it without reinstalling) |
## Invariants
- The agents lines are printed by the script from `agents/<session_id>`, right after the modes line; the hooks module writes it only when its text changed. The line is never missing: with no file for the session (or an empty one) the script prints `agents.idle` (an idle main loop, zeros everywhere; written by `startAgents` and `redrawAgents` in the theme's colors), and with not even that, the same line built in the script from `c_gray`/`c_white`.
- In `line-view` (the default: any `view=` but `block-view`, or no config) the bars are one line, `ctx | lmt | rst | pch`, with no RS rules and no US mark, and `draw` (`DPV_BLOCK=0`) puts a blank cell, not the frame's `fv`, before Clawd's canvas; everything below describes `block-view`.
- The usage block (`ctx | lmt`, `pch | rst`) is printed between two rule lines, each an RS (`\036`) alone, and its columns split by US (`\037`): the `draw` awk aligns the second column and draws a rule as the frame's `fh` across the panel, starting right at the unbroken left border, as the top and bottom borders do (a rounded corner), with a blank cell before Clawd's block line. Clawd has his own block: the panel is `pw` wide (`inner - 14`, never under the widest line + 1), then the frame's `fv` from the top border to the bottom one, then his 11-cell canvas with a blank cell on either side. No `'` inside the awk program (it is a single-quoted shell string).
- The whole output goes through `frame()` (the theme's `c_frame`): `inner` = `$COLUMNS - 2*pad - 2` when known (`pad` = 2 + the `statuslinePadding` option, read from `padding=` in `config`, else `statusLine.padding` from `~/.claude/settings.json`; never under 0: the engine draws the status line in a Box with `paddingX: padding ?? 0` inside its own 2-column indent, so the padding is added to the 2, and only a negative one narrows the indent). The option reaches the engine through `statusline.ts`'s `settings.read` hook (`withPadding`): the merged settings get `statusLine.padding` = the option while `statusLine.command` runs `daiver-prompt-view/statusline.sh`; nothing is written to settings.json, a one-source read is left alone, never narrower than the widest line; `config`'s `padding=` is the padding drawn (`readPadding`: `$.settings.read({ key: 'statusLine' })` at start and every 5 s, `drawnPadding`), so a plugin above that sends `settings.read` past the hook leaves the settings.json padding, the frame following it, noted once in the debug log; Clawd's canvas ends at the right border, in his own block (`pw = inner - 14`).
- The script is POSIX `sh` + `jq` + `git` and prints something even with `{"model":{"display_name":"X"},"cwd":"/tmp"}`. It runs every second in every session, so it keeps its processes few: one `jq` for the whole input (`@sh` assignments, `eval`), the config and the agents file read with the shell's `read`, Clawd and the frame drawn by one `awk` (`draw`: widths without escapes, one cell per UTF-8 lead byte, `LC_ALL=C`); never a process per line. Private-use glyphs (U+E0A0) are `printf` octal escapes.
- Colors live only in `hooks/shared/themes.ts` as SGR params. The script sources `theme.sh` (`c_gray`, `c_white`, `c_orange`, `c_session`, `c_ctx`, `c_ctxSize`, `c_lmt`, `c_fable`, `c_rst`, `c_weekAll`, `c_pch`, `c_sha`, `c_branch`, `c_flags`, `c_added`, `c_removed`, `c_matrix`, `c_frame`, `c_effort`, `c_ostyle`); the agents line and the prompt, reply, tool, spinner, command and history-pane frames (`prompt`, `reply`, `tool`, `spinner`, `command`, `history`, `hover`, `buttons`, `buttonsFrame`, `paneBackground`, as #rrggbb via `hexOf`) use the same theme in TS. A new theme = an entry in `THEMES` + its name in `userConfig.theme.options` (`plugin.json`) + `argument-hint` of `commands/view/theme.md`. `tests/statusline.test.ts` and `tests/agents.test.ts` pin `default` byte for byte.
- A new command = `commands/<feature>/<name>.md` (`description`, `argument-hint`, `disable-model-invocation: true`) + a `command.run` hook on `command('<feature>', '<name>')` whose `.catch` answers `failed(...)` (never `next`: that would send the .md body to the model) + its values in `register.ts`'s typeahead table.
- Agents: `AgentInfo` has no start time (`agentSince` stamped on first sight, cleared on every start); main time from `turn.start` while idle; shells/monitors from `tool.call` results, dropped on task notifications, `TaskStop`, `classic.Stop` snapshot.
- `$` reaches a helper only as a `function` declaration's parameter (never an arrow function's) when the helper is called across files.
- `setOption` finds the option's `/config` row by `$.plugin.name` and key suffix; with no row (another plugin filters `config.list`) it logs to debug and the change holds for the session only. The mod raises two toasts alone (`toasts.ts`, Claude Code's own `$.ui.toast`, off by default: on with the `toasts` option or `toasts:show`): `Task complete` on the main loop's `turn.complete` with `reason: 'answer'` (a matcher: agents.ts holds the matcherless one), `/-Command complete` after a command the person ran (`commandToast`, called from the one matcherless `command.run` in `register.ts`, registered first so it wraps this mod's own commands, which answer without `next`; the same hook calls `collectCommand` for the history pane). Anything else to say outside a command's answer goes to `$.ui.log(text, { to: 'debug' })`. A plugin seated above (`cc-plugin-sec-default`, an organization's, at the `prepend` tier: `next.to` skips the user tier) has been seen to pass this mod's `settings.read`, `prompt.section`, `prompt.compose` and `classic.Stop` by; `/daiver-prompt-view:mod:doctor` says which, in the session, and names the plugin from Claude Code's notices (system rows of the session's transcript, `<mod>: its <event> hook was skipped. "<plugin>" runs first …`: a hook never sees the links above it, `next.trace` lists only those beneath); a command that answers `shown` twice means the option did not persist.
- Each session writes its own `configs/<session_id>` and `themes/<session_id>.sh` (the script reads those, else the shared `config` and `theme.sh`, which every session also writes): a session's frames, padding and colors follow its own options alone, so two sessions that disagree for a while (one changed an option, the other has not adopted it, or `$.config.list()` there still holds the old value) do not flicker each other's status line. Every 5 s each writes them again: before that write a session takes the options `/config` holds now (`savedOptions` + `adoptSaved`: any session's last save; the `history` option stays the session's own, and redraws when one changed), so no session writes back a value another changed.
- Every gating hook has a `.catch`: a mod failure must never block a tool call or a prompt. `$` is passed only to top-level functions.
## Development rules (`.claude/CLAUDE.md` in the repo)
- A new or changed option: update `README.md` (the **Options** table, the `pluginConfigs` example) with a usage example, in the same change.
- A new or changed command: a row in README's **Commands** table and its own section (option and default, every value described, a usage table with each form and its exact answer).
- Every command's values have typeahead: a `choiceRows` entry in `hooks/register.ts` + `argument-hint` in its `.md`, from the constant the command validates against, covered in `tests/autocomplete.test.ts`.
- Every change, a minor one too, is a new version: bump `version` and add its entry to `CHANGELOG.md` ([Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/)) under that version, dated: a short summary by meaning (what the mod does now), no implementation details.
## Tasks
**Status / health check**: `sh <this skill's base directory>/scripts/status.sh`; report install state and version, repo changes, installed copy vs repo, wiring, the sample render and the newest agents lines.
**Change it**
1. Edit the feature file (no semicolons, single quotes, 2 spaces) or the script (2-space indent, a comment per segment).
2. Script changes: render before and after with a full sample input (`session_id`, `session_name`, `model.display_name`, `workspace.current_dir`, `transcript_path`, `cost.total_duration_ms`, `effort.level`, `thinking.enabled`, `output_style.name`, `fast_mode`, `context_window.*`, `rate_limits.five_hour.*`, `rate_limits.seven_day.*`, `version`) and show plain text (`sed $'s/\e\\[[0-9;]*m//g'`).
3. `claude plugin test ~/Projects/daiver-prompt-view` and `claude plugin validate ~/Projects/daiver-prompt-view` (expected warning: no icon).
4. Type-check: load `plugin-authoring` for this build's `claude-code.d.ts`; tsconfig in the scratchpad (`strict`, `target: es2023`, `module: esnext`, `moduleResolution: bundler`, `lib: [es2023]`, `noEmit`, `types: []`, `include` = the d.ts + the repo's `hooks/`), `npx -y -p typescript@5.6.3 tsc -p <scratchpad>`.
5. Bump `version` in `.claude-plugin/plugin.json` (patch fixes, minor features), update `README.md`, and add the change to `CHANGELOG.md` under the new version.
6. Apply: ask the user to type `/reload-plugins` (Claude cannot run slash commands); the installed script copy refreshes on that start.
**Wire the status line**: set `statusLine` to `{ "type": "command", "command": "sh \"$HOME/.claude/daiver-prompt-view/statusline.sh\"", "refreshInterval": 1 }` with python `json`/`jq`, backing up `settings.json` first (`settings.json.bak-daiver-prompt-view`).
**Enable / disable / uninstall**
```sh
claude plugin enable daiver-prompt-view@daiver-prompt-view
claude plugin disable daiver-prompt-view@daiver-prompt-view
claude plugin uninstall daiver-prompt-view@daiver-prompt-view && claude plugin marketplace remove daiver-prompt-view
```
The installed copy stays, so the status line keeps working without the agents line and live options. Offer to restore `statusLine` from the backup and to delete `~/.claude/daiver-prompt-view/`; ask before deleting.
**Clean stale state**: `agents/`, `automemory/`, `tokens/`, `render/`, `configs/` and `themes/` hold a file per session, never removed: list `find ~/.claude/daiver-prompt-view/agents ~/.claude/daiver-prompt-view/automemory ~/.claude/daiver-prompt-view/tokens ~/.claude/daiver-prompt-view/render ~/.claude/daiver-prompt-view/configs ~/.claude/daiver-prompt-view/themes -type f -mtime +7` and ask before deleting.
**Release / publish**: `origin` = `https://github.com/0exp/daiver-prompt-view`, branch `main`. Commit and push only when the user asks; bump `version` and write the `CHANGELOG.md` entry first. Others install with `/plugin install daiver-prompt-view --marketplace 0exp/daiver-prompt-view`, update with `claude plugin marketplace update daiver-prompt-view`. Never commit `.claude-plugin/types/` or a local `tsconfig.json`.
## Debugging
- Status line empty or stale: installed copy missing/old, `jq` missing, or `statusLine.command` not wired: `echo '{"model":{"display_name":"X"},"cwd":"/tmp"}' | sh ~/.claude/daiver-prompt-view/statusline.sh`.
- No colors: `theme.sh` not written yet (the mod has not started in a session).
- Agents line missing or frozen: the mod is not loaded (`claude plugin list`) or the session predates the install; check the file's mtime.
- A command answered by the model: the mod is not loaded, so the .md fallback ran.
- Hook errors: dim transcript lines in hot-reloading sessions; otherwise `claude --debug` and grep `daiver-prompt-view:`.
- `stime` wrong off macOS: `stat -f %B` is BSD; the fallback is `cost.total_duration_ms`.