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…
Skill by matt-riley
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/matt-riley-code-intelligence
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-intelligence
What's inside
- Skill name
code-intelligence- Description
- 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.
- License
- GPL-3.0
- Metadata
- kind: reference · version: 1.1.1 · audience: general-coding-agent · category: workflow · maturity: draft
- Instructions
- 158 lines in SKILL.md · view on GitHub
Files (8)
- PROVENANCE.md
- SKILL.md
- openai.yaml · agents/
- evals.json · evals/
- trigger-queries.json · evals/
- degradation-and-disclosure.md · references/
- lsp-calls.md · references/
- tool-precedence.md · references/
SKILL.md (first lines)
# Code Intelligence 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. ## Use this skill when - Navigating code: finding definitions, references, callers, or rename impact - Choosing between LSP, `rg`, `grep`, or semantic search for a specific task - An LSP call returns empty and you are unsure whether it represents failure or a degraded workspace - A tool substitution or omission needs to be disclosed to the reader - Verifying a tool is genuinely missing before falling back ## Do not use this skill when - The task is pure text search for a known literal with no symbol-scope concern — use `rg` directly - You are building a structural rewrite or codemod — use the `ast-grep` skill - You need a pre-edit map of all files involved in a change — use the `context-map` skill ## Inputs to gather **Required before querying** - The symbol, file, or workspace to investigate. - The LSP language (TypeScript, Go, Lua, Terraform, or YAML). **Helpful if present** - Whether a language server is available for the target file type. ## First move 1. Check that an LSP server is available for the target language. 2. Prefer LSP operations (goToDefinition, findReferences) over grep when available. 3. Fall back to grep/glob when no language server supports the file type. ## Routing boundary | 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 | ## Tool Precedence | 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](references/tool-precedence.md#precedence-table) ## Calling the LSP - **DO** call at a position (`file:line:character`). Anchor the position with a text search first. - **DON'T** pass a bare symbol name and expect resolution — empty result = usage defect, not server failure. - **DO** Read the returned locations for source text; LSP returns positions, not lines. - **DO** retry once on cold start (server may be indexing). - **DO** prefer the server's own `rename`/`prepareRename` for renames; call hierarchy for callers. - **DON'T** report an unsupported operation as a finding — redirect instead. Detail: [references/lsp-calls.md](references/lsp-calls.md#position-anchoring) ## Degradation Gate Two cases before declaring LSP unavailable: - **No LSP at all** (no tool exposed, server won't start) → genuine unavailability. Disclose on line 1 and use text search. Gate does not apply. - **LSP callable but position-anchored call returns empty** → run all three checks before falling back: 1. `documentSymbol` on an in-scope file returns symbols → server is responsive 2. The failing call was position-anchored, not symbol-name-only 3. That anchored call still returned empty after a cold-start retry Only after all three pass is a disclosed text fallback warranted. Detail: [references/degradation-and-disclosure.md](references/degradation-and-disclosure.md#degradation-gate) ## Disclose Substitutions State any tool substitution or omission on the **first line** of the response: ``` Intended: <tool>. Actual: <tool>. Reason: <why>. Impact: <completeness/confidence>. ``` ## Do Not Invent a Missing Tool 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](references/degradation-and-disclosure.md#anti-phantom-shim-proof) ## Workflow 1. Identify the language and whether an LSP server is available for the target files. 2. Prefer LSP: go-to-definition, find-references, hover, rename, diagnostics. 3. If LSP returns empty or unsupported, disclose the fallback and switch to `rg`/glob with a tighter scope. 4. For semantic "what does this do" questions without a stable symbol, use semantic search after LSP/grep miss. 5. Never invent symbols, call graphs, or unused-status claims without tool evidence. 6. When refactoring, confirm references via LSP before mass edits; re-run diagnostics after. 7. Summarize which tool answered each claim so the user can trust the navigation trail. ## Guardrails - **Must not** invent symbol definitions or call relationships not found by a tool. - **Should** prefer code intelligence tools over text search for semantic queries. - **Should** disclose when falling back from LSP to grep/glob and why. - **Should** not claim a symbol is unused unless a language server confirms no references. ## Validation **Should trigger this skill:** - "Find all callers of `parseConfig` in the Go codebase" - "Rename `UserSession` everywhere it's used safely"
From matt-riley/agent-skills, GPL-3.0.
More from matt-riley/agent-skills
- 0.614score
agent-governance
matt-riley
Use this skill when building AI agents that call external tools, implementing policy-based access controls, adding semantic intent classification, creating…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-instructions
matt-riley
Use when creating or updating agent instruction files (AGENTS.md for Pi, copilot-instructions.md for Copilot, per-path guides, or AGENTS.md router) —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-supply-chain
matt-riley
Use this skill when generating SHA-256 integrity manifests for agent plugins, verifying that installed plugins match their manifests, detecting tampered…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agentic-eval
matt-riley
Use when designing or implementing an evaluation loop for AI agent outputs — reflection loops, evaluator-optimizer pipelines, LLM-as-judge scoring, or…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
api-smoke-validation
matt-riley
Use when running quick, repeatable API smoke tests after changes with hurl, including auth, status-code, response-shape, endpoint sanity, and pre-integration…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
aws-sdk-v2-to-v3-migration
matt-riley
Use when the codebase still imports from 'aws-sdk' v2, uses new AWS.*() constructors, .promise() calls, AWS.config.update(), DocumentClient, or s3.upload() —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
circleci-to-github-actions-migration
matt-riley
Use when a repository still depends on .circleci/config.yml jobs, workflows, or artifacts that need to be replaced or phased out with GitHub Actions —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
mocha-to-jest-migration
matt-riley
Use when a JavaScript or TypeScript suite still depends on Mocha, Chai, or Sinon and needs an incremental Jest migration.
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
project-references-migration
matt-riley
Use when a layered TypeScript workspace needs an incremental project-references migration without breaking package boundaries or editor resolution.
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
ast-grep
matt-riley
Use when you need ast-grep structural search, linting, or safe codemod rewrites, especially for requests that mention ast-grep, sg, codemod, rule files, or…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
ci-images
matt-riley
Validate CI checks locally and manage Docker image publishing workflows.
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
code-generation
matt-riley
Run and troubleshoot repository code generation after detecting the generator contract.
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Sep 24, 2026 (1 month ago)
- Last release
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.1.1
- License
- GPL-3.0
- Repository
- github.com/matt-riley/agent-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from matt-riley
- 0.614score
agent-instructions
matt-riley
Use when creating or updating agent instruction files (AGENTS.md for Pi, copilot-instructions.md for Copilot, per-path guides, or AGENTS.md router) —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-supply-chain
matt-riley
Use this skill when generating SHA-256 integrity manifests for agent plugins, verifying that installed plugins match their manifests, detecting tampered…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agentic-eval
matt-riley
Use when designing or implementing an evaluation loop for AI agent outputs — reflection loops, evaluator-optimizer pipelines, LLM-as-judge scoring, or…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
api-smoke-validation
matt-riley
Use when running quick, repeatable API smoke tests after changes with hurl, including auth, status-code, response-shape, endpoint sanity, and pre-integration…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
aws-sdk-v2-to-v3-migration
matt-riley
Use when the codebase still imports from 'aws-sdk' v2, uses new AWS.*() constructors, .promise() calls, AWS.config.update(), DocumentClient, or s3.upload() —…
SkillAFreshness: A★ 4Claude Code +9 - 0.614score
agent-governance
matt-riley
Use this skill when building AI agents that call external tools, implementing policy-based access controls, adding semantic intent classification, creating…
SkillAFreshness: A★ 4Claude Code +9
Cite this page
code-intelligence skill. Agent Mart. https://agentmart.dev/skills/matt-riley-code-intelligence (last updated 2026-10-24)