Skip to main content

Health Check

The health check command performs comprehensive verification of your Claude Code installation, configuration, and project setup.

Run Health Check

Basic Usage

Run the health check:

Interactive Flow

The health check:
  1. Runs all verification tests
  2. Displays results in real-time
  3. Generates health score
  4. Provides recommendations
  5. Optionally launches project setup

Health Check Categories

The health check verifies seven categories:

1. System Requirements

Verifies your development environment: Operating System:
  • Platform: macOS, Linux, or Windows
  • Version: Compatible release
  • Status: ✅ Pass / ❌ Fail
Node.js Version:
  • Required: Node.js 18+
  • Current version check
  • Compatibility verification
Memory Available:
  • Recommended: 4GB+ total memory
  • Current memory status
  • Free memory available
Network Connection:
  • Anthropic API connectivity
  • Response time check
  • Network accessibility
Shell Environment:
  • Shell type (bash, zsh, fish)
  • Autocompletion support
  • Compatibility status

2. Claude Code Setup

Verifies Claude installation: Installation:
  • Claude Code CLI presence
  • Version information
  • Global/local installation
Authentication:
  • OAuth account check
  • API key verification
  • Environment variable check
Auto-updates:
  • Update settings
  • Version currency
Permissions:
  • Directory permissions
  • Write access
  • Configuration access

3. Project Setup

Verifies project configuration: Project Structure:
  • Project indicators (package.json, etc.)
  • Directory structure
  • Project type detection
Configuration Files:
  • .claude/ directory existence
  • File count and structure
  • Configuration validity
User Settings:
  • ~/.claude/settings.json
  • Settings structure
  • Permission rules
  • Environment variables
Project Settings:
  • .claude/settings.json
  • Project-specific configuration
  • Hook definitions
  • MCP server lists
Local Settings:
  • .claude/settings.local.json
  • Local overrides
  • Developer-specific config

4. Agents

Verifies installed agents: Project Agents:
  • .claude/agents/ directory
  • Agent file count
  • Recursive directory scan
Personal Agents:
  • ~/.claude/agents/ directory
  • Global agent count
  • Agent availability
Agent Syntax:
  • YAML frontmatter validation
  • Required fields (name, description)
  • Proper markdown structure

5. MCP Servers

Verifies MCP configuration: Project MCP Config:
  • .mcp.json existence
  • Server count
  • Configuration validity
MCP Config Syntax:
  • JSON validity
  • Required fields (command)
  • Args and env format
  • Server configuration completeness

6. Custom Commands

Verifies slash commands: Project Commands:
  • .claude/commands/ directory
  • Command count
  • File structure
Personal Commands:
  • ~/.claude/commands/ directory
  • Global command count
Command Syntax:
  • Markdown structure
  • $ARGUMENTS placeholder
  • Proper formatting

7. Hooks Configuration

Verifies automation hooks: User Hooks:
  • ~/.claude/settings.json hooks
  • Hook count and types
Project Hooks:
  • .claude/settings.json hooks
  • Project-specific automation
Local Hooks:
  • .claude/settings.local.json hooks
  • Developer-specific hooks
Hook Commands:
  • Command executability
  • Shell builtin recognition
  • Command availability verification
MCP Hooks:
  • MCP-specific hook validation
  • Integration checks

Health Check Output

Real-Time Display

As checks run:

Health Score

Final summary:

Status Icons

  • Pass: Check passed, no issues
  • ⚠️ Warn: Check passed with warnings
  • Fail: Check failed, needs attention

Health Check Recommendations

Based on results, the health check suggests:

System Issues

Low Memory:
Network Issues:
Shell Environment:

Configuration Issues

Missing Frontmatter:
Missing MCP Config:
Missing Agents Directory:
Invalid JSON:
Missing Hook Commands:

After Health Check

Setup Recommendation

If health score is low (below 80%), the CLI prompts:
Selecting “Yes” launches interactive setup:

Manual Fixes

For specific issues, fix manually:

Use Cases

1. Initial Setup Verification

2. Troubleshooting

3. Team Onboarding

4. Pre-Deployment

5. Regular Maintenance

Troubleshooting

Health Check Hangs

Network timeout:
  • Check internet connection
  • Verify Anthropic API access
  • Use Ctrl+C to cancel
File system issues:
  • Check .claude/ permissions
  • Verify disk space
  • Close other applications

False Negatives

Claude CLI not detected:
Authentication fails:

Performance Issues

Slow health check:
  • Large conversation history
  • Many agents/commands
  • Network latency
Solutions:

Health Check Options

boolean
Run comprehensive health check
boolean
Short alias for —health-check
boolean
Alternative alias for —health-check
boolean
Another alias for —health-check

Best Practices

Regular Checks

Run health checks:
  • After installation
  • Before major updates
  • Monthly maintenance
  • When troubleshooting
  • Team onboarding

Documentation

Document health scores:

Team Standards

Set minimum health score:

Automation

Automate health checks:

Advanced Usage

Custom Health Checks

Extend with custom validations:

Health Check API

Programmatic access:

Next Steps