~ / rigs / weilizhe8-del / claude-code-traffic-light

weilizhe8-del/claude-code-traffic-light

一个桌面红绿灯小组件,实时显示 Claude Code 的运行状态。

↗ GitHub ★ 0 mit updated 4mo ago project Claude Code
share on X
ARCHETYPE
Automator
Hooks on every lifecycle event: format, lint, notify, log.
CONTEXT TAX · EVERY TURN
~0 tokens
Featherweight · median rig: 2.3k · breakdown
GUARDRAILS
3/5
Blocks destructive commands · Pre-tool screening hook · No YOLO mode · details

Copy this rig

# review before running: this installs third-party code
$ npx degit weilizhe8-del/claude-code-traffic-light/.claude ./rig-claude-code-traffic-light  # inspect, then merge into .claude/

MCP servers are added to Claude Code at local scope; env vars are shown as YOUR_… placeholders — we never store values. Files are fetched with degit into a separate folder so you can review before merging.

Merge into .claude/settings.json (project) or ~/.claude/settings.json (user). Hook commands reference scripts in the source repo — copy those too.

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash|PowerShell|Write|Edit|NotebookEdit",
        "hooks": [
          {
            "type": "command",
            "command": "powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"D:\\claude_project\\.claude\\hooks\\traffic-update.ps1\" -Status needs_confirmation"
          }
        ]
      }
    ]
  }
}

Hooks (4)

eventmatcherruns
UserPromptSubmit*powershell.exe -NoProfile -ExecutionPolicy Bypass -File "D:\claude_project\.claude\hooks\traffic-update.ps1" -Status running
Stop*powershell.exe -NoProfile -ExecutionPolicy Bypass -File "D:\claude_project\.claude\hooks\traffic-update.ps1" -Status finished
PreToolUseBash|PowerShell|Write|Edit|NotebookEditpowershell.exe -NoProfile -ExecutionPolicy Bypass -File "D:\claude_project\.claude\hooks\traffic-update.ps1" -Status needs_confirmation
PostToolUseBash|PowerShell|Write|Edit|NotebookEditpowershell.exe -NoProfile -ExecutionPolicy Bypass -File "D:\claude_project\.claude\hooks\traffic-update.ps1" -Status running

Similar rigs

copied ✓