PluginBench
Skill
Pass
Audit score 90

ccc

cocoindex-io/cocoindex-code

Semantic code search and indexing for your codebase with automatic index management.

What is ccc?

ccc is a CLI tool for CocoIndex Code that enables semantic search across your codebase and manages the search index automatically. Use it when you need to find code by concept or functionality, update the index after changes, or explore the codebase structure.

  • Perform semantic searches across the codebase using natural language queries
  • Filter search results by programming language and file path patterns
  • Paginate through search results with offset and limit controls
  • Automatically initialize and maintain the codebase index
  • Keep the index fresh by re-indexing after significant code changes
  • Integrate seamlessly with editor tools to explore matched files

How to install ccc

npx skills add https://github.com/cocoindex-io/cocoindex-code --skill ccc
Prerequisites
  • ccc CLI installed (refer to management.md if not found)
  • Project initialized with ccc init (handled automatically if needed)
Claude Code
Cursor
Windsurf
Cline

How to use ccc

  1. 1.Run ccc init from the project root if this is the first time using ccc in this project
  2. 2.Run ccc index to build or update the search index
  3. 3.Use ccc search <query> with natural language terms describing what you want to find
  4. 4.Optionally filter results with --lang, --path, --offset, and --limit flags
  5. 5.Use the returned file paths and line ranges to explore matches in your editor

Use cases

Good for
  • Find all database connection pooling logic across the codebase
  • Locate user authentication flow implementation in a large project
  • Search for error handling and retry logic in specific modules
  • Discover how a particular concept is implemented in different parts of the code
  • Update the index after refactoring or adding new files to ensure search accuracy
Who it's for
  • Developers navigating unfamiliar codebases
  • Teams maintaining large projects with complex code organization
  • Engineers performing code reviews or refactoring
  • Anyone needing to understand how specific functionality is implemented

ccc FAQ

When should I re-index the codebase?

Re-index at the start of a session, after making significant code changes (new files, refactors, renamed modules), or use ccc search --refresh to refresh during a search. There is no need to re-index between consecutive searches if no code was changed.

How do I search for a specific concept rather than exact code?

Use natural language queries that describe the concept or behavior. For example, use 'database connection pooling' instead of searching for specific function names or syntax.

Can I limit search results to specific files or languages?

Yes. Use --path with a glob pattern to restrict to file paths, and use --lang (repeatable) to filter by programming language.

What if ccc search fails with an initialization error?

The agent will automatically run ccc init from the project root, then ccc index to build the index, then retry your search.

How do I view the full context around a search result?

Use your editor's file reading tool to load the matched file, or use sed -n '<start>,<end>p' <file> in a terminal to extract the specific line range.

Full instructions (SKILL.md)

Source of truth, from cocoindex-io/cocoindex-code.


name: ccc description: "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'."

ccc - Semantic Code Search & Indexing

ccc is the CLI for CocoIndex Code, providing semantic search over the current codebase and index management.

Ownership

The agent owns the ccc lifecycle for the current project — initialization, indexing, and searching. Do not ask the user to perform these steps; handle them automatically.

  • Initialization: If ccc search or ccc index fails with an initialization error (e.g., "Not in an initialized project directory"), run ccc init from the project root directory, then ccc index to build the index, then retry the original command.
  • Index freshness: Keep the index up to date by running ccc index (or ccc search --refresh) when the index may be stale — e.g., at the start of a session, or after making significant code changes (new files, refactors, renamed modules). There is no need to re-index between consecutive searches if no code was changed in between.
  • Installation: If ccc itself is not found (command not found), refer to management.md for installation instructions and inform the user.

Searching the Codebase

To perform a semantic search:

ccc search <query terms>

The query should describe the concept, functionality, or behavior to find, not exact code syntax. For example:

ccc search database connection pooling
ccc search user authentication flow
ccc search error handling retry logic

Filtering Results

  • By language (--lang, repeatable): restrict results to specific languages.

    ccc search --lang python --lang markdown database schema
    
  • By path (--path): restrict results to a glob pattern relative to project root. If omitted, defaults to the current working directory (only results under that subdirectory are returned).

    ccc search --path 'src/api/*' request validation
    

Pagination

Results default to the first page. To retrieve additional results:

ccc search --offset 5 --limit 5 database schema

If all returned results look relevant, use --offset to fetch the next page — there are likely more useful matches beyond the first page.

Working with Search Results

Search results include file paths and line ranges. To explore a result in more detail:

  • Use the editor's built-in file reading capabilities (e.g., the Read tool) to load the matched file and read lines around the returned range for full context.
  • When working in a terminal without a file-reading tool, use sed -n '<start>,<end>p' <file> to extract a specific line range.

Settings

To view or edit embedding model configuration, include/exclude patterns, or language overrides, see settings.md.

Management & Troubleshooting

For installation, initialization, daemon management, troubleshooting, and cleanup commands, see management.md.