{
  "markdown": "# Snipara + RLM Runtime Claude Code Plugin\n\n> Context optimization + safe code execution - Query docs with 90% token reduction and execute code in Docker isolation\n\n## Quick Start (Free)\n\n**100 queries/month free, no credit card required.**\n\n```bash\n# 1. Install plugin\n/plugin marketplace add Snipara/snipara-claude\n\n# 2. Set up (creates free account automatically)\n/snipara:quickstart\n\n# 3. Sign in with GitHub in your browser — done!\n```\n\nThat's it. Your `.mcp.json` is configured automatically. Start querying with `/snipara:lite-mode [your task]`.\n\n---\n\n## What is This Plugin?\n\nThis plugin integrates TWO powerful tools into Claude Code:\n\n### 1. **Snipara MCP** - Context Optimization\nOptimizes documentation context for LLMs, reducing 500K tokens to ~5K tokens of highly relevant content. You use YOUR OWN LLM (Claude, GPT, Gemini) - Snipara just provides the perfect context.\n\n### 2. **RLM Runtime** - Safe Code Execution\nExecute real code recursively with Docker isolation. RLM (Recursive Language Models) can inspect context, decompose tasks, run code, and compose results - all with full trajectory logging.\n\n## Works With Your Existing LLM Account\n\nSnipara is a **context optimization layer** - it does NOT run an LLM. It works alongside your existing AI subscription:\n\n| Your Account | How It Works |\n|---|---|\n| **Claude Pro / Max** | Claude Code already has LLM access. Snipara provides optimized context to Claude via MCP. Just authenticate with Snipara and go. |\n| **Any MCP-Compatible Client** | Cursor, Windsurf, or any client that supports MCP servers. |\n| **RLM Runtime (optional)** | Use your own OpenAI or Anthropic API key for isolated code execution. Snipara provides the context separately. |\n\n**If you use Claude Code with a Pro or Max account**, you already have full LLM access built in. Just authenticate with Snipara (API key or OAuth) and start querying. No additional API keys needed.\n\n```\n┌──────────────────────┐     ┌──────────────────────┐     ┌──────────────────┐\n│  Your Documentation  │────>│  Snipara             │────>│  Your LLM        │\n│  (500K+ tokens)      │     │  (Optimizes to ~5K)  │     │  (Claude/GPT/etc)│\n└──────────────────────┘     └──────────────────────┘     └──────────────────┘\n                              Context Optimization         Your account / key\n```\n\n## Features\n\n### Snipara Features\n- 🔍 **Smart Documentation Querying** - Semantic search with token budgeting\n- 🎯 **Multi-Round Orchestration** - Scan, search, and load in one call *(NEW in v1.1)*\n- 📄 **Document & Project Loading** - Load raw files or full project maps *(NEW in v1.1)*\n- 🐍 **REPL Context Bridge** - Package context for Python REPL consumption *(NEW in v1.1)*\n- 🧠 **Memory & Recall** - Remember decisions and context across sessions\n- 📋 **Workflow Modes** - LITE (quick) and FULL (comprehensive) development modes\n- 👥 **Team Collaboration** - Multi-project search and shared coding standards\n- 🤖 **Agent Coordination** - Swarms for multi-agent workflows\n\n### RLM Runtime Features\n- 🔒 **Docker Isolation** - Execute code safely in isolated containers\n- 🔄 **Recursive Completion** - Break down complex tasks automatically\n- 📊 **Trajectory Logging** - Full execution trace for debugging\n- 🎯 **Multi-Provider** - Works with OpenAI, Anthropic, LiteLLM\n- 📈 **Visualization** - Interactive dashboard for execution analysis\n\n### Integrated Features\n- ⚡ **Chunk-by-Chunk Implementation** - Query context + execute code iteratively\n- 🔄 **Auto-Remember** - Automatically save context and decisions\n- 🎨 **Session Continuity** - Resume work from where you left off\n\n## Installation\n\n### Prerequisites\n\n1. **Claude Code** installed (v1.0.33+)\n2. **Docker** installed and running (optional, for RLM Runtime isolation)\n3. **Python 3.9+** (optional, for RLM Runtime)\n\n> **No Snipara account needed beforehand.** Running `/snipara:quickstart` creates a free account automatically (100 queries/month, no credit card).\n\n### Step 1: Install Plugin\n\n**Option A: From Marketplace (recommended)**\n\n```bash\n# Add the Snipara marketplace\n/plugin marketplace add Snipara/snipara-claude\n\n# Install the plugin\n/plugin install snipara@snipara-plugins\n```\n\n**Option B: Local development**\n\n```bash\n# Clone and load locally\ngit clone https://github.com/Snipara/snipara-claude.git\nclaude --plugin-dir ./snipara-claude\n```\n\n### Step 2: Configure Snipara MCP\n\nAdd to your project's `.mcp.json` using **either** an API key or an OAuth token:\n\n**Option A: API Key (quickest)**\n\n```json\n{\n  \"mcpServers\": {\n    \"snipara\": {\n      \"type\": \"http\",\n      \"url\": \"https://api.snipara.com/mcp/<your-project-slug>\",\n      \"headers\": {\n        \"X-API-Key\": \"<your-api-key>\"\n      }\n    }\n  }\n}\n```\n\nGet your API key from: [snipara.com/dashboard](https://snipara.com/dashboard)\n\n**Option B: OAuth Token (browser-based login)**\n\n```json\n{\n  \"mcpServers\": {\n    \"snipara\": {\n      \"type\": \"http\",\n      \"url\": \"https://api.snipara.com/mcp/<your-project-slug>\",\n      \"headers\": {\n        \"Authorization\": \"Bearer <your-oauth-token>\"\n      }\n    }\n  }\n}\n```\n\nGet your OAuth token via the device flow - see [Authentication](#authentication) below.\n\n### Step 3: Install RLM Runtime (Optional)\n\n```bash\n# Full installation with all features\npip install rlm-runtime[all]\n\n# Initialize configuration\nrlm init\n\n# Verify Docker is running\ndocker --version\n\n# Test with a simple completion\nrlm run --env docker \"print('Hello from RLM')\"\n```\n\n### Step 4: Configure LLM API Keys (For RLM Runtime)\n\n> **Note:** If you're using Claude Code with a Claude Pro or Max account, you already have LLM access built in. These API keys are only needed if you use the optional RLM Runtime feature for isolated code execution.\n\n```bash\n# For Anthropic (Claude)\nexport ANTHROPIC_API_KEY=your-key-here\n\n# Or for OpenAI (GPT)\nexport OPENAI_API_KEY=your-key-here\n```\n\n## Usage\n\n### Skills (Automatic)\n\nThe plugin includes model-invoked skills that Claude uses automatically:\n\n- **query-docs** - Auto-queries Snipara when you ask about documentation\n- **recall-context** - Auto-recalls previous decisions and context\n- **plan-task** - Auto-generates execution plans for complex tasks\n- **orchestrate** - Multi-round context exploration for complex queries *(NEW in v1.1)*\n- **execute-code** - Auto-executes code with RLM Runtime when safe execution needed\n- **chunk-implement** - Chunk-by-chunk implementation workflow\n\n### Commands (Manual)\n\n#### Quick Workflows\n- `/snipara:lite-mode [task]` - Start LITE mode (quick bug fixes, <5 files)\n- `/snipara:full-mode [task]` - Start FULL mode (complex features, 5+ files)\n\n#### Documentation\n- `/snipara:search [pattern]` - Search docs with regex\n- `/snipara:team-search [query]` - Search across ALL team projects\n\n#### Memory\n- `/snipara:remember [content]` - Save important context\n- `/snipara:recall [query]` - Search memories\n\n#### Planning\n- `/snipara:plan [task]` - Generate execution plan\n- `/snipara:decompose [task]` - Break into sub-tasks\n\n#### Team\n- `/snipara:shared` - Get team coding standards\n- `/snipara:inject [context]` - Set session context\n\n#### Orchestration & Documents *(NEW in v1.1)*\n- `/snipara:load-document [path]` - Load raw document content by file path (PRO+)\n- `/snipara:load-project [paths]` - Load structured project map with token budgeting (TEAM+)\n- `/snipara:orchestrate [query]` - Multi-round scan, search, and load in one call (TEAM+)\n- `/snipara:repl-context [query]` - Package project context for REPL with Python helpers (PRO+)\n\n#### RLM Runtime (Optional)\n- `/snipara:run [task]` - Execute with RLM (local)\n- `/snipara:docker [task]` - Execute with Docker isolation\n- `/snipara:visualize` - Launch trajectory dashboard\n- `/snipara:logs` - View execution logs\n\n## Workflow Examples\n\n### LITE Mode (Quick Bug Fix)\n\n```bash\nUser: Fix the authentication timeout bug\nYou: /snipara:lite-mode authentication timeout\n# Queries context (4K tokens) → Reads files → Fixes → Tests\n```\n\n### FULL Mode (Complex Feature)\n\n```bash\nUser: Implement OAuth integration\nYou: /snipara:full-mode OAuth integration\n\n# Phase 1: Context & Planning\n- Loads team standards from rlm_shared_context\n- Generates plan with rlm_plan\n- Decomposes into 6 chunks\n\n# Phase 2: Chunk-by-Chunk Implementation\nChunk 1: Database schema\n  → rlm_context_query(\"OAuth database schema\")\n  → Implement + test\n\nChunk 2: OAuth provider config\n  → rlm_context_query(\"OAuth configuration\")\n  → Implement + test\n\n# ... continues for all chunks ...\n\n# Phase 3: Documentation\n- Uploads implementation docs\n- Stores summaries\n- Remembers key decisions\n```\n\n### Memory-Driven Development\n\n```bash\n# Session 1\nUser: Implement user registration\n# ... work happens ...\nYou: /snipara:remember type=context \"Completed registration API, next: email verification\"\n\n# Session 2 (next day)\n# Auto-recalls: \"Last session: Completed registration API, next: email verification\"\nYou: /snipara:recall email verification progress\n# Continues where you left off\n```\n\n## Authentication\n\n> For the full authentication reference including OAuth device flow details, token management, LLM provider compatibility, and troubleshooting, see [docs/AUTHENTICATION.md](docs/AUTHENTICATION.md).\n\nSnipara supports two authentication methods. Both give you full access to context optimization features.\n\n### Method 1: API Key\n\nThe simplest method. Generate a key from your dashboard and add it to `.mcp.json`.\n\n1. Sign in at [snipara.com](https://snipara.com)\n2. Go to **Project > API Keys**\n3. Click **\"Generate Key\"**\n4. Copy the key (format: `rlm_pk_...`)\n5. Add to `.mcp.json` as shown in [Step 2](#step-2-configure-snipara-mcp)\n\n**Key formats:**\n\n| Format | Scope |\n|---|---|\n| `rlm_pk_...` | Single project access |\n| `rlm_team_...` | All projects in a team |\n\n### Method 2: OAuth Device Flow\n\nRecommended for users who prefer browser-based login. This is especially convenient if you already have a Snipara account linked to GitHub or Google.\n\n**How it works:**\n\n```\n1. CLI requests a device code from Snipara\n2. You open snipara.com/device in your browser\n3. Enter the code and log in (GitHub, Google, or email)\n4. CLI receives an OAuth token automatically\n5. Token is saved and used for all MCP requests\n```\n\n**Step-by-step:**\n\n1. **Request a device code:**\n\n```bash\ncurl -X POST https://snipara.com/api/oauth/device/code \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"client_id\": \"snipara_cli\"}'\n```\n\nResponse:\n\n```json\n{\n  \"device_code\": \"abc123...\",\n  \"user_code\": \"ABCD-1234\",\n  \"verification_uri\": \"https://snipara.com/device\",\n  \"verification_uri_complete\": \"https://snipara.com/device?code=ABCD-1234\",\n  \"expires_in\": 900,\n  \"interval\": 5\n}\n```\n\n2. **Open the link and enter the code:**\n\n   Go to [snipara.com/device](https://snipara.com/device) and enter the code (e.g., `ABCD-1234`). Log in with GitHub, Google, or email.\n\n3. **Poll for the token:**\n\n```bash\ncurl -X POST https://snipara.com/api/oauth/device/token \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"grant_type\": \"urn:ietf:params:oauth:grant-type:device_code\",\n    \"device_code\": \"abc123...\",\n    \"client_id\": \"snipara_cli\"\n  }'\n```\n\nSuccess response:\n\n```json\n{\n  \"access_token\": \"snipara_at_...\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 2592000,\n  \"refresh_token\": \"snipara_rt_...\"\n}\n```\n\n4. **Use the token in `.mcp.json`:**\n\n```json\n{\n  \"mcpServers\": {\n    \"snipara\": {\n      \"type\": \"http\",\n      \"url\": \"https://api.snipara.com/mcp/<your-project-slug>\",\n      \"headers\": {\n        \"Authorization\": \"Bearer snipara_at_...\"\n      }\n    }\n  }\n}\n```\n\n**Token details:**\n\n| Token | Format | Validity |\n|---|---|---|\n| Access token | `snipara_at_...` | 30 days |\n| Refresh token | `snipara_rt_...` | 90 days |\n\nTo refresh an expired access token:\n\n```bash\ncurl -X POST https://snipara.com/api/oauth/token \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"grant_type\": \"refresh_token\",\n    \"refresh_token\": \"snipara_rt_...\"\n  }'\n```\n\n### Using Snipara With Your LLM Account\n\nSnipara OAuth authenticates you to the **Snipara context optimization service**. It does not connect to OpenAI or other LLM providers. Your LLM access is separate:\n\n| Setup | Snipara Auth | LLM Access | What You Need |\n|---|---|---|---|\n| **Claude Code + Pro/Max** | API key or OAuth | Built into Claude Code | Snipara auth only |\n| **Cursor / Windsurf** | API key or OAuth | Built into IDE | Snipara auth only |\n| **RLM Runtime + Anthropic** | API key or OAuth | `ANTHROPIC_API_KEY` | Snipara auth + Anthropic API key |\n| **RLM Runtime + OpenAI** | API key or OAuth | `OPENAI_API_KEY` | Snipara auth + OpenAI API key |\n\n**Claude Pro / Max users:** You already have full LLM access through Claude Code. Just authenticate with Snipara (API key or OAuth) and start querying. No additional API keys needed.\n\n**RLM Runtime users:** If you use the optional RLM Runtime for isolated code execution, you need a separate LLM API key (`ANTHROPIC_API_KEY` or `OPENAI_API_KEY`) in addition to Snipara auth.\n\n## New MCP Tools (v1.2 - Sprint 3: Index Health & Analytics)\n\nThe following tools were added in v1.2 for monitoring index health and search performance:\n\n| Tool | Plan | Description |\n|------|------|-------------|\n| `rlm_index_health` | ALL | Get comprehensive index health metrics (coverage, quality, tier distribution, stale docs) |\n| `rlm_index_recommendations` | ALL | Get actionable recommendations to improve index health |\n| `rlm_search_analytics` | ALL | Get search performance metrics (queries, success rate, latency percentiles, tool usage) |\n| `rlm_query_trends` | ALL | Get query trends over time with configurable granularity (day/week) |\n\nThese tools provide visibility into:\n- **Health Score** - Composite 0-100 score based on coverage, quality, and freshness\n- **Tier Distribution** - HOT/WARM/COLD/ARCHIVE chunk categorization\n- **Latency Percentiles** - p50, p75, p90, p95, p99 response time metrics\n- **Error Analysis** - Categorized error breakdown with examples\n\n### Previous: New MCP Tools (v1.1)\n\nThe following tools were added in v1.1, matching the Snipara SDK Phase 12 (orchestration) and Phase 13 (REPL context bridge):\n\n| Tool | Plan | Description |\n|------|------|-------------|\n| `rlm_load_document` | PRO+ | Load raw document content by file path |\n| `rlm_load_project` | TEAM+ | Load structured map of all project documents with token budgeting |\n| `rlm_orchestrate` | TEAM+ | Multi-round context exploration (scan → search → raw load) in one call |\n| `rlm_repl_context` | PRO+ | Package project context for REPL consumption with Python helpers |\n\nThese tools are exposed as both commands (`/snipara:load-document`, `/snipara:load-project`, `/snipara:orchestrate`, `/snipara:repl-context`) and as a model-invoked skill (`orchestrate`) that Claude uses automatically for complex queries.\n\n## Pricing\n\n| Plan | Price | Queries/month | Features |\n|------|-------|---------------|----------|\n| **FREE** | **$0** | **100** | Keyword search, token budgeting, session persistence |\n| PRO | $19/mo | 5,000 | + Semantic search, memory, planning |\n| TEAM | $49/mo | 20,000 | + Multi-project search, swarms, shared standards |\n| ENTERPRISE | $499/mo | Unlimited | + Custom deployment, SLA |\n\n**No credit card required for FREE plan.** Upgrade anytime at [snipara.com/pricing](https://snipara.com/pricing).\n\n## Support\n\n- 📚 [Documentation](https://snipara.com/docs)\n- 💬 [Discord Community](https://discord.gg/snipara)\n- 🐛 [Report Issues](https://github.com/Snipara/snipara-claude/issues)\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Development\n\nTo test the plugin locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/Snipara/snipara-claude.git\ncd snipara-claude\n\n# Test plugin locally\nclaude --plugin-dir .\n\n# Verify commands appear\n/help\n```\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  Claude Code + Snipara Plugin                               │\n├─────────────────────────────────────────────────────────────┤\n│                                                             │\n│  Skills (Model-Invoked):                                    │\n│  - query-docs → rlm_context_query (Snipara MCP)            │\n│  - orchestrate → rlm_orchestrate (multi-round)      [v1.1] │\n│  - execute-code → rlm run --env docker (RLM Runtime)       │\n│  - chunk-implement → Snipara + RLM integration             │\n│                                                             │\n│  Commands (User-Invoked):                                   │\n│  - /snipara:lite, /snipara:full (workflows)                │\n│  - /snipara:orchestrate, /snipara:load-* (context)  [v1.1] │\n│  - /snipara:run, /snipara:docker (RLM execution)           │\n│  - /snipara:remember, /snipara:recall (memory)             │\n│                                                             │\n└─────────────────────────────────────────────────────────────┘\n         ↓                                   ↓\n┌──────────────────────┐          ┌──────────────────────┐\n│  Snipara MCP Server  │          │  RLM Runtime         │\n│  (api.snipara.com)   │          │  (Local/Docker)      │\n│                      │          │                      │\n│  - Context query     │          │  - Code execution    │\n│  - Orchestration     │          │  - Trajectory logs   │\n│  - Document loading  │          │  - Visualization     │\n│  - REPL context      │          │  - Multi-provider    │\n│  - Memory system     │          │                      │\n│  - Team features     │          │                      │\n│  - Swarms            │          │                      │\n└──────────────────────┘          └──────────────────────┘\n```\n",
  "bytes": 17693,
  "sha": "b0f658e8c974dc9d468f9a8600f43fba35e3c061e337f0c9d34b6a690a698f27",
  "repo_slug": "alopez3006/snipara-claude",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_alopez3006_snipara_claude_snipara_cfdbaeeb/readme"
}