by cocoindex-io
A super light-weight embedded code search engine CLI (AST based) that just works - saves 70% token and improves speed for coding agent 🌟 Star if you like it!
# Add to your Claude Code skills
git clone https://github.com/cocoindex-io/cocoindex-codeGuides for using ai agents skills like cocoindex-code.
Last scanned: 6/19/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-06-19T09:05:32.151Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}cocoindex-code is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by cocoindex-io. A super light-weight embedded code search engine CLI (AST based) that just works - saves 70% token and improves speed for coding agent 🌟 Star if you like it!. It has 2,504 GitHub stars.
Yes. cocoindex-code passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/cocoindex-io/cocoindex-code" and add it to your Claude Code skills directory (see the Installation section above).
cocoindex-code is primarily written in Python. It is open-source under cocoindex-io on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh cocoindex-code against similar tools.
No comments yet. Be the first to share your thoughts!
A lightweight, effective (AST-based) semantic code search tool for your codebase. Built on CocoIndex — a Rust-based ultra performant data transformation engine. Use it from the CLI, or integrate with Claude, Codex, Cursor — any coding agent — via Skill or MCP.
🌟 Please help star CocoIndex if you like this project!
Deutsch | English | Español | français | 日本語 | 한국어 | Português | Русский | 中文
Using pipx:
pipx install 'cocoindex-code[full]' # batteries included (local embeddings)
pipx upgrade cocoindex-code # upgrade
Using uv:
uv tool install --upgrade 'cocoindex-code[full]'
Two install styles — they mirror the Docker image variants of the same names:
cocoindex-code[full] — batteries-included. Pulls in sentence-transformers so local embeddings (no API key required) work out of the box. The ccc init interactive prompt defaults to Snowflake/snowflake-arctic-embed-xs.cocoindex-code (slim) — LiteLLM-only; requires a cloud embedding provider and API key. Use when you don't want the local-embedding deps (~1 GB of torch + transformers).Next, set up your coding agent integration — or jump to Manual CLI Usage if you prefer direct control.
This repository is a single plugin marketplace (.claude-plugin/marketplace.json) consumed by both Claude Code and Grok — same plugin id cocoindex-code, same ccc skill. Grok optionally activates the bundled hooks and MCP server with --trust; Claude Code users can install the same marketplace and rely on the skill alone or load hooks/MCP from the plugin as needed.
Install the ccc skill so your coding agent automatically uses semantic search when needed:
npx skills add cocoindex-io/cocoindex-code
That's it — no ccc init or ccc index needed. The skill teaches the agent to handle initialization, indexing, and searching on its own. It will automatically keep the index up to date as you work.
The agent uses semantic search automatically when it would be helpful. You can also nudge it explicitly — just ask it to search the codebase, e.g. "find how user sessions are managed", or type /ccc to invoke the skill directly.
Works with Claude Code and other skill-compatible agents.
For Claude Code users, this repository is also a plugin marketplace. Install the skill from inside Claude Code with:
/plugin marketplace add cocoindex-io/cocoindex-code
/plugin install cocoindex-code@cocoindex-code
This bundles the same ccc skill, with version pinning and /plugin marketplace update for updates. The repository also ships hooks/hooks.json and .mcp.json for Grok (and Claude Code plugin installs that load those files); Claude users who want skill-only search can rely on the skill alone and add MCP manually in the MCP Server section below instead of using the bundled .mcp.json.
For Grok users, install via Grok's plugin system. The plugin bundles three components:
| Component | Purpose |
|---|---|
Skill (skills/ccc/) |
Agent runs ccc search / ccc index via the CLI (same as Claude Code above) |
Hook (hooks/hooks.json) |
SessionStart → incremental ccc index when .cocoindex_code/ exists |
MCP (.mcp.json) |
ccc mcp stdio server — search tool with refresh_index=true by default |
Grok does not import Claude's enabledPlugins or plugin cache; install separately even if you already use cocoindex in Claude Code.
Full install (skill + hook + MCP):
grok plugin marketplace add cocoindex-io/cocoindex-code
grok plugin install cocoindex-io/cocoindex-code --trust
grok plugin enable cocoindex-code
Prefer the GitHub shorthand (cocoindex-io/cocoindex-code) for install — grok plugin install cocoindex-code can fail when no marketplace plugin matches that bare name.
--trust is required so Grok activates the plugin's hooks and MCP server (skills load when the plugin is enabled).
Skill-only (match Claude Code — no auto-index hook, no MCP tool):
Install and enable as above, then disable the optional components:
/hooks, select the SessionStart hook from cocoindex-code, press Space to disable./mcps, select cocoindex-code, press Space to disable; or persist in ~/.grok/config.toml:[mcp_servers.cocoindex-code]
enabled = false
The agent still owns indexing via the ccc skill (ccc index / ccc search --refresh when stale), same as Claude Code.
To avoid importing MCP servers from your Claude/Cursor user config (unrelated to this plugin):
[compat.claude]
mcps = false
[compat.cursor]
mcps = false
Alternatively, use ccc mcp to run as an MCP server:
claude mcp add cocoindex-code -- ccc mcp
codex mcp add cocoindex-code -- ccc mcp
opencode mcp add
Enter MCP server name: cocoindex-code
Select MCP server type: local
Enter command to run: ccc mcp
Or use opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"cocoindex-code": {
"type": "local",
"command": [
"ccc", "mcp"
]
}
}
}
Add a local MCP server in ~/.config/kilo/kilo.jsonc, kilo.jsonc, or .kilo/kilo.jsonc:
{
"mcp": {
"cocoindex-code": {
"type": "local",
"command": ["ccc", "mcp"],
"enabled": true
}
}
}
Once configured, the agent automatically decides when semantic code search is helpful — finding code by description, exploring unfamiliar codebases, fuzzy/conceptual matches, or locating implementations without knowing exact names.
Note: The
cocoindex-codecommand (without subcommand) still works as an MCP server for backward compatibility. It auto-creates settings from environment variables on first run.
When running as an MCP server (ccc mcp), the following tool is exposed:
search — Search the codebase using semantic similarity.
search(
query: str, # Natural language query or code snippet
limit: int = 5, # Maximum results (1-100)
offset: int = 0, # Pagination offset
refresh_index: bool = True, # Refresh index before querying
languages: list[str] | None = None, # Filter by language (e.g. ["python", "typescript"])
paths: list[str] | None = None, # Filter by path glob (e.g. ["src/utils/*"])
)
Returns matching code chunks with file path, language, code content, line numbers, and similarity score.
You can also use the CLI directly — useful for manual control, running indexing after changing settings, checking status, or searching outside an agent.
ccc init # initialize project (creates settings)
ccc index # build the index
ccc search "authentication logic