From code-intelligence
Use when navigating or refactoring code — choosing between LSP, rg, or semantic search tools; an LSP call returns empty and you need to know if it failed; or a tool substitution needs disclosure.
How this skill is triggered — by the user, by Claude, or both
Slash command
/code-intelligence:code-intelligenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Pick the search tool by task, not by habit. Generic and language-agnostic —
Pick the search tool by task, not by habit. Generic and language-agnostic — domain skills may extend it with server capability matrices and ecosystem prerequisites. This is model-triggered guidance, not enforcement.
rg, grep, or semantic search for a specific taskrg directlyast-grep skillcontext-map skillRequired before querying
Helpful if present
| Situation | Use this skill? | Route instead |
|---|---|---|
| Navigating to a symbol definition or finding all references | Yes | — |
| Counting occurrences of an exact string | No | rg directly |
| Syntax-aware structural search or codemod | No | ast-grep |
| Mapping all files and tests before a broad edit | No | context-map |
| Terraform-specific LSP (terraform-ls) capability matrix | Partial | Defer ecosystem-specific setup to infrastructure skills |
| Goal | Use | Tradeoff |
|---|---|---|
| Symbol relationships (definition, references, call sites, rename safety) | Language server (LSP) at a file:line:character position | Needs a running server + indexed workspace |
| Exact text, known name, exhaustive enumeration, config/value files | rg then Read | No semantic scope; matches strings in comments too |
| Conceptual / fuzzy / "where might this live" / cross-repo discovery | Semantic/neural search tool (if the host provides one) | Not exact; never use for counts or completeness claims |
Detail: references/tool-precedence.md
file:line:character). Anchor the position with a text search first.rename/prepareRename for renames; call hierarchy for callers.Detail: references/lsp-calls.md
Two cases before declaring LSP unavailable:
documentSymbol on an in-scope file returns symbols → server is responsiveOnly after all three pass is a disclosed text fallback warranted.
Detail: references/degradation-and-disclosure.md
State any tool substitution or omission on the first line of the response:
Intended: <tool>. Actual: <tool>. Reason: <why>. Impact: <completeness/confidence>.
Before claiming a tool is shimmed, aliased, or absent, prove it:
type -a <tool>, ls -l <resolved-path>, <tool> --version. An unproven claim followed by a fallback is a verification failure, not a sanctioned substitution.
Detail: references/degradation-and-disclosure.md
Should trigger this skill:
parseConfig in the Go codebase"UserSession everywhere it's used safely"Should NOT trigger this skill:
TODO appears in this repo" → rg 'TODO' | wc -lglob / findcontext-mapApply the three-tier tool-selection discipline and degradation gate in practice.
Task: "Find all callers of validateToken in the TypeScript service"
rg -n 'validateToken' → get a line/column position (e.g. src/auth.ts:42:10)incomingCalls at src/auth.ts:42:10Task: LSP findReferences at a known position returns []
documentSymbol on any .ts file → receives a symbol list → server is responsive ✓file:line:character (not a bare name) ✓Intended: findReferences (LSP). Actual: rg. Reason: position-anchored LSP call returned empty on responsive server after retry. Impact: text matches only, may include comments and strings.| PROVENANCE.md | Skill provenance, changelog, and authorship |
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub matt-riley/lucky-hat --plugin code-intelligence