code-discovery

Rank code symbols from natural language queries and generate symbol_index.json.

2|1|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/idealley/code-as-skills --skill code-discovery-idealley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-discovery
Source: https://github.com/idealley/code-as-skills/tree/main/skills/code-discovery
Command: npx skills add https://github.com/idealley/code-as-skills --skill code-discovery-idealley

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Discover and map natural-language goals to concrete code symbols by locating, ranking, and routing to relevant exported symbols across a repository.

Core Features & Use Cases

  • Symbol discovery: map NL queries to exported repository symbols.
  • Deterministic ranking and routing: provide consistent scores and easy integration with tooling.
  • Use Case: ask for "functions related to data fetch" and receive a ranked list with file paths and signatures.

Quick Start

Use the code-discovery skill to generate manifests and the symbol index for a project.

Frequently Asked Questions about code-discovery

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

FAQPage Schema
How do I map natural language queries to code symbols in a large codebase?

You can map natural language queries to code symbols by using static analysis to generate a symbol_index.json manifest. This ranks exported symbols against user goals, providing file paths and signatures for large codebases.

What is deterministic symbol ranking for code discovery?

Deterministic symbol ranking assigns consistent scores to code symbols matched from natural language queries, ensuring identical search results every time. It simplifies tooling integration by providing predictable symbol discovery and routing.

How do I generate a symbol index for a repository?

You generate a symbol index by running static analysis over a repository to extract and rank exported symbols. This creates a symbol_index.json manifest containing file paths and signatures for subsequent natural language query routing.

Can I retrieve dependency graphs for specific code symbols?

Yes, you can retrieve dependency graphs for specific symbols using the depGraph function. It analyzes a given symbol and returns its dependency relationships, helping you map connections within the codebase structure.

Does code discovery work with large codebases?

Yes, code discovery is specifically designed for large codebases. It uses static analysis to map natural language goals to concrete exported symbols, generating a symbol index that scales for extensive repositories and consistent tooling integration.

What are the limitations of natural language to code symbol mapping?

A limitation of natural language to code symbol mapping is its reliance on static analysis, meaning it only targets exported symbols and cannot capture dynamic runtime behaviors. It generates deterministic manifests rather than executing code paths.