Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

smart-code-search智能代码搜索

Agent Skill

smart-code-search 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,116

周安装

175

GitHub Stars

公开资料未说明

下载量

1,442
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:smart-code-search(智能代码搜索)
来源仓库:https://github.com/brettmhammond/smart-code-search
安装命令:
openclaw skills install smart-code-search
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install smart-code-search

简介

利用语义理解技术搜索代码库与文档,超越关键字匹配实现更精准定位。

  • 由 ColGREP 和 NextPlaid 提供支持,适合大型项目中的知识检索任务。
  • 可在 OpenClaw 中快速找到相关函数、模块或配置项,减少人工翻阅时间。
  • 搜索结果可能受索引完整性影响,重要决策仍需交叉验证原始源码。
  • 建议定期更新代码索引以保证最新提交被纳入检索范围。

SKILL.md

name
smart-code-search
description
Search code and docs by meaning, not keywords. Powered by ColGREP/NextPlaid, #1 on MTEB Code. 17M params, local CPU, sub-second, zero cost, 100% private. Outperforms 8B models at 54x smaller. Use when searching codebases for implementations or patterns, navigating unfamiliar projects, finding related docs across repos, or giving coding agents semantic awareness. Triggers on "search the code", "find where", "semantic search", "code search", "smart search", "codebase search", "find implementation", "colgrep", "nextplaid".
metadata

Smart Code Search

Search code and docs by meaning, not just strings.

Powered by ColGREP and NextPlaid from LightOn — the engine behind the #1 ranked code retrieval model on MTEB and the #1 retriever on BrowseComp-Plus, OpenAI's hardest agentic search benchmark.

grep finds strings. This finds intent. Ask "payment capture logic" and get results from files that never contain those exact words — because it understands what your code *does*, not just what it says.

Why This Exists

Every developer has been here: you know *what* you're looking for but not *where* it lives. You chain 4 different grep -r attempts, guess filenames, scroll through directory trees. Coding agents are even worse — they grep, miss things, hallucinate file paths, waste tokens exploring blind.

ColGREP fixes this with multi-vector semantic search. It parses your code with Tree-sitter, embeds each function/method/class with token-level vectors, and ranks results by meaning. The model is 17M parameters, runs on CPU, and returns results in under a second.

The Numbers

MetricValue
MTEB Code Leaderboard#1 (LateOn-Code)
BrowseComp-Plus87.59% accuracy, beating all models up to 8B params (blog)
vs grep in coding agents70% win rate head-to-head
Model size17M params — 54× smaller than competing 8B models
Search latency200–900ms on CPU
API cost$0. Forever. Runs 100% local
PrivacyCode never leaves your machine

Install

brew install lightonai/tap/colgrep

Verify: colgrep --version

Quick Start

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"

Search Options

colgrep "query"              # Default output: file:lines (score: X.XX)
colgrep "query" --json       # JSON output for piping to other tools
colgrep "query" -n 5         # Top 5 results only

When to Use This vs grep

You know...Use
The exact string or function namegrep -r "functionName"
The concept but not the wordscolgrep "what it does"
A pattern + a conceptcolgrep -e "pattern" "meaning"
Where something is implementedcolgrep "description of behavior"
How a feature works across filescolgrep "feature workflow"

Coding Agent Integration

ColGREP provides built-in integration with popular coding agents. After installing, restart your agent to enable semantic search:

  • Claude Code: colgrep --install-claude-code
  • OpenCode: colgrep --install-opencode
  • Codex: colgrep --install-codex

These commands register ColGREP as a search tool within the agent. The agent will automatically use semantic search when navigating indexed projects.

Multi-Project Setup

Index each project independently. Search from the project directory:

cd ~/code/api && colgrep init
cd ~/code/frontend && colgrep init
cd ~/code/infrastructure && colgrep init
cd ~/docs && colgrep init

# Search each independently
cd ~/code/api && colgrep "payment processing service"
cd ~/code/frontend && colgrep "checkout form validation"

Works great for monorepos, microservices, documentation vaults, and any directory with text/code files.

How It Works

ColGREP uses ColBERT late-interaction retrieval — a fundamentally different approach than traditional single-vector embeddings:

  1. Tree-sitter parses your code into structured units (functions, methods, classes, signatures)
  2. LateOn-Code-edge (17M params) creates multiple token-level embeddings per code unit — not one lossy summary vector
  3. NextPlaid stores these in a quantized, memory-mapped Rust index
  4. At search time, query tokens interact with document tokens for fine-grained relevance scoring

This is why a 17M model beats 8B models — late interaction preserves token-level semantics that single-vector approaches compress away. Read the full technical story: The Bloated Retriever Era Is Over

Interpreting Scores

  • 6.0+ — Near-exact conceptual match. The code does exactly what you described.
  • 5.0–6.0 — Strong semantic match. Highly relevant code.
  • 4.0–5.0 — Good match. Related code worth reviewing.
  • 3.0–4.0 — Weak match. May or may not be relevant.
  • Below 3.0 — Likely noise. Ignore these results.

Troubleshooting

"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/

Links

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

71.99%
按下载量换算1,038

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills