🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Smart Code Search

by @brettmhammond

Search code and docs by meaning, not keywords. Powered by ColGREP/NextPlaid,

Versionv1.0.2
πŸ’‘ Examples

1. Index Your Project

cd /path/to/project
colgrep init

That's it. ColGREP parses every file with Tree-sitter, builds multi-vector embeddings on CPU, and stores the index in .colgrep/. Takes 30–60 seconds for ~1000 files. After this, the index auto-updates on every search β€” changed files are detected and re-indexed automatically.

2. Search

colgrep "natural language description of what you want"

Results are ranked by semantic relevance score. Higher = better match.

Examples:

colgrep "authentication middleware token validation"
colgrep "database migration rollback strategy"
colgrep "React form validation with error display"
colgrep "webhook retry logic with exponential backoff"

3. Combine Regex + Semantics

Filter files by regex pattern first, then rank semantically:

colgrep -e "async.*await" "error handling patterns"
colgrep -e "def test_" "payment capture edge cases"
colgrep -e "\.tsx$" "patient dashboard layout"

πŸ“‹ Tips & Best Practices

"Index is being updated by another process" β€” Another colgrep instance is updating. Current search uses existing index. Safe to ignore.

Re-index from scratch:

rm -rf .colgrep/ && colgrep init

Add to .gitignore:

.colgrep/

View on ClawHub
TERMINAL
clawhub install smart-code-search

πŸ§ͺ Use this skill with your agent

Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

πŸ” Can't find the right skill?

Search 60,000+ AI agent skills β€” free, no login needed.

Search Skills β†’