← Back to Skills Marketplace
evezart

Semantic Code Search

by Evez666 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
85
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install semantic-code-search
Description
Semantic search engine for codebases that understands intent and finds functionally similar code. Use when searching code by meaning rather than text, findin...
README (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

  1. Parse — Walk codebase, extract functions/classes with AST
  2. Embed — Generate vector embeddings from code + docstrings
  3. Index — Store in vector index with metadata (file, line, type)
  4. 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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install semantic-code-search
  3. After installation, invoke the skill by name or use /semantic-code-search
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug semantic-code-search
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 85 downloads so far.

How do I install Semantic Code Search?

Run "/install semantic-code-search" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Semantic Code Search free?

Yes, Semantic Code Search is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Semantic Code Search support?

Semantic Code Search is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Semantic Code Search?

It is built and maintained by Evez666 (@evezart); the current version is v1.0.0.

💬 Comments