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.
npx agentmods add commands/mitulgarg/env-doctor/checkgit clone --depth 1 https://github.com/mitulgarg/env-doctorWrote 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/mitulgarg/env-doctor/check)<a href="https://agentmods.dev/commands/mitulgarg/env-doctor/check"><img src="https://agentmods.dev/badge/commands/mitulgarg/env-doctor/check.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.01748 |
| Opus 5 | $0.00000 | $0.00874 |
| Sonnet 5 | $0.00000 | $0.00350 |
| Haiku 4.5 | $0.00000 | $0.00175 |
Grade B, and why
check scanned grade B with 1 finding 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
→ Run: sudo apt remove --purge nvidia-* How it starts
The opening of the file, as written. The whole thing — 230 lines — stays where its author put it; the contents beside it link to each section on GitHub.
check
Diagnose your environment for GPU/CUDA compatibility issues.
Usage
env-doctor check
What It Checks
Environment Detection
- Native Linux: Standard Linux environment
- WSL1: Detects WSL1 and warns that CUDA is not supported
- WSL2: Full GPU forwarding validation
GPU Driver
- Driver version detection via NVML
- Maximum supported CUDA version
- Driver health status
System CUDA Toolkit
- Installation path and version
- Multiple installation detection
- PATH and environment configuration
Python Libraries
- PyTorch, TensorFlow, JAX detection
- CUDA version each library was compiled for
- Compatibility with your driver
GPU Compute Capability
Checks whether the installed PyTorch wheel includes compiled kernels for your GPU's SM architecture. This catches a silent failure mode common with new GPU generations: everything looks healthy (nvidia-smi, nvcc, driver all pass) but CUDA may not work correctly because the stable PyTorch wheel doesn't include kernels for the new architecture.
env-doctor probes torch.cuda.is_available() at runtime and distinguishes two failure modes:
- Hard failure —
is_available()returnsFalse. The GPU cannot be used at all. - Soft failure —
is_available()returnsTruevia NVIDIA's driver-level PTX JIT, but complex CUDA ops may silently degrade or fail.
Other behaviours:
- Reads GPU compute capability from the driver (e.g.
12.0for Blackwell RTX 5070) - Reads the compiled SM list from
torch.cuda.get_arch_list() - Handles PTX forward compatibility —
compute_90in the arch list covers newer SMs via JIT compilation - On mismatch, prints the exact nightly install command to fix it
Library Conflicts
Detects "Frankenstein" environments where:
- PyTorch is built for CUDA 12.4 but driver only supports 11.8
- Multiple libraries compiled for different CUDA versions
- System toolkit doesn't match library requirements
Example Output
🩺 ENV-DOCTOR DIAGNOSIS
============================================================
🖥️ Environment: WSL2 (GPU forwarding enabled)
🎮 GPU Driver
✅ NVIDIA Driver: 535.146.02
└─ Max CUDA: 12.2
🔧 CUDA Toolkit
✅ System CUDA: 12.1.1
└─ Path: /usr/local/cuda-12.1
📦 Python Libraries
✅ torch 2.1.0+cu121
└─ CUDA 12.1 ✓ (compatible with driver)
✅ All checks passed!
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.
- 4d ago First seen · 230 lines · 0 tokens per session scan B 50127dfe9d72
check is a command published in the GitHub repository mitulgarg/env-doctor (172 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,748 tokens. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
observe
部屋を能動的に観察する。3つの基本ブロックを自由に選びながらループし、受動的なスナップショットではなく発見のある観察を行う。.
eol-report
EOL/EOS risk report — devices, OS versions, and firmware approaching or past end-of-life/end-of-support, prioritized by criticality.
gum-search
BM25 search the embedded catalog (TTY table, pipe JSON).
rvcsi-calibrate
Learn a v0 per-subcarrier baseline (mean amplitude) from a .rvcsi capture.
hw-check
Load Cursor Skill .cursor/skills/hw-check.md, then execute canonical command /hw:check with any user-provided arguments.
iot
This API allows you to manage your IoT hubs and devices.