How this skill is triggered — by the user, by Claude, or both
Slash command
/cocoindex:cocoindex-code-searchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
$ARGUMENTS
$ARGUMENTS
bash ${CLAUDE_PLUGIN_ROOT}/scripts/check.sh
以下を一括確認する:
cd ${CLAUDE_PLUGIN_ROOT}/scripts && uv run python search.py "$ARGUMENTS" --project-dir "${CLAUDE_PROJECT_DIR:-$PWD}"
検索オプション:
--project-dir: プロジェクトディレクトリ($CLAUDE_PROJECT_DIR を優先、未設定時は $PWD にフォールバック)--top: 表示件数(デフォルト: 10)hostname + プロジェクトディレクトリのベースネームから自動計算される重要: --name には必ずサニタイズ済みの hostname_プロジェクト名 を指定すること(特殊文字は _ に置換)。
# ホスト名プレフィックス + プロジェクト名をサニタイズ
HOST_PREFIX=$(hostname | sed 's/[^a-zA-Z0-9]/_/g' | tr '[:upper:]' '[:lower:]')
PROJECT_NAME=$(basename "${CLAUDE_PROJECT_DIR:-$PWD}")
INDEX_NAME=$(echo "${HOST_PREFIX}_${PROJECT_NAME}" | sed 's/[^a-zA-Z0-9]/_/g')
# インデックス構築
cd ${CLAUDE_PLUGIN_ROOT}/scripts && uv run python main.py <source_path> --name "$INDEX_NAME" [--patterns "**/*.rb,**/*.py"] [--exclude "**/tmp/**"]
構築オプション:
source_path: インデックス対象ディレクトリ(絶対パス)--patterns: 対象ファイルパターン(カンマ区切り、デフォルト: **/*.rb)--exclude: 除外パターン(カンマ区切り、デフォルト除外パターンに追加される)--name: 必須 — サニタイズ済みの hostname_プロジェクト名(例: dev_wonder_api, macbookpro_local_wonder_front)--no-default-excludes: デフォルト除外パターン(.git, node_modules, .venv 等)を無効化codeindex_<name>__code_chunks(実行後にも表示)構築完了後、再度検索を実行する。
DB起動はスキルの責務外。ユーザーに以下を案内する:
docker compose -f ~/.config/cocoindex/compose.yml up -d
重要: スクリプトは uv run 経由で実行すること。python3 で直接実行すると依存パッケージが見つからずエラーになる。
メインコンテキストから実行する場合は、cocoindex-runner サブエージェントに必ず委任すること。サブエージェント経由で実行することでメインコンテキストのトークン消費を抑えられる。
検索結果から関連ファイルのリストを構造化して報告する:
npx claudepluginhub hidetsugu-miya/claude-pluginsProvides semantic code search and index management via the ccc CLI. Automatically initializes and refreshes the codebase index for relevant file retrieval.
Semantic codebase search — use for exploring code, finding implementations, and answering questions about any project. Searches using natural language queries, identifier names, or file paths. Returns ranked results using embedding-based similarity, BM25 keyword matching, symbol matching, import graph analysis, and git recency. Use this as the default exploration tool instead of grep when you don't know the exact text to search for.
Guides step-by-step onboarding to a new codebase using CocoSearch semantic search. Explores architecture, key modules, and code patterns.