command-shelf

Reviewed at commit f7da140

Command Shelf

Made by
YeonwooSung
What we checked

Remembers the Bash commands that succeeded in your project and lists them with /shelf, where you can label one, remove it, or re-run it. A re-run goes through Claude Code's normal Bash permission check and only works in the same project. Commands are stored locally; ones that look like they contain secrets are skipped. No network calls.

Review details

Static review of the source at the pinned commit; not run. Delta review of the changes since 2274d09; the rest carries over from the review at that commit. Registers session.start (registers /shelf), command.run for /shelf and tool.call. The tool.call handler lets the call run first, then reads the tool name, input and result for Bash calls only; it records a command when the result looks like a clean foreground success, the command is at most 4000 characters, and safeText leaves it unchanged (anything the secret-masking regexes would alter is not stored). Duplicates per working directory are skipped, 200 entries kept, stored with $.store.get/$.store.set, capped at 256 KiB. /shelf run <id> calls $.tool.call with a Bash command of the form cd into the saved directory and then the saved command; it refuses when the working directory differs, when the command would be masked, or when the host has no replay. A flag keeps the plugin from recording its own replay. The replay is a normal Bash tool call subject to the user's permission settings. Port.read, run and env are stubbed to throw, so the plugin itself reads no files and starts no processes. No fetch, no $.model calls, no dynamic code. Masking is best effort, so an unusual secret in a command line could still be stored locally. Changes in this version: the store key is now the plugin name plus a non-cryptographic 64-bit hash of the working directory and session id instead of the raw JSON (to stay under the host key length limit), with a fallback read of the old key when it is short enough; version bump to 0.1.2. No new capability. No npm dependencies; not reviewed beyond the six listed files.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: no
  • Reads or writes files: no
  • Runs programs on your machine: yes
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for command-shelf

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/command-shelf.svg)](https://modsforclaude.com/mods/command-shelf/)

← All mods