bug

bug is a command for Claude Code from sdsrss/claude-mem-lite. It costs 54 tokens per session (679 once invoked), scanned A, original, MIT.

A command for recording a known software bug and its reproduction steps in searchable project memory. It can also record affected files and severity.

In plain words
What is it for?
Use it when a bug cannot be fixed immediately, especially to save reproduction steps and warn future work involving the affected files.
Why use it?
It keeps blocked, intermittent, or lower-priority bugs from being forgotten or investigated again from scratch.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claude-mem-lite plugin — 8 commands, 7 hooks, 1 MCP server shipped together

Good fit Use it when a bug cannot be fixed immediately, especially to save reproduction steps and warn future work involving the affected files.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add sdsrss/claude-mem-lite
Claude Code
/plugin install claude-mem-lite

Made for: Claude Code.

Or install claude-mem-lite, the plugin that ships this one along with the rest of its 8 commands, 7 hooks, 1 MCP server.

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 bug

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/bug/github.svg)](https://agentmods.dev/commands/sdsrss/claude-mem-lite/bug)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/claude-mem-lite/bug"><img src="https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/bug/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 bug

Your own site · 80×15
<a href="https://agentmods.dev/commands/sdsrss/claude-mem-lite/bug"><img src="https://agentmods.dev/badge/commands/sdsrss/claude-mem-lite/bug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 679 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.00054 $0.00679
Opus 5.5 $0.00022 $0.00272
Sonnet 5.5 $0.00011 $0.00136
Haiku 4.5 $0.00005 $0.00068

Measured 2d ago against content hash 0b0ca90b8b55, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bug 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 2d 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.

commands/bug.md · 64 lines

How it starts

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

/claude-mem-lite:bug

Record a known bug + reproduction steps. Writes a searchable observation (type=bugfix, description in lesson_learned) so future sessions can find it via mem_search and the PreToolUse recall hooks warn when the affected files are edited. Does NOT touch memdir. Useful for bugs you can't fix immediately but want future sessions (or yourself after /clear) to know about and avoid re-investigating.

When to use

  • Bug is known but fix is blocked (waiting on upstream, needs discussion).
  • Bug is intermittent / race condition; you want a repro recipe recorded.
  • Edge case affecting only part of users; not priority now but must not be silently re-discovered.

Don't use for bugs you're actively fixing in the current turn — just fix them. Use /lesson afterward if there's a non-obvious root cause worth recording.

Arguments

  • Positional text: short bug description.
  • --file <path> or --files f1,f2,...: affected files. Triggers pre-tool-recall warning when these files are edited later.
  • --repro "step1; step2; step3": reproduction steps, semicolon-separated.
  • --severity low|med|high: maps to importance 1|2|3. Default med.

Execution

Map severity to importance:

  • low → importance 1
  • med → importance 2 (default)
  • high → importance 3

Build the body as <description>\n\nRepro:\n<repro-steps> (or just <description> if --repro is absent).

Run via Bash — the full body is the positional content; a distilled description goes in --lesson so it lands in the high-weight lesson_learned field. --lesson is capped at 500 chars (longer values are rejected), so keep the full body in the positional content and trim --lesson to the core description if longer:

node "${CLAUDE_PLUGIN_ROOT}/cli.mjs" save "<body>" \
  --type bugfix \
  --title "<first 60 chars of description>" \
  --lesson "<description, ≤500 chars>" \
  [--files f1,f2,...] \
  --importance <1|2|3>

Confirm to user with: Bug logged: #<id>.

Read the full file on GitHub · 64 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. 2d ago Changed 0b0ca90b8b55
  2. 3d ago Changed · -1 lines f34cf0677b9a
  3. 27d ago Changed 1df0e1851af1
  4. 1mo ago First seen · 65 lines · 54 tokens per session scan A ecfb56ebc990

Subscribe to this mod's changes

bug is a command published in the GitHub repository sdsrss/claude-mem-lite (67 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 679 once invoked, about $0.0002 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-08-30.