A semantic search tool for codebases. Use it to replace standard grep or glob searches for more intuitive and powerful retrieval.

Install

mkdir -p .claude/skills/colgrep && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19509" && unzip -o skill.zip -d .claude/skills/colgrep && rm skill.zip

Installs to .claude/skills/colgrep

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

This repository has `colgrep` installed - a semantic code search CLI.
69 chars · catalog descriptionno explicit “when” trigger
Beginner

Key capabilities

  • Perform semantic code search using natural language queries
  • Filter search results by file patterns and directory exclusions
  • Execute hybrid searches combining text patterns with semantic context
  • Output search results in JSON format
  • List files matching search criteria without displaying content

How it works

The tool indexes code and uses semantic analysis to map natural language queries to relevant code snippets. It supports standard grep-like flags for refining results through text patterns and file system filtering.

Inputs & outputs

You give it
Natural language query string and optional file path or filter flags
You get back
Code snippets or file lists matching the semantic or pattern criteria

When to use colgrep

  • Find code by functionality rather than exact text
  • Search across multiple directories or specific file types
  • Exclude test files or vendor directories from search results
  • Perform hybrid search with regex and semantic context

About this skill

Semantic Code Search

This repository has colgrep installed - a semantic code search CLI.

Use colgrep as your PRIMARY search tool instead of Search / Grep / Glob.

Quick Reference

# Basic semantic search
colgrep "<natural language query>" --results 10   # Basic search
colgrep "<query>" -k 25                           # Exploration (more results)
colgrep "<query>" ./src/parser                    # Search in specific folder
colgrep "<query>" ./src/main.rs                   # Search in specific file
colgrep "<query>" ./src/main.rs ./src/lib.rs      # Search in multiple files
colgrep "<query>" ./crate-a ./crate-b             # Search multiple directories

# File filtering
colgrep --include="*.rs" "<query>"                # Include only .rs files
colgrep --include="src/**/*.rs" "<query>"         # Recursive glob pattern
colgrep --include="*.{rs,md}" "<query>"           # Multiple file types (brace expansion)
colgrep --exclude="*.test.ts" "<query>"           # Exclude test files
colgrep --exclude-dir=vendor "<query>"            # Exclude vendor directory

# Pattern-only search (no semantic query needed)
colgrep -e "<pattern>"                            # Search by pattern only
colgrep -e "async fn" --include="*.rs"            # Pattern search with file filter

# Hybrid search (text + semantic)
colgrep -e "<text>" "<semantic query>"            # Hybrid: text + semantic
colgrep -e "<regex>" -E "<semantic query>"        # Hybrid with extended regex (ERE)
colgrep -e "<literal>" -F "<semantic query>"      # Hybrid with fixed string (no regex)
colgrep -e "<word>" -w "<semantic query>"         # Hybrid with whole word match

# Output options
colgrep -l "<query>"                              # List files only
colgrep -c "<query>"                              # Show full function content (50 lines max)
colgrep -n 10 "<query>"                           # Show 10 context lines (default: 6)
colgrep --json "<query>"                          # JSON output

Grep-Compatible Flags

FlagDescriptionExample
-e <PATTERN>Text pattern pre-filtercolgrep -e "async" "concurrency"
-EExtended regex (ERE) for -ecolgrep -e "async|await" -E "concurrency"
-FFixed string (no regex) for -ecolgrep -e "foo[bar]" -F "query"
-wWhole word match for -ecolgrep -e "test" -w "testing"
-k, --resultsNumber of results to returncolgrep --results 20 "query"
-lList files onlycolgrep -l "authentication"
-rRecursive (default, for compatibility)colgrep -r "query"
--includeInclude files matching pattern (repeatable)colgrep --include="*.py" "query"
--excludeExclude files matching patterncolgrep --exclude="*.min.js" "query"
--exclude-dirExclude directoriescolgrep --exclude-dir=node_modules "query"

Notes:

  • -F takes precedence over -E (like grep)
  • Default exclusions always apply: .git, node_modules, target, .venv, __pycache__
  • When running from a subdirectory, results are restricted to that subdirectory. To search the full project, specify . or .. as the path
  • Multiple --include patterns use OR logic (matches if file matches any pattern)
  • Brace expansion is supported: *.{rs,md,py} expands to match all three types

When to Use What

TaskTool
Find code by intent/descriptioncolgrep "query" -k 10
Explore/understand a systemcolgrep "query" -k 25 (increase k)
Search by pattern onlycolgrep -e "pattern" (no semantic query)
Know text exists, need contextcolgrep -e "text" "semantic query"
Literal text with special charscolgrep -e "foo[0]" -F "semantic query"
Whole word matchcolgrep -e "test" -w "testing utilities"
Search in a specific filecolgrep "query" ./src/main.rs
Search in multiple filescolgrep "query" ./src/main.rs ./src/lib.rs
Search specific file typecolgrep --include="*.ext" "query"
Search multiple file typescolgrep --include="*.{rs,md,py}" "query"
Exclude test filescolgrep --exclude="*_test.go" "query"
Exclude vendor directoriescolgrep --exclude-dir=vendor "query"
Search in specific directoriescolgrep --include="src/**/*.rs" "query"
Search multiple directoriescolgrep "query" ./src ./lib ./api
Search CI/CD configscolgrep --include="**/.github/**/*" "q" .
View full function contentcolgrep -c "query"
Exact string/regex match onlyBuilt-in Grep tool
Find files by nameBuilt-in Glob tool

Key Rules

  1. Default to colgrep for any code search
  2. Increase --results (or -k) when exploring (20-30 results)
  3. Use -e for hybrid text+semantic filtering
  4. Use -E with -e for extended regex (alternation |, quantifiers +?, grouping ())
  5. Use -F with -e when pattern contains regex special characters you want literal
  6. Use -w with -e to avoid partial matches (e.g., "test" won't match "testing")
  7. Use --exclude/--exclude-dir to filter out noise (tests, vendors, generated code)
  8. Use brace expansion for multiple file types (e.g., --include="*.{rs,md,py}")
  9. Agents should use colgrep - when spawning Task/Explore agents, they should also use colgrep instead of Grep

Need Help?

Run colgrep --help for complete documentation on all flags and options.

When not to use it

  • Searching for exact string matches without semantic intent
  • Finding files by name only

Limitations

  • Results are restricted to the current subdirectory unless the root path is specified
  • Default exclusions apply to .git, node_modules, target, .venv, and __pycache__

How it compares

Unlike standard grep which relies on literal text matching, this tool interprets the intent of the query to locate functionally relevant code.

Compared to similar skills

colgrep side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
colgrep (this skill)04moReviewBeginner
godot1,0444moReviewIntermediate
software-architecture3336moNo flagsIntermediate
drizzle2381moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

1,0441,947

software-architecture

davila7

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

333868

drizzle

lobehub

Drizzle ORM schema and database guide. Use when working with database schemas (src/database/schemas/*), defining tables, creating migrations, or database model code. Triggers on Drizzle schema definition, database migrations, or ORM usage questions.

238873

screenshot-to-code

OneWave-AI

Convert UI screenshots into working HTML/CSS/React/Vue code. Detects design patterns, components, and generates responsive layouts. Use this when users provide screenshots of websites, apps, or UI designs and want code implementation.

204389

zustand

lobehub

Zustand state management guide. Use when working with store code (src/store/**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.

113434

codex

Lucklyric

Invoke Codex CLI for complex coding tasks requiring high reasoning capabilities. This skill should be invoked when users explicitly mention "Codex", request complex implementation challenges, advanced reasoning, or need high-reasoning model assistance. Automatically triggers on codex-related requests and supports session continuation for iterative development.

32238

Search skills

Search the agent skills registry