codekb-search

Searches codebases via hybrid structural, semantic, and lexical retrieval with RRF fusion.

1|Updated Jun 27, 2026
One-click install
npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill codekb-search-te-quanbzhang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codekb-search
Source: https://github.com/TE-QuanBZhang/skills-pool/tree/main/codekb/skills/codekb-search
Command: npx skills add https://github.com/TE-QuanBZhang/skills-pool --skill codekb-search-te-quanbzhang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Finding where functionality is implemented in a large codebase is slow with plain grep or manual browsing, especially when you only know the concept, an error message, or a partial symbol name rather than an exact location. ## Core Features & Use Cases - Hybrid Search: Combines structural (CodeGraph), semantic (vector), and lexical (BM25) channels fused with weighted RRF through the codekb_search MCP tool. - Automatic Query Routing: Detects whether a query is a symbol lookup, error string, bug-related question, or natural language and weights the appropriate channel. - Scoped Results: Supports scope, knowledge type filters, and result limits, returning file paths with line ranges for direct follow-up reads. - Use Case: Ask "where is user authentication handled" and receive ranked file locations with line ranges, then open the top result to read the implementation. ## Quick Start Ask the assistant to use codekb_search to find where payment refund processing is implemented in this repository.

Frequently Asked Questions about codekb-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search code by meaning instead of exact text?

Use the codekb_search MCP tool with a natural language query such as "where is user authentication handled". The semantic vector channel matches concepts rather than exact strings, and results include file paths with line ranges.

How does hybrid code search combine structural and semantic results?

It runs structural (CodeGraph), semantic (vector), and lexical (BM25) channels in parallel, then fuses them with weighted RRF. Query routing adjusts weights, for example favoring structural results for exact symbol lookups.

What is required to use codekb_search?

The CodeKB MCP server must be configured in your AI coding tool, and the codebase should be indexed with CodeGraph for structural results. Without the MCP server, the skill falls back to codegraph explore or grep.

Can I limit code search to a specific module or directory?

Yes, pass the scope option with target directories or modules when calling codekb_search. You can also filter by knowledge types and set max_results to control output size.

What happens if the CodeKB server is unavailable?

The skill defines a fallback path: use codegraph explore for structural navigation, then rg or grep for lexical matching. Results will lack semantic ranking and fused scoring in that mode.