From 10f6c9d920877ac5a20a4dec7cf793ada0b10cea Mon Sep 17 00:00:00 2001 From: Mickael Date: Thu, 7 May 2026 16:38:34 +0200 Subject: [PATCH 1/6] feat: ship as a Claude Code plugin marketplace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds `.claude-plugin/marketplace.json` and `.claude-plugin/plugin.json` so this repo can be installed directly from inside Claude Code: /plugin marketplace add cocoindex-io/cocoindex-code /plugin install cocoindex-code@cocoindex-code The existing `skills/ccc/SKILL.md` is auto-discovered as the plugin's skill — no file moves, the `npx skills add` workflow keeps working unchanged. README gets a short subsection under "Skill (Recommended)" linking the new install path. Refs: https://code.claude.com/docs/en/plugin-marketplaces --- .claude-plugin/marketplace.json | 28 ++++++++++++++++++++++++++++ .claude-plugin/plugin.json | 21 +++++++++++++++++++++ README.md | 11 +++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .claude-plugin/marketplace.json create mode 100644 .claude-plugin/plugin.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..f46b691 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,28 @@ +{ + "name": "cocoindex-code", + "version": "1.0.0", + "description": "AST-based semantic code search for Claude Code, Cursor, and any skill-compatible coding agent — install in one command.", + "owner": { + "name": "CocoIndex", + "email": "hi@cocoindex.io" + }, + "plugins": [ + { + "name": "cocoindex-code", + "source": "./", + "description": "Semantic code search skill — wraps the `ccc` CLI to give coding agents AST-aware search over the current codebase.", + "category": "development", + "tags": [ + "semantic-search", + "code-search", + "ast", + "indexing", + "rag", + "skill" + ], + "homepage": "https://github.com/cocoindex-io/cocoindex-code", + "repository": "https://github.com/cocoindex-io/cocoindex-code", + "license": "Apache-2.0" + } + ] +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..562c78c --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,21 @@ +{ + "name": "cocoindex-code", + "version": "1.0.0", + "description": "AST-based semantic code search via the ccc CLI. Bundles the ccc skill so coding agents handle init, indexing, and search automatically.", + "author": { + "name": "CocoIndex", + "email": "hi@cocoindex.io" + }, + "homepage": "https://github.com/cocoindex-io/cocoindex-code", + "repository": "https://github.com/cocoindex-io/cocoindex-code", + "license": "Apache-2.0", + "keywords": [ + "semantic-search", + "code-search", + "ast", + "rag", + "indexing", + "claude-code", + "skill" + ] +} diff --git a/README.md b/README.md index 51ac3ae..0eeb245 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,17 @@ The agent uses semantic search automatically when it would be helpful. You can a Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and other skill-compatible agents. +#### Claude Code plugin marketplace + +For Claude Code users, this repository is also a [plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces). Install the skill from inside Claude Code with: + +```text +/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. + ### MCP Server Alternatively, use `ccc mcp` to run as an MCP server: From 1e339037fcd4add0b308b2378d8fd6adbdc45a60 Mon Sep 17 00:00:00 2001 From: Mickael Date: Thu, 7 May 2026 17:17:43 +0200 Subject: [PATCH 2/6] chore: point plugin manifests to Roxabi fork Update owner, homepage, repository, and README install command from cocoindex-io to Roxabi/cocoindex-code. Co-Authored-By: Claude Sonnet 4.6 --- .claude-plugin/marketplace.json | 8 ++++---- .claude-plugin/plugin.json | 8 ++++---- README.md | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index f46b691..0dae3bd 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -3,8 +3,8 @@ "version": "1.0.0", "description": "AST-based semantic code search for Claude Code, Cursor, and any skill-compatible coding agent — install in one command.", "owner": { - "name": "CocoIndex", - "email": "hi@cocoindex.io" + "name": "Roxabi", + "email": "mickael@bouly.io" }, "plugins": [ { @@ -20,8 +20,8 @@ "rag", "skill" ], - "homepage": "https://github.com/cocoindex-io/cocoindex-code", - "repository": "https://github.com/cocoindex-io/cocoindex-code", + "homepage": "https://github.com/Roxabi/cocoindex-code", + "repository": "https://github.com/Roxabi/cocoindex-code", "license": "Apache-2.0" } ] diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 562c78c..2dabba4 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -3,11 +3,11 @@ "version": "1.0.0", "description": "AST-based semantic code search via the ccc CLI. Bundles the ccc skill so coding agents handle init, indexing, and search automatically.", "author": { - "name": "CocoIndex", - "email": "hi@cocoindex.io" + "name": "Roxabi", + "email": "mickael@bouly.io" }, - "homepage": "https://github.com/cocoindex-io/cocoindex-code", - "repository": "https://github.com/cocoindex-io/cocoindex-code", + "homepage": "https://github.com/Roxabi/cocoindex-code", + "repository": "https://github.com/Roxabi/cocoindex-code", "license": "Apache-2.0", "keywords": [ "semantic-search", diff --git a/README.md b/README.md index 0eeb245..77e5585 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and oth For Claude Code users, this repository is also a [plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces). Install the skill from inside Claude Code with: ```text -/plugin marketplace add cocoindex-io/cocoindex-code +/plugin marketplace add Roxabi/cocoindex-code /plugin install cocoindex-code@cocoindex-code ``` From 5dd74ecff104a346e01d9891e6ff7a2a44a7cbc1 Mon Sep 17 00:00:00 2001 From: Mickael Date: Tue, 23 Jun 2026 11:22:57 +0200 Subject: [PATCH 3/6] docs(plugin): add Grok skill-only install matching Claude Code Document Grok plugin setup (marketplace install + enable) with the same skill-only pattern as the Claude Code plugin: no bundled hooks or MCP. Clarify index freshness is agent-driven via the ccc skill, and note Grok compat MCP disable for users who want CLI/skill search only. All marketplace and manifest URLs point at cocoindex-io/cocoindex-code. --- .claude-plugin/marketplace.json | 12 ++++++------ .claude-plugin/plugin.json | 13 +++++++------ README.md | 29 ++++++++++++++++++++++++++++- 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 0dae3bd..229df32 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1,10 +1,10 @@ { "name": "cocoindex-code", "version": "1.0.0", - "description": "AST-based semantic code search for Claude Code, Cursor, and any skill-compatible coding agent — install in one command.", + "description": "AST-based semantic code search for Claude Code, Grok, Cursor, and any skill-compatible coding agent — install in one command.", "owner": { - "name": "Roxabi", - "email": "mickael@bouly.io" + "name": "CocoIndex", + "email": "hi@cocoindex.io" }, "plugins": [ { @@ -20,9 +20,9 @@ "rag", "skill" ], - "homepage": "https://github.com/Roxabi/cocoindex-code", - "repository": "https://github.com/Roxabi/cocoindex-code", + "homepage": "https://github.com/cocoindex-io/cocoindex-code", + "repository": "https://github.com/cocoindex-io/cocoindex-code", "license": "Apache-2.0" } ] -} +} \ No newline at end of file diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 2dabba4..f162cff 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "cocoindex-code", "version": "1.0.0", - "description": "AST-based semantic code search via the ccc CLI. Bundles the ccc skill so coding agents handle init, indexing, and search automatically.", + "description": "AST-based semantic code search via the ccc CLI. Bundles the ccc skill (skill-only; no hooks or MCP) so coding agents handle init, indexing, and search automatically.", "author": { - "name": "Roxabi", - "email": "mickael@bouly.io" + "name": "CocoIndex", + "email": "hi@cocoindex.io" }, - "homepage": "https://github.com/Roxabi/cocoindex-code", - "repository": "https://github.com/Roxabi/cocoindex-code", + "homepage": "https://github.com/cocoindex-io/cocoindex-code", + "repository": "https://github.com/cocoindex-io/cocoindex-code", "license": "Apache-2.0", "keywords": [ "semantic-search", @@ -16,6 +16,7 @@ "rag", "indexing", "claude-code", + "grok", "skill" ] -} +} \ No newline at end of file diff --git a/README.md b/README.md index b7d8b38..f60e82e 100644 --- a/README.md +++ b/README.md @@ -82,12 +82,39 @@ Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and oth For Claude Code users, this repository is also a [plugin marketplace](https://code.claude.com/docs/en/plugin-marketplaces). Install the skill from inside Claude Code with: ```text -/plugin marketplace add Roxabi/cocoindex-code +/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. +#### Grok plugin (skill-only, same behavior as Claude) + +For [Grok](https://github.com/xai-org/grok) users, install the same `ccc` skill via Grok's plugin system. The plugin ships **only the skill** — no lifecycle hooks, no bundled MCP — matching the Claude Code plugin above. + +```bash +grok plugin marketplace add cocoindex-io/cocoindex-code +grok plugin install cocoindex-code +grok plugin enable cocoindex-code +``` + +`--trust` is not required for this plugin (trust is only needed when a plugin bundles hooks or MCP servers). + +Grok does **not** import Claude's `enabledPlugins` or plugin cache; install and enable the plugin separately even if you already use cocoindex in Claude Code. + +**Index freshness (Claude and Grok):** there is no automatic `SessionStart` hook. The `ccc` skill instructs the agent to run `ccc index` (or `ccc search --refresh`) at the start of a session or after significant code changes. Search runs via the CLI (`ccc search`), not via MCP, unless you opt into MCP manually below. + +To keep a skill-only setup in Grok and avoid pulling MCP servers from Claude/Cursor config: + +```toml +# ~/.grok/config.toml +[compat.claude] +mcps = false + +[compat.cursor] +mcps = false +``` + ### MCP Server Alternatively, use `ccc mcp` to run as an MCP server: From 83fd108d34003548acfa8fe1509a0e12ef1aae4f Mon Sep 17 00:00:00 2001 From: Mickael Date: Tue, 23 Jun 2026 11:26:10 +0200 Subject: [PATCH 4/6] feat(plugin): bundle Grok SessionStart hook and MCP with opt-out docs Add hooks/hooks.json (SessionStart incremental ccc index) and .mcp.json (ccc mcp stdio). Document full Grok install with --trust and how to disable hook and MCP for a skill-only setup matching Claude Code. --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .mcp.json | 8 +++++++ README.md | 37 +++++++++++++++++++++++++-------- hooks/hooks.json | 15 +++++++++++++ 5 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 .mcp.json create mode 100644 hooks/hooks.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 229df32..e158064 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ { "name": "cocoindex-code", "source": "./", - "description": "Semantic code search skill — wraps the `ccc` CLI to give coding agents AST-aware search over the current codebase.", + "description": "Semantic code search — ccc skill, optional SessionStart index hook, and MCP server (Grok: disable hook/MCP for skill-only).", "category": "development", "tags": [ "semantic-search", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index f162cff..e5edb85 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "cocoindex-code", "version": "1.0.0", - "description": "AST-based semantic code search via the ccc CLI. Bundles the ccc skill (skill-only; no hooks or MCP) so coding agents handle init, indexing, and search automatically.", + "description": "AST-based semantic code search via the ccc CLI. Bundles the ccc skill; Grok installs also activate a SessionStart index hook and MCP server (disable either for skill-only).", "author": { "name": "CocoIndex", "email": "hi@cocoindex.io" diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 0000000..3e35d36 --- /dev/null +++ b/.mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "cocoindex-code": { + "command": "ccc", + "args": ["mcp"] + } + } +} \ No newline at end of file diff --git a/README.md b/README.md index f60e82e..be5a6ae 100644 --- a/README.md +++ b/README.md @@ -86,28 +86,47 @@ For Claude Code users, this repository is also a [plugin marketplace](https://co /plugin install cocoindex-code@cocoindex-code ``` -This bundles the same `ccc` skill, with version pinning and `/plugin marketplace update` for updates. +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](#mcp-server) section below instead of using the bundled `.mcp.json`. -#### Grok plugin (skill-only, same behavior as Claude) +#### Grok plugin -For [Grok](https://github.com/xai-org/grok) users, install the same `ccc` skill via Grok's plugin system. The plugin ships **only the skill** — no lifecycle hooks, no bundled MCP — matching the Claude Code plugin above. +For [Grok](https://github.com/xai-org/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): ```bash grok plugin marketplace add cocoindex-io/cocoindex-code -grok plugin install cocoindex-code +grok plugin install cocoindex-code --trust grok plugin enable cocoindex-code ``` -`--trust` is not required for this plugin (trust is only needed when a plugin bundles hooks or MCP servers). +`--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): -Grok does **not** import Claude's `enabledPlugins` or plugin cache; install and enable the plugin separately even if you already use cocoindex in Claude Code. +Install and enable as above, then disable the optional components: + +1. **Hooks** — open `/hooks`, select the `SessionStart` hook from `cocoindex-code`, press `Space` to disable. +2. **MCP** — open `/mcps`, select `cocoindex-code`, press `Space` to disable; or persist in `~/.grok/config.toml`: + +```toml +[mcp_servers.cocoindex-code] +enabled = false +``` -**Index freshness (Claude and Grok):** there is no automatic `SessionStart` hook. The `ccc` skill instructs the agent to run `ccc index` (or `ccc search --refresh`) at the start of a session or after significant code changes. Search runs via the CLI (`ccc search`), not via MCP, unless you opt into MCP manually below. +The agent still owns indexing via the `ccc` skill (`ccc index` / `ccc search --refresh` when stale), same as Claude Code. -To keep a skill-only setup in Grok and avoid pulling MCP servers from Claude/Cursor config: +To avoid importing MCP servers from your Claude/Cursor user config (unrelated to this plugin): ```toml -# ~/.grok/config.toml [compat.claude] mcps = false diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..58edd28 --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "timeout": 60, + "command": "command -v ccc >/dev/null && test -d \"${CLAUDE_PROJECT_DIR}/.cocoindex_code\" && (cd \"${CLAUDE_PROJECT_DIR}\" && ccc index) 2>/dev/null || true" + } + ] + } + ] + } +} \ No newline at end of file From 0588c791d573d5c8a56398ef8c5f53265f1bd89f Mon Sep 17 00:00:00 2001 From: Mickael Date: Tue, 23 Jun 2026 11:28:11 +0200 Subject: [PATCH 5/6] docs(readme): clarify single marketplace for Claude and Grok Add an explicit note that one .claude-plugin/marketplace.json serves both agents with the same plugin id and skill; Grok activates hooks/MCP via --trust. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index be5a6ae..8b26a74 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ Next, set up your [coding agent integration](#coding-agent-integration) — or j ## Coding Agent Integration +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. + ### Skill (Recommended) Install the `ccc` skill so your coding agent automatically uses semantic search when needed: From c7dc723deef52d2d984f00f0d71ee5ef2643d908 Mon Sep 17 00:00:00 2001 From: Mickael Date: Tue, 23 Jun 2026 12:26:00 +0200 Subject: [PATCH 6/6] fix(plugin): EOF newlines for pre-commit and clarify Grok install Add trailing newlines to plugin JSON manifests (CI end-of-file-fixer). Document installing via cocoindex-io/cocoindex-code shorthand when the bare plugin name does not resolve from marketplace. --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- .mcp.json | 2 +- README.md | 4 +++- hooks/hooks.json | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index e158064..5fa8cb9 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -25,4 +25,4 @@ "license": "Apache-2.0" } ] -} \ No newline at end of file +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index e5edb85..22b80e3 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -19,4 +19,4 @@ "grok", "skill" ] -} \ No newline at end of file +} diff --git a/.mcp.json b/.mcp.json index 3e35d36..9b4d937 100644 --- a/.mcp.json +++ b/.mcp.json @@ -5,4 +5,4 @@ "args": ["mcp"] } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 8b26a74..df99170 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,12 @@ Grok does **not** import Claude's `enabledPlugins` or plugin cache; install sepa ```bash grok plugin marketplace add cocoindex-io/cocoindex-code -grok plugin install cocoindex-code --trust +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): diff --git a/hooks/hooks.json b/hooks/hooks.json index 58edd28..17dab18 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -12,4 +12,4 @@ } ] } -} \ No newline at end of file +}