Index of every page on this site: llms.txt
All skills
Run it yourself

This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the index', 'ccc', 'cocoindex-code'.

Use this Skill: https://skilld.dev/gh/cocoindex-io/cocoindex-code/ccc

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencessettings.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

ccc Settings

Configuration lives in two YAML files, both created automatically by ccc init.

User-Level Settings (~/.cocoindex_code/global_settings.yml)

Shared across all projects. Controls the embedding model and extra environment variables for the daemon.

embedding:
  provider: sentence-transformers   # or "litellm" (default when provider is omitted)
  model: Snowflake/snowflake-arctic-embed-xs
  device: mps                       # optional: cpu, cuda, mps (auto-detected if omitted)
  min_interval_ms: 300              # optional: pace LiteLLM embedding requests to reduce 429s; defaults to 5 for LiteLLM

envs:                               # extra environment variables for the daemon
  OPENAI_API_KEY: your-key          # only needed if not already in the shell environment

daemon:
  idle_timeout_minutes: 180         # 0 keeps the daemon running forever
  keep_alive_with_mcp: true         # false allows idle exit during live MCP sessions

Fields

Field Description
embedding.provider sentence-transformers for local models, litellm (or omit) for cloud/remote models
embedding.model Model identifier — format depends on provider (see examples below)
embedding.device Optional. cpu, cuda, or mps. Auto-detected if omitted. Only relevant for sentence-transformers.
embedding.min_interval_ms Optional. Minimum delay between LiteLLM embedding requests in milliseconds. Defaults to 5 for LiteLLM and is ignored by sentence-transformers. Set explicitly to override the default.
envs Key-value map of environment variables injected into the daemon. Use for API keys not already in the shell environment.
daemon.idle_timeout_minutes Minutes without client activity before the daemon exits. Defaults to 180; use 0 to disable idle exit.
daemon.keep_alive_with_mcp Whether a live MCP session keeps the daemon and embedding model warm. Defaults to true; set to false to release them after the normal idle timeout between real requests.

Embedding Model Examples

Local (sentence-transformers, no API key needed):

embedding:
  provider: sentence-transformers
  model: Snowflake/snowflake-arctic-embed-xs        # default, lightweight
embedding:
  provider: sentence-transformers
  model: nomic-ai/CodeRankEmbed                     # better code retrieval, needs GPU (~1 GB VRAM)

Ollama (local):

embedding:
  model: ollama/nomic-embed-text

OpenAI:

embedding:
  model: text-embedding-3-small
  min_interval_ms: 300
envs:
  OPENAI_API_KEY: your-api-key

Gemini:

embedding:
  model: gemini/gemini-embedding-001
envs:
  GEMINI_API_KEY: your-api-key

Voyage (code-optimized):

embedding:
  model: voyage/voyage-code-3
envs:
  VOYAGE_API_KEY: your-api-key

For the full list of supported cloud providers and model identifiers, see LiteLLM Embedding Models.

Important

Switching embedding models changes vector dimensions — you must re-index after changing the model:

ccc reset && ccc index

Project-Level Settings (<project>/.cocoindex_code/settings.yml)

Per-project. Controls which files to index. Created by ccc init and automatically added to .gitignore.

include_patterns:
  - "**/*.py"
  - "**/*.js"
  - "**/*.ts"
  # ... (sensible defaults for 28+ file types)

exclude_patterns:
  - "**/.*"              # hidden directories
  - "**/__pycache__"
  - "**/node_modules"
  - "**/dist"
  # ...

language_overrides:
  - ext: inc             # treat .inc files as PHP
    lang: php

Fields

Field Description
include_patterns Glob patterns for files to index. Defaults cover common languages (Python, JS/TS, Rust, Go, Java, C/C++, C#, SQL, Shell, Markdown, PHP, Lua, etc.).
exclude_patterns Glob patterns for files/directories to skip. Defaults exclude hidden dirs, node_modules, dist, __pycache__, vendor, etc.
language_overrides List of {ext, lang} pairs to override language detection for specific file extensions.

Editing Tips

  • To index additional file types, append glob patterns to include_patterns (e.g. "**/*.proto").
  • To exclude a directory, append to exclude_patterns (e.g. "**/generated").
  • After editing, run ccc index to re-index with the new settings.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo4 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides semantic code search and indexing capabilities using the CocoIndex Code CLI. It facilitates the installation of the tool, management of its local daemon, and execution of search queries against a project's codebase. While the skill processes project files which could theoretically contain instructions designed to influence the agent (indirect prompt injection), it follows industry standard practices for developer tooling and utilizes legitimate vendor-owned packages.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 0136fc7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 months ago

README badge

README badge for cocoindex-io/cocoindex-code