New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

claudewatch

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

claudewatch

Automated validation and self-healing system for Claude Code projects

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

ClaudeWatch

Automated validation and self-healing system for Claude Code projects. ClaudeWatch automatically validates your web applications for visual elements, accessibility, performance, and more—then intelligently fixes common issues.

npm version License: MIT

Features

  • Visual Analysis - Screenshot capture and comprehensive page structure analysis
  • Comprehensive Validation - Visual elements, accessibility, performance, forms, APIs
  • Task Alignment Verification - Combines DOM analysis with content evaluation
  • Design Quality Assessment - Evaluates layout, structure, and content alignment
  • Self-Healing - Automatically fixes common issues (missing alt text, console errors, broken links)
  • Multi-Viewport Testing - Desktop, tablet, and mobile responsive testing
  • Claude Code Integration - Runs automatically when you complete tasks
  • Detailed Reports - Screenshots, validation insights, and technical logs for every test
  • Fast Setup - One command to get started

Quick Start

Tell Claude to install ClaudeWatch:

npm install -g claudewatch
claudewatch claude-setup

ClaudeWatch will now automatically validate your work whenever Claude completes a task.

Manual Installation

# Install globally
npm install -g claudewatch

# Initialize in your project
cd your-project
claudewatch init

# Visual analysis is enabled by default

# Start your dev server, then run validation
npm start
claudewatch validate

Visual Analysis Features

ClaudeWatch provides comprehensive visual validation:

  • Screenshot Capture: Automatically captures full-page screenshots
  • Content Analysis: Analyzes page structure and content alignment
  • Task Verification: Compares results against original requirements

Commands

CommandDescription
claudewatch claude-setupQuick setup optimized for Claude Code
claudewatch initInitialize ClaudeWatch in your project
claudewatch validateRun validation tests
claudewatch self-healRun validation with automatic fixes
claudewatch statusShow system status and configuration
claudewatch reportView validation history and reports
claudewatch configOpen configuration file in editor
claudewatch cleanupClean up old logs and screenshots

What Gets Validated

Visual Elements

  • Required page elements exist (h1, nav, forms, etc.)
  • Page loads without critical errors
  • Screenshots captured and AI-analyzed for visual quality
  • Visual Analysis - Captures screenshots and analyzes page structure
  • Task Alignment Verification - Compares page content against original request
  • Layout & Design Quality - Evaluates structure, hierarchy, and responsive design
  • Content Analysis - Validates headings, buttons, forms align with requirements

Accessibility

  • Images have alt text
  • Proper heading hierarchy (h1, h2, h3...)
  • Color contrast compliance
  • Keyboard navigation support

Performance

  • Page load times under thresholds
  • Core Web Vitals monitoring
  • Animation performance optimization

Forms & Interactions

  • Form validation works correctly
  • Error messages display properly
  • Submit buttons are functional

APIs & Network

  • API endpoints respond correctly
  • Health check monitoring
  • Network request validation

Console & Errors

  • No JavaScript errors
  • No console warnings
  • Clean developer console
  • No broken links
  • Navigation functions properly
  • External link validation

Visual Task Alignment

ClaudeWatch provides comprehensive visual validation by combining screenshot analysis with DOM inspection:

  • Screenshot Analysis - Captures and analyzes page screenshots across viewports
  • Visual Structure Assessment - Analyzes layout, hierarchy, and responsive design
  • Content Matching - Compares page title, headings, and text against the task description
  • UI Pattern Recognition - Detects if requested elements (forms, buttons, navigation) are present
  • Confidence Scoring - Combines DOM analysis with content evaluation for accurate assessment
  • Detailed Insights - Provides specific observations about structure and missing elements

How It Works

  • Task Context - Captures the last Claude task from environment variables
  • Screenshot Capture - Takes full-page screenshots across all viewports
  • DOM Analysis - Analyzes structural elements, content, and responsive indicators
  • Visual Analysis - Examines page structure and content alignment with task requirements
  • Confidence Scoring - Combines technical analysis with content assessment
  • Detailed Reporting - Provides comprehensive feedback with actionable insights

Self-Healing Capabilities

ClaudeWatch can automatically fix:

  • Missing Alt Text - Adds descriptive alt text to images
  • Console Errors - Removes debug errors and fixes undefined variables
  • Broken Links - Replaces broken external links
  • API Errors - Fixes simple endpoint issues
  • Performance Issues - Optimizes animations and transitions
  • Missing Resources - Creates placeholder images and files
  • Accessibility Issues - Fixes contrast and heading problems

Project Structure After Setup

your-project/
├── .claudewatch/
│   ├── config.js          # Validation configuration
│   ├── validator.js       # Main validation script
│   └── self-healer.js     # Self-healing script
├── .claude/
│   └── settings.json      # Claude Code hook configuration
├── validation-logs/       # Detailed JSON reports
├── validation-screenshots/ # Screenshots from all viewports
└── CLAUDE.md              # Instructions for Claude

Configuration

Edit .claudewatch/config.js to customize validation:

module.exports = {
  baseUrl: 'http://localhost:3000',
  
  pages: [
    {
      path: '/',
      name: 'homepage',
      validations: ['h1', 'nav', '.hero-section'],
      
      forms: [{
        selector: '.contact-form',
        submitButton: 'button[type="submit"]',
        testInvalidData: {
          field: 'input[name="email"]',
          value: 'invalid-email'
        },
        errorSelector: '.error-message'
      }],
      
      apis: [
        { url: '/api/health' },
        { url: '/api/user/profile' }
      ]
    }
  ],
  
  validationTypes: {
    visual: true,
    accessibility: true,
    performance: true,
    forms: true,
    api: true,
    console: true,
    links: true
  }
};

Claude Code Integration

When you install ClaudeWatch with claude-setup, it automatically:

  • Sets up hooks - Runs validation after each task completion
  • Creates instructions - Adds CLAUDE.md with guidance for Claude
  • Enables self-healing - Automatically fixes common issues
  • Configures todo lists - Reminds Claude to include validation tasks

Example Claude Workflow

User: "Add a contact form to the homepage"

Claude: I'll add a contact form to your homepage.

[Claude implements the form]

Auto-validation triggers via hook
Self-healing fixes any issues found
Report generated with screenshots
Summary sent to Claude

Claude: "Contact form added and validated! ClaudeWatch confirmed:
- Form elements present
- Validation working
- Accessibility compliant
- Mobile responsive"

Understanding Reports

Validation Logs (validation-logs/)

  • Detailed JSON reports with timestamps
  • Error details and warnings
  • Performance metrics
  • Test results by viewport

Screenshots (validation-screenshots/)

  • Full-page screenshots for each viewport
  • Visual confirmation of your changes
  • Regression testing reference

Self-Healing Logs

  • What issues were found
  • Which fixes were applied
  • Success/failure status

Advanced Usage

Custom Validation Types

Add your own validation logic:

// In .claudewatch/config.js
pages: [{
  path: '/dashboard',
  name: 'dashboard',
  customValidations: async (page) => {
    // Custom validation logic
    const userCount = await page.textContent('.user-count');
    return parseInt(userCount) > 0;
  }
}]

Environment-Specific Config

module.exports = {
  baseUrl: process.env.NODE_ENV === 'production' 
    ? 'https://myapp.com'
    : 'http://localhost:3000',
  // ...
};

CI/CD Integration

# .github/workflows/validate.yml
- name: Run ClaudeWatch Validation
  run: |
    npm start &
    sleep 5
    claudewatch validate
    kill %1

License

MIT License - see LICENSE file.

Support

Credits

Built for the Claude Code community to enable automated, intelligent validation of web applications.

Made by PolarOrchid for Claude Code developers

© 2025 PolarOrchid - PolarOrchid.com

Keywords

claude

FAQs

Package last updated on 18 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts