Overview
The CodeAlive plugin is the recommended way to integrate CodeAlive with Claude Code. It bundles everything into a single install:- Context Engine skill — teaches Claude Code effective query patterns, cost-aware tool selection, and multi-step exploration workflows
- Code Explorer subagent — a lightweight Haiku-powered agent that iteratively searches your codebase and returns structured summaries, saving your main conversation context
- Authentication hook — automatically checks your API key on session start
The plugin works standalone or alongside the MCP server. When used together, the MCP server provides direct tool access and the plugin teaches Claude Code how to use those tools effectively.
Prerequisites
- Claude Code installed
- CodeAlive account with API key (Get one here)
- Indexed repositories in your CodeAlive dashboard
Installation
Set Up Authentication
Run the interactive setup to store your API key securely:This will ask for your API key, verify it, and store it in your OS credential store.Alternatively, set the environment variable:
What’s Included
Context Engine Skill
The skill provides five tools, each optimized for different use cases:| Tool | Speed | Cost | Best For |
|---|---|---|---|
| List Data Sources | Instant | Free | Discovering indexed repos and workspaces |
| Search | Fast | Low | Finding code locations, descriptions, identifiers |
| Fetch Artifacts | Fast | Low | Retrieving full content for search results |
| Chat with Codebase | Slow | High | Synthesized answers, architectural explanations |
| Explore | Slow | High | Multi-step discovery workflows |
Code Explorer Subagent
The plugin includes a dedicated subagent (codealive-code-explorer) that handles iterative code exploration autonomously. When Claude Code needs to investigate a codebase question, it delegates to this subagent, which:
- Runs multiple search queries iteratively
- Refines queries based on results
- Returns a structured summary with file paths and line references
- Uses Haiku for cost efficiency
Authentication Hook
On every session start, the plugin automatically checks that your CodeAlive API key is configured and valid. If the key is missing, you’ll be prompted to set it up.API Key Storage
The API key is resolved in this order:CODEALIVE_API_KEYenvironment variable- OS credential store:
| Platform | Store | Manual command |
|---|---|---|
| macOS | Keychain | security add-generic-password -a "$USER" -s "codealive-api-key" -w "KEY" |
| Linux | Secret Service | secret-tool store --label="CodeAlive API Key" service codealive-api-key |
| Windows | Credential Manager | cmdkey /generic:codealive-api-key /user:codealive /pass:"KEY" |
CODEALIVE_BASE_URL env var to your instance URL.
Plugin vs MCP vs Skill
| Plugin | MCP Server | Skill (standalone) | |
|---|---|---|---|
| Install method | /plugin install | claude mcp add | npx skills add |
| Claude Code only | Yes | No (works with 15+ agents) | No (works with 30+ agents) |
| Provides tools | Via skill scripts | Via MCP protocol | Via skill scripts |
| Teaches workflows | Yes | No | Yes |
| Subagent | Yes | No | No |
| Auth hooks | Yes | No | No |
| Best for | Claude Code users wanting the full experience | Any agent needing direct tool access | Any agent needing guided workflows |
Usage Examples
Once installed, just ask naturally — no special commands needed:Troubleshooting
Plugin not found after install
Plugin not found after install
- Ensure you added the marketplace first:
/plugin marketplace add CodeAlive-AI/codealive-skills - Then install:
/plugin install codealive@codealive-marketplace - Restart Claude Code
API key not configured
API key not configured
Run the setup script:Or set the environment variable:
Authentication hook errors
Authentication hook errors
If the session start hook fails:
- Check that Python 3.8+ is available in your PATH
- Verify the API key is valid at app.codealive.ai
- Try setting
CODEALIVE_API_KEYdirectly as an environment variable
Subagent not triggered
Subagent not triggered
The code explorer subagent activates when Claude Code needs iterative codebase exploration. Try asking questions that require multi-step investigation, such as “Trace the request flow from API endpoint to database.”