Check a shell command before running it
check_commandStatically scans one shell, Bash, or PowerShell command or short script for malware-installer patterns and download-and-execute risks before it runs, returning a verdict and flagged findings.
Instructions
Statically scans one shell, bash or PowerShell command (or a short script) for malware-installer patterns before anyone runs it. Use it whenever an agent is about to run a command copied from a README, issue, gist, website, chat or AI answer, and for one-liners like curl | sh or iwr | iex. It flags download-and-execute (curl/wget piped to a shell, iwr/irm piped to iex) from unknown hosts, encoded or obfuscated PowerShell, Windows LOLBins (mshta, certutil, rundll32...), commands that disable antivirus or Defender, and known malware domains. Well-known installers (rustup, Foundry, Anza and similar) are reported as info only. Offline: nothing is sent anywhere and the command is never executed. Returns verdict: no_red_flags (nothing matched; not proof of safety), review_before_running (at least one warning: read the flagged lines first) or dangerous (download-and-execute, encoded payloads, known malware hosts and similar: do not run), plus findings (level, code, message, line, evidence). For a whole cloned folder use check_local_repo. For a GitHub repo that is not cloned yet use check_repo.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cmd": "<cmd>"
},
"name": "check_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmd | Yes | The exact command or script text you plan to run, unmodified (1-20000 characters). Multi-line input is fine; each line is checked. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| advice | Yes | ||
| verdict | Yes | ||
| findings | Yes |