doctor

doctor is a command for coding agents from manderse21/claude-powershell-lsp. It costs 30 tokens per session (531 once invoked), scanned A, original, Apache-2.0.

A report-only health check for the PowerShell language server diagnostics plugin, which provides code analysis for PowerShell. It runs predefined checks and reports their status.

In plain words
What is it for?
Use it to inspect the plugin’s preflight status and, when requested, run the optional native-server probe.
Why use it?
It shows whether the diagnostics setup is healthy without downloading, repairing, or starting or stopping services automatically.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the powershell-lsp plugin — 3 commands shipped together

Install

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.

agentmods
npx agentmods add commands/manderse21/claude-powershell-lsp/doctor
Clone the repo
git clone --depth 1 https://github.com/manderse21/claude-powershell-lsp

Or install powershell-lsp, the plugin that ships this one along with the rest of its 3 commands.

Wrote 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.

agentmods badge for doctor

README.md
[![agentmods](https://agentmods.dev/badge/commands/manderse21/claude-powershell-lsp/doctor.svg)](https://agentmods.dev/commands/manderse21/claude-powershell-lsp/doctor)
Your own site
<a href="https://agentmods.dev/commands/manderse21/claude-powershell-lsp/doctor"><img src="https://agentmods.dev/badge/commands/manderse21/claude-powershell-lsp/doctor.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 531 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.00531
Opus 5 $0.00015 $0.00266
Sonnet 5 $0.00006 $0.00106
Haiku 4.5 $0.00003 $0.00053

Measured 4d ago against content hash 8374b1477a68, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

doctor 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 4d 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.

commands/doctor.md · 43 lines

What it actually says

Run the powershell-lsp preflight doctor and report what it found.

The doctor is report-only: it never downloads, repairs, runs the bootstrap, or starts, restarts, or stops anything. Run it exactly as given below and do not "fix" anything on the user's behalf without asking first.

If $ARGUMENTS contains --probe-native-serve, append -ProbeNativeServe to the command. That adds the opt-in native-serve removability probe, which costs a PSES cold start plus a bounded init wait -- so only add it when asked.

pwsh -NoLogo -NoProfile -File "$env:CLAUDE_PLUGIN_ROOT/scripts/doctor.ps1"

Then summarize for the user:

  • The report opens with a version: header line above the check table. It is always present, even when every check is UNKNOWN, and it is not a check -- it carries no status and is not in the counts. Include it whenever the user is reporting a problem or asking for support.
  • Lead with the summary line's counts.
  • If any check is FAIL, quote its component, its detail, and its fix: line. A FAIL is the only thing that sets a non-zero exit code.
  • If any check is UNKNOWN, say plainly that it could not be determined and why -- an UNKNOWN is never a failure, and the most common cause is running outside an enabled Claude Code session, so the plugin data directory is not visible.
  • If everything passes, say so in one line rather than restating all of it.

Two checks are worth calling out when they are not PASS, because they answer questions the others structurally cannot:

  • Test diagnostic observed end-to-end -- the only check that proves diagnostics are actually being produced rather than merely installed. A FAIL here means an edit would read as "analyzed, clean" when nothing was analyzed.
  • Active ruleset surface -- which rules are really applied here, and which config layer won. This is what explains "I set ruleset = base and still see nothing new" (usually a repo-local PSScriptAnalyzerSettings.psd1 legitimately winning).
Changes

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.

  1. 4d ago First seen · 43 lines · 30 tokens per session scan A 8374b1477a68

Subscribe to this mod's changes

doctor is a command published in the GitHub repository manderse21/claude-powershell-lsp (7 stars, last pushed 3d ago), licensed Apache-2.0. It adds 30 tokens to every session and 531 once invoked, about $0.0002 per session on Opus 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-08-31.