code-intelligence

Select LSP, rg, or semantic search for code analysis tasks.

1|1|Updated May 3, 2026
One-click install
npx skills add https://github.com/matt-riley/agent-skills --skill code-intelligence-matt-riley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-intelligence
Source: https://github.com/matt-riley/agent-skills/tree/main/skills/code-intelligence
Command: npx skills add https://github.com/matt-riley/agent-skills --skill code-intelligence-matt-riley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Pick the appropriate code analysis tool (LSP, rg, or semantic search) for a given coding task to improve accuracy and reduce wasted effort.

Core Features & Use Cases

  • Guides tool selection by task and language-server availability across languages.
  • Encapsulates a degradation gate flow to fall back to text search when LSP is degraded or unavailable.
  • Provides clear routing boundaries and reference materials to support safe, deterministic workflows.

Quick Start

Identify a code task and select the recommended tool (LSP, rg, or semantic search); if LSP appears unreliable, follow the degradation gate and disclose fallback details.

Frequently Asked Questions about code-intelligence

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

FAQPage Schema
What's the best way to find symbol references when LSP returns empty results?

When LSP returns empty reference results, apply a degradation gate to fall back to text search tools like rg or semantic search. Disclose that LSP results were unreliable so the fallback routing remains transparent and deterministic across languages.

How do I choose between LSP and ripgrep for codebase symbol navigation?

Choose between LSP and ripgrep for symbol navigation by checking language-server availability. Use LSP for semantic accuracy when available, and route to ripgrep text search when the LSP server is degraded or entirely unavailable to maintain workflow efficiency.

When do I need semantic search for code intelligence tasks?

You need semantic search for code intelligence tasks when LSP is unavailable or returns unreliable results and standard text search lacks the context to gather accurate references. It serves as a structured fallback within the degradation gate.

Does this code intelligence routing work across all programming languages?

Yes, code intelligence routing works across all programming languages by dynamically matching the task with the correct analysis tool. It adapts based on whether a language server is available, falling back to rg or semantic search when LSP support is absent.

Why does LSP fail to gather references and how do I handle the fallback?

LSP fails to gather references when the language server is degraded or lacks full project indexing. Handle the fallback by triggering the degradation gate to route to rg or semantic search, and disclose the fallback details to ensure workflow transparency.

Do I need an LSP server installed to use code intelligence tool routing?

An LSP server is required for primary semantic analysis, but the routing workflow explicitly handles environments where it is missing. If LSP is unavailable, the degradation gate automatically routes codebase discovery tasks to text search or semantic search alternatives.