{
  "markdown": "# ContextStellar — Claude Code Plugin\n\nReal-time prompt scoring and context engineering optimization for Claude Code.\n\nEvery tool use is automatically scored across 5 dimensions. **Works instantly with zero configuration** — no API key, no signup, no network required.\n\n## Quick Start\n\n```bash\n# Install from marketplace\n/plugin install contextstellar\n\n# Or test locally\nclaude --plugin-dir ./claude-code-plugin\n```\n\nThat's it. The plugin starts scoring immediately using the bundled local scorer.\n\n### Optional: Cloud Mode\n\nFor RLM adaptive weight learning and team dashboards, connect to the ContextStellar API:\n\n```bash\nexport CONTEXTSTELLAR_API_KEY=\"cs_live_your_key_here\"\nexport CONTEXTSTELLAR_PROJECT_ID=\"your_project_id_here\"\n```\n\nGet credentials at [contextstellar.com/connect](https://contextstellar.com/connect).\n\n## How It Works\n\n### Two Modes\n\n| Mode | Config needed | Scoring | RLM Learning | Stats/Dashboard |\n|------|--------------|---------|--------------|-----------------|\n| **Local** (default) | None | Bundled scorer.js | No | No |\n| **Cloud** | API key | Server-side + learned weights | Yes | Yes |\n\n### Automatic Scoring (Hooks)\n\nThe plugin hooks into every tool use:\n\n- **PreToolUse** — Scores the prompt before execution. Injects a scoring summary (grade, dimension breakdown, tips) into Claude's context so it can self-improve.\n- **PostToolUse** *(cloud only)* — Reports success/failure outcomes back to ContextStellar for RLM weight learning.\n- **Stop** *(cloud only)* — Captures session-end metrics (total tokens, cost).\n\nScored tools: `Bash`, `Write`, `Edit`, `Agent`, `NotebookEdit`.\n\n### Skills (Commands)\n\n| Command | Description | Requires API Key |\n|---------|-------------|-----------------|\n| `/contextstellar:setup` | Configure API key and project ID | No |\n| `/contextstellar:score <prompt>` | Manually score a prompt | No (local) / Optional (cloud) |\n| `/contextstellar:stats` | View scoring stats and RLM progress | Yes |\n| `/contextstellar:optimize` | Get optimization recommendations | Yes |\n\n### Scoring Dimensions\n\n| Dimension | Weight | What It Measures |\n|-----------|--------|-----------------|\n| Token Utilization | 25% | Filler, politeness, intensifiers, redundancy |\n| Structural Clarity | 23% | XML tags, lists, headers, code blocks |\n| Specificity | 20% | Numbers, format keywords, examples, constraints |\n| Content Density | 17% | Lexical diversity, n-gram repetition |\n| Cache-Friendliness | 15% | Volatile data positioning, timestamps, UUIDs |\n\n### RLM Flywheel (Cloud Mode)\n\nWeights are defaults initially. As you use Claude Code, the plugin reports outcomes (success/failure) alongside scores. After 100+ events, ContextStellar learns which dimensions matter most for *your* project and adjusts weights automatically.\n\nCheck progress with `/contextstellar:stats`.\n\n## Privacy\n\n- **Local mode**: All scoring happens on your machine. Zero network calls. Nothing leaves your system.\n- **Cloud mode**: Raw prompt text is **never stored** — only SHA-256 hashes. stderr truncated to 200 chars.\n- No API key or user content is ever logged.\n\n## Requirements\n\n- Claude Code 1.0.33+\n- Node.js (for local scorer — already present if you're using Claude Code)\n- `jq` and `curl` (for cloud mode only)\n\n## Plugin Structure\n\n```\nclaude-code-plugin/\n├── .claude-plugin/\n│   └── plugin.json          # Plugin manifest\n├── skills/\n│   ├── score/SKILL.md       # /contextstellar:score\n│   ├── stats/SKILL.md       # /contextstellar:stats\n│   ├── setup/SKILL.md       # /contextstellar:setup\n│   └── optimize/SKILL.md    # /contextstellar:optimize\n├── hooks/\n│   └── hooks.json           # PreToolUse, PostToolUse, Stop\n├── scripts/\n│   ├── pre-tool-use.sh      # Scoring hook (local or cloud)\n│   ├── post-tool-use.sh     # Outcome reporting (cloud only)\n│   ├── session-stop.sh      # Session end (cloud only)\n│   └── scorer.js            # Bundled local scorer (zero deps)\n└── README.md\n```\n\n## License\n\nMIT\n",
  "bytes": 3947,
  "sha": "7e8c38fe927b17ddcfa9084860ed981c3dfcbca79b54fc04b8523851e0ddcfa0",
  "repo_slug": "sunnypatneedi/claude-code-contextstellar",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_sunnypatneedi_claude_code_contextstellar_d22b09bc/readme"
}