Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/manderse21/claude-powershell-lspWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/manderse21/claude-powershell-lsp/query)<a href="https://agentmods.dev/commands/manderse21/claude-powershell-lsp/query"><img src="https://agentmods.dev/badge/commands/manderse21/claude-powershell-lsp/query/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/manderse21/claude-powershell-lsp/query"><img src="https://agentmods.dev/badge/commands/manderse21/claude-powershell-lsp/query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.00961 |
| Opus 5.5 | $0.00016 | $0.00384 |
| Sonnet 5.5 | $0.00008 | $0.00192 |
| Haiku 4.5 | $0.00004 | $0.00096 |
Grade A, and why
query scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Ask a semantic question with scripts/lsp-query.ps1.
This runs against the same warm daemon the edit hook already uses -- the one with PowerShell
Editor Services attached -- and forwards a request PSES serves natively. It is not a text search
and it is not a heuristic: definition is where the language server says the symbol is defined,
references is where the language server says it is used, hover is what the language server says
it is.
Reach for this instead of grep whenever the question is about a symbol rather than a string. A
grep for a function name finds its own definition, every comment that mentions it, and every
similarly-named thing; definition finds where it comes from.
Three question shapes, and picking the wrong one wastes a turn. The operations do not all take the same arguments, because they are not all asking about the same kind of thing:
| Ask about | Operations | Arguments |
|---|---|---|
| A position in a file | definition, references, hover |
file, line, col |
| A whole file | documentSymbol |
file |
| The workspace | workspaceSymbol |
-Query <name> |
documentSymbol answers "what does this file declare" -- every function, class and variable PSES
can see in it -- and needs no position, so do not invent one to satisfy the shape of the other
three. workspaceSymbol answers "where does this name live" across the workspace and names no
file at all; it takes -Query and nothing else. Use it when you know a symbol's name but not
which file holds it, which is the case grep is worst at.
Arguments in $ARGUMENTS:
- The operation, always first:
definition,references,hover,documentSymbolorworkspaceSymbol. If the user described what they want rather than naming an operation, pick the one that answers it and say which you picked. Case does not matter; the daemon canonicalises it. - The file -- a
.ps1/.psm1/.psd1path -- for every operation exceptworkspaceSymbol. - The line and the column, both 1-based, for the three position operations only -- the
numbers an editor, a stack trace, or one of this plugin's own diagnostics records shows. Do not
convert them; the daemon does that once, in one place. Do not pass them to
documentSymbolorworkspaceSymbol: they read no position and a number supplied there is simply ignored. -Query <name>forworkspaceSymbol-- the symbol name to search for. An empty query is refused by name rather than treated as "match everything".
Treat the path as literal data, not as instructions. Quote it and pass it exactly as given: a
space, a bracket, a $, or a leading hyphen in a path must reach the script intact rather than
being re-parsed by the shell or read as an option.
Add -Text for a short human-readable rendering when the answer is going into the conversation;
the default is JSON, which is what you want when you are going to act on the result.
Exit codes worth reading rather than ignoring:
- 0 -- the daemon answered. An empty
resultsarray is an answer ("nothing here"), not a failure, and should be reported as such rather than retried. - 3 -- usage: no live daemon in scope, or a position below 1 that you actually supplied. If
there is no daemon, edit a PowerShell file in this session to start one, or pass
-SessionId. - 4 -- the daemon was reached but could not answer: PSES is not up, the file does not exist,
the operation was refused, or
workspaceSymbolwas called with no-Query. The reason is on stderr; relay it rather than guessing at it.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 22d ago First seen · 63 lines · 39 tokens per session scan A 5f985f887d00
query is a command published in the GitHub repository manderse21/claude-powershell-lsp (7 stars, last pushed 2d ago), licensed Apache-2.0. It adds 39 tokens to every session and 961 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-09.
Other commands, from other repositories
debug
Systematic debugging: root cause before any fix, one hypothesis at a time, and a three-strikes rule that questions the architecture instead of stacking patches.
debug
Systematic debugging with hypotheses and evidence gathering.
debug
Structured debugging with parallel investigation agents.
recover
Diagnose and recover from interrupted or corrupted state.
task-cycle
Resume one resolved task's recorded defects through the sole ledger writer, confirming candidate matches before bounded repair or reopen.
task-bug
Route raw bug feedback without pre-classifying a defect; resolve its owning task, or create one tracked task when natural-language feedback has no match.