{
  "markdown": "# claude-performance\n\n\n<!-- mycelium-badges:start -->\n\n<p>\n  <a href=\"https://github.com/adelaidasofia/claude-performance/blob/main/LICENSE\"><img alt=\"License\" src=\"https://img.shields.io/github/license/adelaidasofia/claude-performance?color=blue\"></a>\n  <a href=\"https://github.com/adelaidasofia/claude-performance/stargazers\"><img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/adelaidasofia/claude-performance?color=eab308\"></a>\n  <a href=\"https://github.com/adelaidasofia/claude-performance/commits/main\"><img alt=\"Last commit\" src=\"https://img.shields.io/github/last-commit/adelaidasofia/claude-performance\"></a>\n  <a href=\"https://github.com/adelaidasofia/claude-performance/issues\"><img alt=\"Open issues\" src=\"https://img.shields.io/github/issues/adelaidasofia/claude-performance\"></a>\n  <a href=\"https://myceliumai.co\"><img alt=\"Built by Mycelium AI\" src=\"https://img.shields.io/badge/built_by-Mycelium_AI-15B89A\"></a>\n</p>\n\n<!-- mycelium-badges:end -->\n\nA Claude Code plugin that turns session telemetry into self-improving behavioral rules.\n\nReads JSONL session data from `~/.claude/projects/`, computes six effectiveness metrics, and when diagnostics fire, writes permanent rules into `~/.claude/CLAUDE.md` so future sessions adapt. Measurement layer for self-improving AI workflows.\n\nA static rule is a wish. A measured rule is a system.\n\nCompanion to [claude-daily-journal](https://github.com/adelaidasofia/claude-daily-journal) and [claude-insights](https://github.com/adelaidasofia/claude-insights).\n\n---\n\n## What it measures\n\nEvery seven days, reads all Claude Code session files from the last week and computes:\n\n1. **Activity distribution**: Coding, Exploration, Debugging, Delegation, Planning, Conversation\n2. **One-shot edit rate**: percentage of file edits that land without a retry cycle\n3. **Agent spawn analysis**: how many subagents fire and how many turns each takes\n4. **Model mix**: Opus vs. Sonnet vs. Haiku across all turns\n5. **Project allocation**: which codebases consume the most attention\n6. **Hookify firings**: which behavioral guardrails actually trigger\n\n## What it prescribes\n\nSix diagnostic rules. When a rule fires, one of two things happens:\n\n- **Behavioral prescriptions** (verbose agents, model routing, low one-shot rate, exploration overhead) get written directly into `~/.claude/CLAUDE.md` as permanent rules Claude reads on every future session start.\n- **Investigation prescriptions** (recurring tool errors, hookify repeats) get appended to a Claude To-dos list for the user to review.\n\nNext week the digest re-measures. If the number moved, the rule worked. If it did not, the rule fires again with updated numbers. If it sits at target for weeks, the rule can probably retire.\n\n---\n\n## Install\n\nOpen Claude Code, paste:\n\n    /plugin marketplace add adelaidasofia/claude-performance\n    /plugin install claude-performance@claude-performance\n\nThen copy `scripts/claude_performance_digest.py` into your vault at `<vault>/⚙️ Meta/scripts/`. The script self-locates via `__file__` and expects that path.\n\n<details><summary>Legacy install</summary>\n\n```bash\nclaude plugin add github.com/adelaidasofia/claude-performance\n```\n\nOr clone manually:\n\n```bash\ngit clone https://github.com/adelaidasofia/claude-performance ~/.claude/plugins/claude-performance\nclaude plugin add ~/.claude/plugins/claude-performance\n```\n\n</details>\n\n---\n\n## Usage\n\nRun manually:\n\n```bash\npython3 \"<vault>/⚙️ Meta/scripts/claude_performance_digest.py\"\n```\n\nOr schedule weekly (Monday 1am UTC example):\n\n```\n0 1 * * 1 /usr/bin/python3 \"/path/to/vault/⚙️ Meta/scripts/claude_performance_digest.py\"\n```\n\n### Flags\n\n- `--days N`: lookback window (default 7)\n- `--dry-run`: print report to stdout, do not write files\n- `--no-report`: skip the markdown report, apply prescriptions only\n\n---\n\n## Configuration\n\nAt the top of `scripts/claude_performance_digest.py`:\n\n```python\nTHRESHOLDS = {\n    \"one_shot_min\": 0.75,\n    \"exploration_max\": 0.35,\n    \"agent_turns_max\": 5,\n    \"opus_max\": 0.70,\n    \"hookify_repeat\": 10,\n    \"recurring_error_sessions\": 3,\n}\n\nPROJECT_LABELS = {\n    # Optional: map project directory substrings to clean display labels\n    # \"my-company\": \"CompanyName\",\n}\n```\n\n---\n\n## Output\n\nA dated markdown report at `⚙️ Meta/Performance/weekly-YYYY-MM-DD.md`. And if a behavioral diagnostic fires, one or more rules appended to `~/.claude/CLAUDE.md` like:\n\n```\n- [VERBOSE AGENTS fix](performance_verbose_agents.md) | Agent briefings must\n  include: specific file paths, expected output format, and scope boundary.\n  Target: <8 turns per agent. Current avg: 22.0. (updated 2026-04-16)\n```\n\n---\n\n## Why this exists\n\nSelf-improvement by memory alone has a failure mode: a rule gets written, Claude reads it at session start, and under the wrong context the behavior recurs anyway. Without measurement, you cannot tell whether a correction actually worked.\n\nThis plugin closes the loop. Rules come with a number attached. Baseline, target, check-in. The script runs weekly on its own and the next session reads the new rule.\n\nFull story: [I Taught Claude to Write Its Own Rules](https://adelaidadiazroa.substack.com/) (coming soon).\n\n---\n\n\n## Telemetry\n\nThis plugin sends a single anonymous install signal to `myceliumai.co` the first time it loads in a Claude Code session on a given machine.\n\n**What is sent:**\n- Plugin name (e.g. `slack-mcp`)\n- Plugin version (e.g. `0.1.0`)\n\n**What is NOT sent:**\n- No user identifiers, names, emails, tokens, or API keys\n- No file paths, message content, or anything from your work\n- No IP address is stored after dedup processing\n\n**Why:** Helps the maintainer know which plugins people actually install, so attention goes to the ones that get used.\n\n**Opt out:** Set the environment variable `MYCELIUM_NO_PING=1` before launching Claude Code. The hook will skip the network call entirely. Already-pinged installs leave a sentinel at `~/.mycelium/onboarded-<plugin>` — delete it if you want to reset state.\n\n## License\n\nMIT\n",
  "bytes": 6005,
  "sha": "95a18e84a5c479ebb2afa0f363e42cd42be164197c95c867766eb87bf673c36f",
  "repo_slug": "adelaidasofia/claude-performance",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_adelaidasofia_claude_performance_claude__1c52f669/readme"
}