Observed in: Claude Code internal architecture
A lightweight side-query that explains what a tool/command does, why it's being run, and its risk level before the user approves it. Uses structured tool output for guaranteed JSON responses.
Analyze shell commands and explain what they do, why you're running them, and potential risks.
explain_command){
"explanation": "What this command does (1-2 sentences)",
"reasoning": "Why YOU are running this command. Start with 'I' - e.g. 'I need to check the file contents'",
"risk": "What could go wrong, under 15 words",
"riskLevel": "LOW | MEDIUM | HIGH"
}
| Level | Description | Example |
|---|---|---|
LOW |
Safe dev workflows | ls, cat, git status |
MEDIUM |
Recoverable changes | File edits, npm install |
HIGH |
Dangerous/irreversible | rm -rf, DROP TABLE, force push |
permissionExplainerEnabled: false