ccc
Original:🇺🇸 English
Translated
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'.
17installs
Added on
NPX Install
npx skill4agent add cocoindex-io/cocoindex-code cccTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →ccc - Semantic Code Search & Indexing
cccPrerequisites
The current project must be initialized before or can be used. If either command fails with an error about missing initialization or the tool not being found, refer to management.md for installation and initialization instructions.
ccc searchccc indexSearching the Codebase
To perform a semantic search:
bash
ccc search <query terms>The query should describe the concept, functionality, or behavior to find, not exact code syntax. For example:
bash
ccc search database connection pooling
ccc search user authentication flow
ccc search error handling retry logicFiltering Results
-
By language (, repeatable): restrict results to specific languages.
--langbashccc search --lang python --lang markdown database schema -
By 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).
--pathbashccc search --path 'src/api/*' request validation
Pagination
Results default to the first page. To retrieve additional results:
bash
ccc search --offset 5 --limit 5 database schemaIf all returned results look relevant, use to fetch the next page — there are likely more useful matches beyond the first page.
--offsetRefreshing the Index Before Search
To ensure the index reflects the latest code changes before searching:
bash
ccc search --refresh <query terms>This is equivalent to running followed by .
ccc indexccc searchWorking 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 tool) to load the matched file and read lines around the returned range for full context.
Read - When working in a terminal without a file-reading tool, use to extract a specific line range.
sed -n '<start>,<end>p' <file>
Updating the Index
After making code changes, update the index to keep search results current:
bash
ccc indexThis blocks until indexing completes, showing progress. If indexing is already in progress, it waits for completion.
Run proactively after significant code changes (new files, refactors, renamed modules) to ensure subsequent searches return accurate results.
ccc indexManagement & Troubleshooting
For installation, initialization, daemon management, troubleshooting, and cleanup commands, see management.md.