{
  "markdown": "# claude-anti-mem\n\n> A rap sheet for Claude. The opposite of memory — a persistent log of hallucinations, overkill, confusions, and wrong assumptions, consulted *before* Claude commits to an answer so it can course-correct away from its own known failure modes.\n\nWhere [claude-mem](https://github.com/thedotmack/claude-mem) remembers what went **right**, `claude-anti-mem` remembers what went **wrong** — and uses that log as a pre-flight check.\n\n## Why\n\nClaude gets things wrong in patterns. It invents library methods by analogy. It wraps a one-liner in argparse + logging. It assumes Snowflake when you said \"dbt\". It adds retries you never asked for. Each mistake is usually obvious in hindsight — but Claude makes the same *shape* of mistake over and over across sessions because it has no record of them.\n\n`claude-anti-mem` fixes that with two skills that work as a pair:\n\n- **anti-mem-collector** — when you correct Claude (\"that's overkill\", \"you hallucinated that\", \"I didn't ask for that\"), it appends a structured entry to the rap sheet.\n- **anti-mem-checker** — before Claude commits to a response, it reads the rap sheet, checks whether the current plan matches a past failure pattern, and revises if so.\n\nThe rap sheet lives at `~/.claude-anti-mem/anti-mem.md` as plain markdown. You can read it, edit it, commit it to a repo, share it with a team.\n\n## Install\n\n### Claude Code (plugin)\n\n```bash\n/plugin marketplace add markiv25/claude-anti-mem\n/plugin install claude-anti-mem\n```\n\nThat's it. Both skills are registered, and the rap sheet directory is created on first use.\n\n### Claude.ai (skills only)\n\nUpload each skill from `skills/` individually via the skills UI:\n\n- `skills/anti-mem-collector/`\n- `skills/anti-mem-checker/`\n\nThe rap sheet in Claude.ai lives in the skill's own working area instead of `~/.claude-anti-mem/` — see [`docs/claude-ai.md`](docs/claude-ai.md) for details.\n\n### Manual (any agent)\n\n```bash\ngit clone https://github.com/<your-org>/claude-anti-mem ~/.claude-anti-mem/repo\nln -s ~/.claude-anti-mem/repo/skills/anti-mem-collector ~/.claude/skills/anti-mem-collector\nln -s ~/.claude-anti-mem/repo/skills/anti-mem-checker ~/.claude/skills/anti-mem-checker\n```\n\n## Quick start\n\n1. Install (above).\n2. Work normally with Claude. The checker runs silently before substantive responses.\n3. When Claude gets it wrong, **tell it**. Natural phrases are enough:\n   - \"that's overkill\"\n   - \"you made that function up\"\n   - \"I never said Snowflake\"\n   - \"you confused polars with pandas\"\n   - \"stop adding logging I didn't ask for\"\n4. The collector logs the failure. Next time Claude hits a similar-shaped task, the checker catches it.\n\n## What the rap sheet looks like\n\n```markdown\n# Anti-Memory: Claude Failure Log\n\n## [0001] 2026-04-20 — Overengineered a one-liner dedupe request\n\n- **Category**: overkill\n- **Trigger**: User said \"quick script\" for a task solvable in one expression.\n- **Failure**: Produced 60 lines with argparse and logging for what was a single dict-comprehension.\n- **Correction**: Match scaffolding to stated scope. \"Quick\" + obvious one-liner → give the one-liner.\n- **Check**: If the user's request uses \"quick\", \"simple\", \"one-liner\", or has an obvious ≤5-line solution, do not add argparse, logging, error handling, or type annotations unless explicitly asked.\n\n---\n\n## [0002] 2026-04-20 — Invented polars method `pivot_wider` by analogy to tidyr\n\n- **Category**: hallucination\n- **Trigger**: User asked if library A has a feature from library B.\n- **Failure**: Claimed `polars.DataFrame.pivot_wider` exists. Actual method is `.pivot(...)`.\n- **Correction**: When asked whether library A has a feature from library B, don't assume naming parity.\n- **Check**: Before asserting that a specific method/function exists on a library, confirm it matches the library's actual naming conventions; if cross-library analogy is involved, flag uncertainty.\n\n---\n```\n\n## How the two skills interact\n\n```\n┌──────────────────────────────────────────────────────────────┐\n│  You give Claude a task                                      │\n└───────────────────────────┬──────────────────────────────────┘\n                            │\n                            ▼\n              ┌─────────────────────────────┐\n              │   anti-mem-checker fires    │\n              │  (reads ~/.claude-anti-mem/ │\n              │       anti-mem.md)          │\n              └─────────────┬───────────────┘\n                            │\n              ┌─────────────┴───────────────┐\n              │                             │\n              ▼                             ▼\n     draft matches a        draft does NOT match\n     logged failure         any logged failure\n              │                             │\n              ▼                             ▼\n     Claude revises          Claude responds\n     before responding            normally\n              │                             │\n              └─────────────┬───────────────┘\n                            ▼\n              ┌─────────────────────────────┐\n              │    Claude's response        │\n              └─────────────┬───────────────┘\n                            │\n                            ▼\n               you say \"that was wrong / overkill /\n                     hallucinated / etc.\"\n                            │\n                            ▼\n              ┌─────────────────────────────┐\n              │  anti-mem-collector fires   │\n              │  (appends new entry to      │\n              │       anti-mem.md)          │\n              └─────────────────────────────┘\n```\n\n## Repo layout\n\n```\nclaude-anti-mem/                          ← repo root = marketplace\n├── .claude-plugin/\n│   └── marketplace.json                  ← marketplace catalog\n├── plugins/\n│   └── claude-anti-mem/                  ← the plugin itself\n│       ├── .claude-plugin/\n│       │   └── plugin.json               ← plugin manifest\n│       ├── skills/\n│       │   ├── anti-mem-collector/\n│       │   │   ├── SKILL.md\n│       │   │   └── README.md\n│       │   └── anti-mem-checker/\n│       │       ├── SKILL.md\n│       │       └── README.md\n│       └── README.md                     ← plugin install notes\n├── README.md                             ← you are here\n├── LICENSE\n├── docs/\n│   ├── design.md                         ← why two skills, not one\n│   ├── rap-sheet-format.md               ← entry schema\n│   ├── curation.md                       ← cleanup guide\n│   └── claude-ai.md                      ← claude.ai install notes\n└── examples/\n    └── anti-mem.md                       ← sample rap sheet\n```\n\nThis follows the official Anthropic layout: the repo root is the marketplace, each plugin lives under `plugins/<name>/`, and plugins auto-discover `skills/` inside themselves.\n\n## Design choices\n\n- **Two skills, not one.** Writing happens on user correction; reading happens before every substantive response. Different triggers, different moments in the loop — keeping them separate keeps each SKILL.md focused and reduces false-triggers.\n- **Plain markdown rap sheet.** Human-readable, greppable, diffable, commitable. No database, no daemon, no sync protocol.\n- **One shared file** at `~/.claude-anti-mem/anti-mem.md` by default. Override with `CLAUDE_ANTI_MEM_PATH` env var if you want per-project rap sheets.\n- **Append-only.** The collector only appends. Editing, reorganizing, and retiring entries is a manual (or future-curator-skill) job. This keeps the write path simple and the file auditable.\n- **The `Check:` field is the whole game.** Every entry ends with an imperative the checker can apply. Vague entries (\"be more careful\") are useless — the skill's examples show how to write checks that actually prevent repeats.\n\nSee [`docs/design.md`](docs/design.md) for the longer version.\n\n## Contributing\n\nPRs welcome. The most useful contributions are:\n\n- New anti-patterns with well-written `Check:` fields (drop them in `examples/anti-mem.md`).\n- Sharper triggering descriptions — if you see the checker under-fire or the collector over-fire, open an issue with the transcript.\n- A curator skill (the third skill this project doesn't have yet): periodically dedupe entries, retire stale ones, tag by domain.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n",
  "bytes": 8270,
  "sha": "5b5276f10794eac8b09aa54e3bc35e37706c9c1e5a59978aef9f68d7d1f34313",
  "repo_slug": "markiv25/claude-antimem",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_markiv25_claude_antimem_claude_anti_mem_a28c94b8/readme"
}