Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计提醒

codesearchcodesearch 搜索

Agent Skill

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

总安装

588

周安装

25

GitHub Stars

公开资料未说明

下载量

206
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/artemismucaj/codesearch --skill codesearch

简介

Codesearch 融合 ML 嵌入向量与关键词匹配技术,实现语义级代码检索。

  • 单次查询即可同时返回含义相关和精确匹配的代码片段集合。
  • 采用倒数排名融合算法提升搜索结果的相关性与排序合理性。
  • 适用于按功能意图查找代码、理解组件工作原理和探索实现细节等任务。
  • codesearch 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Codesearch

Hybrid code search powered by ML embeddings, BM25-style keyword matching, and Reciprocal Rank Fusion. Finds code by meaning and by exact keyword — both in a single query, by default.

When to Use This Skill

Invoke this skill immediately when:

  • User asks to find code by intent (e.g., "where is authentication handled?")
  • User asks to understand what code does (e.g., "how does the indexer work?")
  • User asks to explore functionality (e.g., "find error handling logic")
  • User asks about implementation details (e.g., "how are embeddings generated?")
  • You need to discover code related to a concept rather than an exact string
  • User asks about blast radius or impact of changing a function/symbol
  • User asks who calls a function or what does a function call (symbol context)

When to Use Built-in Tools Instead

Use Grep/Glob for:

  • Exact text matching: Grep "fn new_indexer" (find exact function name)
  • Specific imports: Grep "use tokio" (find import statements)
  • File patterns: Glob "**/*.rs" (find files by extension)
  • Variable references: Grep "config_path" (find exact variable name)

Installation

If the codesearch binary is not found, install it automatically by running the install script bundled with this skill:

INSTALL_DIR="$HOME/.local/bin" sh .claude/skills/codesearch/install.sh

After installation, verify it works:

codesearch --version
Note: The script downloads the latest release binary from GitHub for the current OS/architecture. It installs to $INSTALL_DIR (defaults to $HOME/.local/bin above). Ensure $HOME/.local/bin is in your PATH. If it's not already in your PATH, add this line to your shell profile (~/.bashrc, ~/.zshrc, etc.): ``shell export PATH="$HOME/.local/bin:$PATH" ` Then reload your shell configuration: source ~/.bashrc (or source ~/.zshrc`).

Prerequisites

Before using codesearch, the target repository must be indexed:

# Index a repository (run once, supports incremental updates)
codesearch index /path/to/repo

# Index with a custom name
codesearch index /path/to/repo --name my-project

# Force full re-index (ignores cached file hashes)
codesearch index /path/to/repo --force

Search

Use codesearch search to find code. By default it runs hybrid search (semantic vector similarity + BM25 keyword matching, fused via RRF) for best precision and recall.

# Hybrid search — default, no flag needed
codesearch search "user authentication flow"
codesearch search "error handling middleware"
codesearch search "database connection setup"
codesearch search "API request validation"

# Semantic-only search (disable keyword leg, pure vector similarity)
codesearch search "user authentication flow" --no-text-search

# Limit number of results (default: 10)
codesearch search "error handling" --num 5

# Filter by minimum relevance score
# Note: hybrid RRF scores are ~0.016–0.033; semantic cosine scores are 0.0–1.0
codesearch search "authentication" --min-score 0.02   # for hybrid results
codesearch search "authentication" --no-text-search --min-score 0.5  # for semantic-only

# Filter by programming language
codesearch search "struct definition" --language rust
codesearch search "class hierarchy" --language python --language typescript

# Filter by repository (when multiple repos are indexed)
codesearch search "config loading" --repository my-project

Hybrid vs Semantic-only

ModeFlagBest for
Hybrid (default)*(none)*Most queries — combines meaning and keyword precision
Semantic-only--no-text-searchAbstract intent queries where exact keywords unlikely to match

Supported Languages

Codesearch supports: Rust, Python, JavaScript, TypeScript, Go, HCL, PHP, C++

What Gets Indexed

Codesearch uses Tree-sitter to extract and index these code constructs:

  • Functions and methods
  • Structs, classes, and enums
  • Traits and implementations
  • Modules, constants, and typedefs
  • Import statements

Call Graph Analysis

Once a repository is indexed, the call graph is available for two complementary commands.

Impact Analysis — blast radius of a change

# Who breaks if `authenticate` changes? (default depth: 5 hops)
codesearch impact authenticate

# Limit to 2 hops
codesearch impact authenticate --depth 2

# Restrict to one repository; JSON output for scripts
codesearch impact authenticate --repository my-api --format json

Symbol Context — 360-degree callers + callees

# Who calls `authenticate`, and what does it call?
codesearch context authenticate

# Limit results per direction
codesearch context authenticate --limit 10

# JSON output
codesearch context authenticate --format json

Repository Management

# List all indexed repositories
codesearch list

# View indexing statistics
codesearch stats

# Delete a repository from the index
codesearch delete <id-or-path>

Query Best Practices

Do:

codesearch search "How are file chunks created and stored?"
codesearch search "Vector embedding generation process"
codesearch search "Configuration loading and validation"
codesearch search "HTTP request routing logic"

Don't:

codesearch search "func"          # Too vague
codesearch search "error"         # Too generic
codesearch search "HandleRequest" # Use Grep for exact name matches

Recommended Workflow

  1. Start with codesearch search to find relevant code semantically
  2. Use Read tool to examine the files and lines from search results
  3. Use Grep only for exact string searches when you know the identifier name
  4. Use codesearch search again with refined queries if initial results aren't specific enough

Advanced Configuration

# Use a custom data directory for the index
codesearch --data-dir /custom/path search "query"

# Use a namespace to isolate projects
codesearch --namespace my-project search "query"

# Use in-memory storage (no persistence, useful for one-off searches)
codesearch --memory-storage search "query"

# Disable result reranking (faster but less accurate)
codesearch --no-rerank search "query"

Keywords

semantic search, hybrid search, code search, natural language search, find code, explore codebase, code understanding, intent search, AST analysis, embeddings, code discovery, code exploration, BM25, keyword search, RRF, reciprocal rank fusion, call graph, impact analysis, blast radius, symbol context, callers, callees, dependency analysis

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.86%
按下载量换算74

Claude

32.39%
按下载量换算67

Cursor

19.1%
按下载量换算39

Gemini CLI

9.47%
按下载量换算20

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/artemismucaj/codesearch --skill codesearch 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

来源信息

继续浏览同类 Skills