antonbabenko/agent-plugins / plugins/code-intelligence/skills/code-intelligence
code-intelligence
VerifiedUse when navigating or refactoring code with a language server - choosing between semantic (LSP), exact-text (rg), and fuzzy/semantic search; anchoring LSP calls by position; gating degraded results; and disclosing tool substitutions, in any language.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.2 KB |
| references/degradation-and-disclosure.md | markdown | 2.5 KB |
| references/lsp-calls.md | markdown | 2.4 KB |
| references/tool-precedence.md | markdown | 2.6 KB |
references/lsp-calls.md
View on GitHub# LSP Calls
Generic mechanics for driving a language server. Operation names follow LSP:
`goToDefinition`, `findReferences`, `hover`, `documentSymbol`,
`workspaceSymbol`, `goToImplementation`, call hierarchy. Availability is
host-gated - the host decides whether an LSP tool is exposed at all.
## Position Anchoring
The server resolves by source position, not by symbol name.
- Call with `file:line:character` pointing at an occurrence of the symbol.
- Find that occurrence first with a text search (a known use or the
declaration), then issue the LSP call at that location.
- A bare-name call is unsupported; an empty result from one is a usage defect,
not degradation.
Example: to find callers of `parseConfig`, `rg -n 'parseConfig'` to get a
line, then `findReferences` at that line/column. Works the same whether the
language is Go, Python, or TypeScript.
## Cold Start And Retry
The first call after the server launches may return empty or partial while it
indexes the workspace.
- Retry the same call once after a short pause before drawing any conclusion.
- A still-empty result after retry feeds the degradation gate; it is not
immediate proof the server is broken.
## Unsupported Operations
Not every server implements every operation. `goToImplementation`, call
hierarchy (`prepareCallHierarchy` / `incomingCalls` / `outgoingCalls`), and
rename are commonly absent.
- DO check advertised capabilities first. When the server supports `rename` /
`prepareRename` or call hierarchy, use it - it carries language semantics a
manual pass misses.
- DON'T call an unsupported operation and report its absence as a finding.
- DO redirect only when the operation is genuinely unsupported: `findReferences`
(filtered to call sites) instead of call hierarchy; enumerate references then
edit by hand instead of a rename provider.
- DON'T guess support - confirm via advertised capabilities or a language skill
that documents them.
## Reading Results
LSP returns locations and symbols, not source lines.
- After `goToDefinition` / `findReferences`, Read each returned location to see
and act on the actual code.
- For multi-edit changes in one file, Read that file again immediately before
each edit - earlier edits shift line/character offsets and a stale view
produces corrupted edits.
- `documentSymbol` returns a structural outline; use it as a liveness probe
and to navigate, not as a reference set.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |