DEV Community

Yurukusa
Yurukusa

Posted on • Edited on

I Built a Health Check CLI for Claude Code. My Setup Scored 63 on the First Run.

My Claude Code setup has been running autonomously for 200+ hours. I assumed it was solid.

Then I built a diagnostic tool and ran it against my own config. 63/100. "Getting There."

Turns out I had no context window monitoring. No activity logging. No error tracking from command output. Three blind spots I'd been living with for weeks.

The Problem

Claude Code's hook system is powerful but invisible. You configure it once in settings.json, maybe add a few CLAUDE.md rules, and forget about it. There's no way to know what you're missing until something breaks.

I had a web-based scanner that asks 20 yes/no questions. It works, but you have to honestly answer each question yourself. That's the weak point - people overestimate their setup.

The CLI Solution

A CLI that actually reads your files and tells you what's there and what's not:

git clone https://github.com/yurukusa/cc-health-check.git
cd cc-health-check && node cli.mjs
Enter fullscreen mode Exit fullscreen mode

(Coming soon to npm: npx cc-health-check)

It scans:

  • ~/.claude/settings.json - hook configurations
  • CLAUDE.md files - rules and patterns
  • Common files - mission.md, task-queue.yaml, proof-log/

No data leaves your machine. Zero dependencies. ~300 lines of code.

What It Checks (20 Points Across 6 Dimensions)

Safety Guards (20pts)

  • PreToolUse hooks blocking destructive commands (rm -rf, git reset --hard)
  • API keys not hardcoded in CLAUDE.md
  • Branch protection preventing direct pushes to main
  • Error-aware gates blocking external calls when errors exist

Code Quality (20pts)

  • PostToolUse syntax checking after every file edit
  • Error detection from bash output
  • Definition of Done (DoD) checklists
  • Output verification (screenshots, GET requests after publishing)

Monitoring (15pts)

  • Context window usage alerts
  • Activity logging (what commands ran, when, what changed)
  • Daily summaries / proof-logs

Recovery (15pts)

  • Git backup branches before major changes
  • Watchdog for hang/idle detection
  • Loop detection and fallback plans

Autonomy (15pts)

  • Task queue for unattended execution
  • Rules blocking unnecessary questions to humans
  • State persistence across session restarts

Coordination (10pts)

  • Decision audit trail
  • Multi-agent communication support
  • Lesson capture mechanism

Sample Output

  Claude Code Health Check v1.0
  ???????????????????????????????????????
  Scanning: /home/user/.claude

  ? Safety Guards
    [PASS] PreToolUse hook blocks dangerous commands
    [PASS] API keys stored in dedicated files
    [FAIL] Setup prevents pushing to main/master without review
    [FAIL] Error-aware gate blocks external calls when errors exist
  ? Code Quality
    [PASS] Syntax checks run after every file edit
    [FAIL] Error detection and tracking from command output
    [PASS] Definition of Done checklist exists
    [PASS] AI verifies its own output
  ...

  Score: 63/100 - Getting There

  Dimensions:
    ???????????????????? Safety Guards 50%
    ???????????????????? Code Quality 50%
    ???????????????????? Monitoring 33%
    ???????????????????? Recovery 100%
    ???????????????????? Autonomy 100%
    ???????????????????? Coordination 50%

  Top fixes:
    ? Add a PreToolUse hook that blocks destructive commands.
    ? Add an error-tracker that prevents publishing when errors exist.
    ? Add a PostToolUse hook that checks context percentage.
Enter fullscreen mode Exit fullscreen mode

What I Fixed After Running It

The tool told me I was missing:

  1. Context window monitoring - My AI was silently losing memory. Added a PostToolUse hook that alerts at 60/75/85/95% usage.
  2. Activity logging - No audit trail of what commands ran. Added a JSONL logger.
  3. Error tracking - Bash errors were ignored. Added an error pattern detector.

After fixing those three, my score went from 63 to 95. The only remaining gap: an error-aware gate that blocks publishing when unresolved errors exist.

The Shareable Score

The tool outputs a one-liner you can share:

My Claude Code Health Score: 95/100
(Safety: 75% | Quality: 100% | Monitoring: 100% | Recovery: 100% | Autonomy: 100% | Coordination: 100%)
#ClaudeCode
Enter fullscreen mode Exit fullscreen mode

What's yours?

Try It

CLI: github.com/yurukusa/cc-health-check

git clone https://github.com/yurukusa/cc-health-check.git
cd cc-health-check && node cli.mjs
Enter fullscreen mode Exit fullscreen mode

Web version (interactive checklist): yurukusa.github.io/cc-health-check

If you score under 60 and want pre-built hooks for all 6 dimensions: Claude Code Production Hooks - battle-tested over 200+ hours of autonomous operation.


I run Claude Code 24/7 on WSL2 and document everything that breaks. This tool exists because I got tired of discovering blind spots the hard way.


More tools: Dev Toolkit - 56 free browser-based tools for developers. JSON, regex, colors, CSS, SQL, and more. All single HTML files, no signup.

Top comments (0)