codegraph-skill-router

Routes code exploration tasks between CodeGraph index queries and ordinary repository search.

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/Yjj0333/skills-manager-backup --skill codegraph-skill-router-yjj0333
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codegraph-skill-router
Source: https://github.com/Yjj0333/skills-manager-backup/tree/main/codegraph-skill-router
Command: npx skills add https://github.com/Yjj0333/skills-manager-backup --skill codegraph-skill-router-yjj0333

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When working in a codebase, it is often unclear whether to query an existing CodeGraph index or fall back to plain text search with rg and file reads. This Skill provides a fast routing gate that decides which approach fits each request, avoiding wasted indexing work and noisy searches. ## Core Features & Use Cases - Index-First Routing: Checks whether CodeGraph MCP tools are visible and the project is indexed, then prefers indexed queries for symbols, callers, callees, imports, architecture, and impact analysis. - Fallback Rules: Routes to ordinary rg-based search when CodeGraph is unavailable, uninitialized, slow, or when the task is exact non-symbol text or a named-file edit. - Bilingual Trigger Support: Handles both English and Chinese requests such as 追调用链, 查引用, and 影响范围分析. - Use Case: A developer asks "who calls this function?" — the router announces Route: codegraph-aware and uses the callers tool; for "find this exact string", it routes to ordinary search instead. ## Quick Start Ask the assistant whether to use CodeGraph or ordinary search for tracing callers of a function in the current repository.

Frequently Asked Questions about codegraph-skill-router

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

FAQPage Schema
When should I use CodeGraph instead of rg for code search?▼

Use CodeGraph when an index exists and the task involves symbols, callers, callees, imports, architecture, or impact analysis. Use rg for exact non-symbol text, named-file reads or edits, and when CodeGraph is unavailable or uninitialized.

How do I trace callers and callees of a function across files?▼

If CodeGraph MCP tools are visible and the project is indexed, use the callers, callees, or trace tools for cross-file call relationships. Otherwise fall back to rg searches for definitions and references, then read the connecting files.

Does this router index or re-index my repository automatically?▼

No. It never performs indexing or re-indexing unless you explicitly ask. When you do request it, it uses a visible indexing MCP tool or the local codegraph CLI, then verifies with codegraph_status.

What happens if a CodeGraph call times out or errors?▼

The router stops using CodeGraph for that turn, briefly mentions the fallback, and continues with ordinary rg searches and file reads so the task still completes.

Can I use this routing skill with Chinese-language requests?▼

Yes. Chinese requests are first-class, including phrases like 追调用链, 查引用, 跨文件理解, and 影响范围分析, which route to CodeGraph-aware exploration when an index is available.