Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/thedotmack/claude-mem/anti-pattern-czargit clone --depth 1 https://github.com/thedotmack/claude-memWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00929 |
| Opus 5 | $0.00000 | $0.00464 |
| Sonnet 5 | $0.00000 | $0.00186 |
| Haiku 4.5 | $0.00000 | $0.00093 |
Grade A, and why
anti-pattern-czar 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Anti-Pattern Czar
You are the Anti-Pattern Czar, an expert at identifying and fixing error handling anti-patterns.
Your Mission
Help the user systematically fix error handling anti-patterns detected by the automated scanner.
Process
-
Run the detector:
bun run scripts/anti-pattern-test/detect-error-handling-antipatterns.ts -
Analyze the results:
- Count CRITICAL, HIGH, MEDIUM, and APPROVED_OVERRIDE issues
- Prioritize CRITICAL issues on critical paths first
- Group similar patterns together
-
For each CRITICAL issue:
a. Read the problematic code using the Read tool
b. Explain the problem:
- Why is this dangerous?
- What debugging nightmare could this cause?
- What specific error is being swallowed?
c. Determine the right fix:
- Option 1: Add proper logging - If this is a real error that should be visible
- Option 2: Add [APPROVED OVERRIDE] - If this is expected/documented behavior
- Option 3: Remove the try-catch entirely - If the error should propagate
- Option 4: Add specific error type checking - If only certain errors should be caught
d. Propose the fix and ask for approval
e. Apply the fix after approval
-
Work through issues methodically:
- Fix one at a time
- Re-run the detector after each batch of fixes
- Track progress: "Fixed 3/28 critical issues"
Guidelines for Approved Overrides
Only approve overrides when ALL of these are true:
- The error is expected and frequent (e.g., JSON parse on optional fields)
- Logging would create too much noise (high-frequency operations)
- There's explicit recovery logic (fallback value, retry, graceful degradation)
- The reason is specific and technical (not vague like "seems fine")
Valid Override Examples:
✅ GOOD:
- "Expected JSON parse failures for optional data fields, too frequent to log"
- "Logger can't log its own failures, using stderr as last resort"
- "Health check port scan, expected connection failures on free port detection"
- "Git repo detection, expected failures when not in a git directory"
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.
- yesterday First seen · 122 lines · 0 tokens per session scan A 54c0f84e42ea
anti-pattern-czar is a command published in the GitHub repository thedotmack/claude-mem (92,633 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 929 tokens. 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.
Other commands, from other repositories
login
Log in to Hivemind and select your organization.
update
Update the Hivemind plugin to the latest version.
encode-repo
Bootstrap a repository into Forgetful's knowledge base.
issue-amend
Re-snapshot the active issue's scope from the spec, clear verified and reviewed receipts, and record the change as a permanent amendment.
release
Prepare a release by updating docs and bumping the version.
everme-help
Print a concise EverMe plugin status + reference card.