← 返回 Skills 市场
85
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install semantic-code-search
功能描述
Semantic search engine for codebases that understands intent and finds functionally similar code. Use when searching code by meaning rather than text, findin...
使用说明 (SKILL.md)
Semantic Code Search
Find code by meaning, not just text. Search across codebases using natural language intent.
Quick Start
from code_search import CodeIndex, SemanticSearch
index = CodeIndex("/path/to/codebase")
index.build() # Parse AST, generate embeddings
search = SemanticSearch(index)
results = search.query("how is authentication handled?")
results = search.similar_to("src/auth/login.py:validate_token")
How It Works
- Parse — Walk codebase, extract functions/classes with AST
- Embed — Generate vector embeddings from code + docstrings
- Index — Store in vector index with metadata (file, line, type)
- Search — Query by intent or find similar code
Search Types
- Intent search: "find error handling patterns" → returns matching code
- Similarity search: Given a function, find others doing the same thing
- Structural search: Find all functions matching a call pattern
- Duplicate detection: Find code doing the same thing differently
CLI
python3 scripts/search.py index /path/to/codebase
python3 scripts/search.py query "database connection setup"
python3 scripts/search.py similar src/db/connect.py:10
python3 scripts/search.py duplicates
安全使用建议
This looks safe for local code search, but use it only on repositories you are comfortable indexing. Check the actual CLI file name before running examples, avoid committing .code_index.json, and remember that the saved index may include copied source code and docstrings.
功能分析
Type: OpenClaw Skill
Name: semantic-code-search
Version: 1.0.0
The skill implements a local semantic code search engine using Python's AST module and a custom TF-IDF vectorizer. Analysis of scripts/code_search.py and SKILL.md shows no network activity, no data exfiltration, and no use of dangerous execution functions like eval or os.system. The code is well-structured and strictly follows its stated purpose of indexing and searching local codebases without any evidence of malicious intent or prompt injection.
能力评估
Purpose & Capability
The included code matches the stated purpose: it walks a user-specified codebase, parses functions/classes, builds local text vectors, and supports query/similarity search. The notable capability is that it reads source files and can store extracted code snippets locally.
Instruction Scope
The instructions are generally scoped to user-directed code search, but the CLI examples reference scripts/search.py while the provided file is scripts/code_search.py, which may cause setup or invocation confusion.
Install Mechanism
There is no install spec, and the code imports the third-party package click for CLI use without a declared dependency. This is a packaging/completeness issue rather than evidence of malicious behavior.
Credentials
Reading files under a selected codebase is proportionate for semantic code search. There is no evidence of network transmission, credential access, shell execution, or hidden endpoints.
Persistence & Privilege
The CLI index path saves a local .code_index.json file containing code fragments and docstrings. This is purpose-aligned, but users should treat the index as potentially sensitive project data.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install semantic-code-search - 安装完成后,直接呼叫该 Skill 的名称或使用
/semantic-code-search触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of semantic-code-search.
- Enables semantic search across codebases using natural language intent.
- Supports finding functionally similar code, discovering duplicates, and navigating unfamiliar codebases.
- Features AST parsing, code embedding generation, and similarity-based queries.
- Includes both Python API and CLI for indexing and searching code by meaning.
元数据
常见问题
Semantic Code Search 是什么?
Semantic search engine for codebases that understands intent and finds functionally similar code. Use when searching code by meaning rather than text, findin... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 85 次。
如何安装 Semantic Code Search?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install semantic-code-search」即可一键安装,无需额外配置。
Semantic Code Search 是免费的吗?
是的,Semantic Code Search 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Semantic Code Search 支持哪些平台?
Semantic Code Search 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Semantic Code Search?
由 Evez666(@evezart)开发并维护,当前版本 v1.0.0。
推荐 Skills