원클릭으로
analyze-overrides
Analyze commander-keen overrides and voter log to suggest safe_commands and safe_multi_commands promotions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze commander-keen overrides and voter log to suggest safe_commands and safe_multi_commands promotions.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Drive and inspect a live Chrome browser via the chrome-devtools CLI (chrome-devtools-mcp) to navigate pages, click/fill/type, take screenshots and snapshots, read console and network, and run performance/Lighthouse audits. Use when the user asks to test, use, drive, or automate a browser; check how a page looks or behaves; debug a live site; capture a screenshot; or inspect console/network/performance.
Enqueue and monitor a pull request until it merges, including merge-queue failures. Use when the user asks to get a PR merged, re-enqueue a PR, babysit Graphite or Merge Garden, or run a merge loop.
Autonomous iteration loop inspired by Andrej Karpathy's autoresearch. Modify a file, evaluate, keep or revert, repeat forever. Use for any optimization task with a measurable metric — skills, prompts, configs, ML training, code. Use when the user mentions "autoresearch", wants to run autonomous experiments, wants to iterate on something overnight, says "optimize this", "run experiments on this", or wants to leave Claude running while they sleep. Also use when improving skills, prompts, or agents iteratively.
Tufte-informed information design for shared documentation. Use when: (1) writing docs, reports, proposals, or READMEs, (2) creating tables, charts, or diagrams, (3) formatting any content for an audience. Principle: maximize density, minimize noise.
Write or tighten a pull request description for high-context reviewers. Use when drafting a PR body, editing/shrinking a PR description, reviewing your own PR before pushing, or whenever the user says "write the PR description", "tighten this PR", "shorten the PR body", "review my PR description", or pastes a draft and asks for feedback.
Facilitate strategic connections between people, ideas, or projects. Use for introductions, collaboration suggestions, partnership ideas, identifying synergies, or crafting connection-making messages.
| name | analyze-overrides |
| description | Analyze commander-keen overrides and voter log to suggest safe_commands and safe_multi_commands promotions. |
You are analyzing the user's commander-keen override history and voter log to find commands that have been approved often enough to promote into the permanent safe list.
Commander-keen has three data sources that capture commands not on the safelist:
Overrides (overrides.json): Compound commands (using &&, ||, ;) that the user manually approved. These are learned as normalized patterns for future auto-approval. Only compound commands are eligible for override learning.
Voter log (votes.log): All commands (simple and compound) that went through the LLM voter panel. Each entry records whether voters unanimously approved ("allow") or escalated to the user ("ask").
Approval log (approvals.json): Every executed non-compound command that wasn't fully covered by the safelist. Compound commands are handled by overrides instead. Written by PostToolUse, which only fires for commands that were approved and executed. Patterns are normalized on write and deduplicated with counts, matching the same JSON format as overrides.json.
By cross-referencing the voter log and approval log, we can determine how a command was approved:
approvals.json + votes.log with "allow" = voter auto-approvedapprovals.json + votes.log with "ask" = user approved (voter escalated, user said yes)approvals.json + no votes.log entry = approved via override matchAll three data sources should be analyzed together to produce a unified set of promotion suggestions.
Read these four files:
~/.claude/hooks/commander-keen/overrides.json (override history)~/.claude/hooks/commander-keen/config.json (current safe list)~/.claude/hooks/commander-keen/votes.log (voter log, JSONL format)~/.claude/hooks/commander-keen/approvals.json (approval log, JSON format)If the config file does not exist, treat safe_commands as [] and safe_multi_commands as {}.
If all data files (overrides, votes.log, approvals.json) are missing or empty, tell the user there is no data to analyze yet and stop. Proceed with whichever files are available.
Overrides file (overrides.json):
{
"version": 1,
"patterns": [
{
"pattern": "git status",
"first_approved": "2026-03-01T12:00:00Z",
"last_seen": "2026-03-15T09:30:00Z",
"count": 47
}
]
}
Each pattern field contains a normalized command string. Normalization strips arguments but keeps structure:
"git status" means git status <anything>"cd && git show | grep" means cd <path> && git show <ref> | grep <pattern>"npm" means any npm invocation (subcommands are stripped during normalization when the base command is not in safe_multi_commands, so this could represent npm install, npm run test, etc.)Config file (config.json):
{
"safe_commands": ["cat", "ls", "echo"],
"safe_multi_commands": {
"git": ["status", "log", "diff"],
"docker": "*"
},
"dangerous_commands": ["rm", "sudo", "curl"],
"dangerous_multi_commands": {
"git": ["push", "reset"]
}
}
safe_commands: single-word commands that are always allowedsafe_multi_commands: commands with subcommands. The value is either "*" (all subcommands) or an array of allowed subcommands.dangerous_commands: commands that should never be promoted (e.g., rm, sudo, curl)dangerous_multi_commands: dangerous base+subcommand pairs (e.g., git push)Voter log (votes.log, JSONL, one JSON object per line):
{"timestamp":"2026-03-15T09:35:08Z","command":"go test ./...","result":"allow","reason":"Unanimous YES from 3 voters"}
{"timestamp":"2026-03-15T09:36:07Z","command":"rm -f foo","result":"ask","reason":"Unanimous NO from 3 voters: ..."}
result: "allow": voters unanimously approved, command was auto-executedresult: "ask": voters said no or split, command was escalated to the userApproval log (approvals.json):
{
"version": 1,
"patterns": [
{
"pattern": "go test",
"first_approved": "2026-03-15T09:35:08Z",
"last_seen": "2026-03-18T10:00:00Z",
"count": 47
},
{
"pattern": "unzip",
"first_approved": "2026-03-15T09:36:07Z",
"last_seen": "2026-03-15T09:36:07Z",
"count": 1
}
]
}
Same structure as overrides.json. Patterns are normalized on write using verbose normalization (preserves subcommands). Each pattern is deduplicated with a count. PostToolUse only fires for commands that were approved and executed, so every entry is a confirmed approval.
For each pattern in the overrides file:
&&, ||, ;) to get segments| (pipe) to get pipeline stages-)Examples:
"git status" -> base: git, subcommand: status"cd && git show | grep" -> three stages: (cd), (git, show), (grep)"npm" -> base: npm, no subcommand"docker compose" -> base: docker, subcommand: compose (represents docker compose <anything>)For each extracted command, record:
overridescount fieldfirst_approvedlast_seenParse votes.log into a lookup structure keyed by command string. For each entry, store result ("allow" or "ask") and reason. If a command appears multiple times, keep all entries (the same command can be voted on multiple times across sessions).
Read approvals.json and parse it as a JSON object with version and patterns fields (same structure as overrides.json). For each pattern entry:
pattern field is already a normalized command string (same format as override patterns)&&, ||, ;) to get segments| (pipe) to get pipeline stages-)For each approval log entry, look up the command in the voter log index to determine how it was approved:
votes.log entry exists for this command with result: "allow"votes.log entry exists for this command with result: "ask" (the voter escalated, but the command still executed, so the user must have said yes)votes.log entry exists (the command was approved by an override match, not the voter panel)For each extracted command, record:
approvalsvoter_approved, user_approved, or override_approvedcount fieldfirst_approvedlast_seenImportant parsing notes:
"go test" means go test <anything>, "cd && go build" means cd <path> && go build <anything>. Subcommands are already extracted during normalization.Remove any command that is already covered by the current config:
safe_commands, skip itsafe_multi_commands with "*", skip itsafe_multi_commands as a listed subcommand, skip itAlso remove commands that are dangerous and should never be promoted:
dangerous_commands, skip itdangerous_multi_commands, skip itGroup all remaining commands by base command, combining data from overrides and approval log. For each group, compute:
count across override patterns containing this command (0 if only in approval log)voter_approveduser_approvedoverrides, approval_log, or both)For each base command group:
safe_commands candidate: The command only ever appears as a bare word with no subcommand (e.g., "go", "make", "unzip")safe_multi_commands candidate: The command appears with specific subcommands (e.g., git status, git log). List the specific subcommands to allow. If the command already has some subcommands in the config, suggest adding the new ones.safe_multi_commands with "*" candidate: The command has 5+ distinct subcommands, suggesting it may be safe to allow all subcommands.Produce a markdown report with three sections:
1. Summary
State:
2. Promotion Candidates (3+ total evidence, ranked by total evidence descending)
For each candidate, output a block like:
### `go` -> safe_commands
- **Evidence**: 45 total (38 voter approved, 7 user approved, 0 override approvals)
- **Source**: approval log only
- **First seen**: 2026-01-15
- **Last seen**: 2026-03-15
Config change: add `"go"` to the `safe_commands` array.
Or for a multi-command candidate:
### `git` -> safe_multi_commands
- **Evidence**: 42 total (30 override approvals across 5 patterns, 8 voter approved, 4 user approved)
- **Subcommands to add**: `show`, `branch`
- **Source**: overrides + approval log
- **First seen**: 2026-01-15
- **Last seen**: 2026-03-15
Config change:
```json
{
"git": ["status", "log", "diff", "show", "branch"]
}
```
If a command already exists in safe_multi_commands with some subcommands, show the merged list (existing + new).
3. Too Early to Tell (fewer than 3 total evidence)
A simple table:
| Command | Source | Voter Approved | User Approved | Override Approvals | First Seen |
|---|
After the report, ask the user:
Would you like me to apply these changes to
~/.claude/hooks/commander-keen/config.json? I can apply all suggestions, or you can tell me which specific commands to promote.
If the user says yes (all or specific), read the current config file, merge the changes, and write it back with json.MarshalIndent style formatting (2-space indent). Preserve any existing entries.