/file-watcher
Chokidar-based file watcher that triggers `claude -p` on changes. Useful for automated AI reactions to file changes — design sync, code validation, config regeneration, etc.
$ npx -y skills add qdhenry/Claude-Command-Suite --skill file-watcher --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/file-watcher
Context preview
The summary Claude sees to decide when to auto-load this skill.
Chokidar-based file watcher that triggers `claude -p` on changes. Useful for automated AI reactions to file changes — design sync, code validation, config regeneration, etc.
SKILL.md
file-watcher.SKILL.mdname: file-watcher
description: Chokidar-based file watcher that triggers `claude -p` on changes. Useful for automated AI reactions to file changes — design sync, code validation, config regeneration, etc.
File Watcher Skill
Overview
Sets up a file watcher using chokidar that monitors a path for changes and runs a Claude prompt against every changed file. The prompt supports a `{{file}}` placeholder that gets replaced with the changed file path.
Quick Start
# Watch src/ and analyze any changed file
node scripts/watch-files.mjs ./src 'Analyze {{file}} for issues'
# Watch only .tsx files with 1s debounce
node scripts/watch-files.mjs ./src 'Review {{file}} for React best practices' --glob '*.tsx' --debounce 1000
# Via package.json script (pass args after --)
bun run watch:files -- ./src 'Check {{file}}'CLI Reference
node scripts/watch-files.mjs <path> <prompt> [--glob '<pattern>'] [--debounce <ms>]
| Arg | Required | Description | |-----|----------|-------------| | `<path>` | Yes | File or directory to watch | | `<prompt>` | Yes | Claude prompt. Use `{{file}}` for the changed file path | | `--glob` | No | Glob filter (e.g. `*.tsx`, `*.css`) | | `--debounce` | No | Debounce delay in milliseconds (default: 500) |
How It Works
1. Chokidar watches the target path for `add` and `change` events 2. Changes are debounced (default 500ms) to batch rapid saves 3. For each changed file, the `{{file}}` placeholder in the prompt is replaced with the actual file path 4. `claude -p '<prompt>' --print` is executed via `child_process.execSync` 5. Claude's output is logged to stdout
Example Prompts
| Use Case | Prompt | |----------|--------| | Code review | `'Review {{file}} for bugs and suggest fixes'` | | Type checking | `'Check {{file}} for TypeScript type issues'` | | Design sync | `'The design file {{file}} changed. Update the corresponding React component'` | | Test generation | `'Generate unit tests for {{file}}'` | | Documentation | `'Update documentation for changes in {{file}}'` |
Configuration
Glob Patterns
Filter which files trigger the watcher:
--glob '*.tsx' # Only TypeScript React files
--glob '*.css' # Only CSS files
--glob '*.{ts,tsx}' # TypeScript files (not supported by chokidar glob — use without braces)Debounce
Control how long to wait after the last change before triggering:
--debounce 200 # Fast (200ms) — good for single-file saves
--debounce 1000 # Slow (1s) — good for batch operations
--debounce 5000 # Very slow (5s) — good for build output directories
Troubleshooting
| Issue | Solution | |-------|----------| | `claude` CLI not found | Install Claude Code: `npm install -g @anthropic-ai/claude-code` | | Watcher not detecting changes | Check the path exists and you have read permissions | | Too many invocations | Increase `--debounce` value | | Prompt with special characters | Wrap prompt in single quotes; `{{file}}` is the only placeholder | | Permission denied | Ensure the watched directory is readable |
Dependencies
- `chokidar` (devDependency) — file system watcher
- `claude` CLI — must be installed globally and authenticated
Read more
name: file-watcher description: Chokidar-based file watcher that triggers `claude -p` on changes. Useful for automated AI reactions to file changes — design sync, code validation, config regeneration, etc.
File Watcher Skill
Overview
Sets up a file watcher using chokidar that monitors a path for changes and runs a Claude prompt against every changed file. The prompt supports a `{{file}}` placeholder that gets replaced with the changed file path.
Quick Start
# Watch src/ and analyze any changed file
node scripts/watch-files.mjs ./src 'Analyze {{file}} for issues'
# Watch only .tsx files with 1s debounce
node scripts/watch-files.mjs ./src 'Review {{file}} for React best practices' --glob '*.tsx' --debounce 1000
# Via package.json script (pass args after --)
bun run watch:files -- ./src 'Check {{file}}'CLI Reference
node scripts/watch-files.mjs <path> <prompt> [--glob '<pattern>'] [--debounce <ms>]
| Arg | Required | Description | |-----|----------|-------------| | `<path>` | Yes | File or directory to watch | | `<prompt>` | Yes | Claude prompt. Use `{{file}}` for the changed file path | | `--glob` | No | Glob filter (e.g. `*.tsx`, `*.css`) | | `--debounce` | No | Debounce delay in milliseconds (default: 500) |
How It Works
1. Chokidar watches the target path for `add` and `change` events 2. Changes are debounced (default 500ms) to batch rapid saves 3. For each changed file, the `{{file}}` placeholder in the prompt is replaced with the actual file path 4. `claude -p '<prompt>' --print` is executed via `child_process.execSync` 5. Claude's output is logged to stdout
Example Prompts
| Use Case | Prompt | |----------|--------| | Code review | `'Review {{file}} for bugs and suggest fixes'` | | Type checking | `'Check {{file}} for TypeScript type issues'` | | Design sync | `'The design file {{file}} changed. Update the corresponding React component'` | | Test generation | `'Generate unit tests for {{file}}'` | | Documentation | `'Update documentation for changes in {{file}}'` |
Configuration
Glob Patterns
Filter which files trigger the watcher:
--glob '*.tsx' # Only TypeScript React files
--glob '*.css' # Only CSS files
--glob '*.{ts,tsx}' # TypeScript files (not supported by chokidar glob — use without braces)Debounce
Control how long to wait after the last change before triggering:
--debounce 200 # Fast (200ms) — good for single-file saves --debounce 1000 # Slow (1s) — good for batch operations --debounce 5000 # Very slow (5s) — good for build output directories
Troubleshooting
| Issue | Solution | |-------|----------| | `claude` CLI not found | Install Claude Code: `npm install -g @anthropic-ai/claude-code` | | Watcher not detecting changes | Check the path exists and you have read permissions | | Too many invocations | Increase `--debounce` value | | Prompt with special characters | Wrap prompt in single quotes; `{{file}}` is the only placeholder | | Permission denied | Ensure the watched directory is readable |
Dependencies
- `chokidar` (devDependency) — file system watcher
- `claude` CLI — must be installed globally and authenticated
A comprehensive development toolkit designed following Anthropic's Claude Code Best Practices for AI-assisted software development.
Repo: qdhenry/Claude-Command-Suite
Other skills on claude-command-suite.
- /audit-env-variables
Analyze environment variables in JavaScript/TypeScript projects. Identifies unused variables, infers permission scopes, detects specific services (Stripe, AWS, Supabase), and documents code paths. Includes optional cleanup of unused variables with regression detection. Use when
Open skill - /bigcommerce-api
BigCommerce API expert for building integrations, apps, headless storefronts, and automations. Full lifecycle - REST APIs, GraphQL Storefront, webhooks, authentication, app development, and multi-storefront. Use when working with BigCommerce platform APIs.
Open skill - /cloudflare-manager
Comprehensive Cloudflare account management for deploying Workers, KV Storage, R2, Pages, DNS, and Routes. Use when deploying cloudflare services, managing worker containers, configuring KV/R2 storage, or setting up DNS/routing. Requires CLOUDFLARE_API_KEY in .env and Bun
Open skill - /elevenlabs-transcribe
Transcribes audio/video files using ElevenLabs Scribe v2 API. Use when transcribing audio files, generating transcripts, or converting speech to text.
Open skill - /extract-video-frames
Extracts frames and timestamped audio segments from video files (GIF, MP4, MOV) at configurable intervals and stores them in a directory with a manifest file. Use when analyzing video content, preparing frames for visual review, extracting audio for transcription, or creating
Open skill - /gsap-animation
1. [Installation & TypeScript Setup](#installation--typescript-setup) 2. [Core Concepts](#core-concepts) 3. [Tweens](#tweens) 4. [Timelines](#timelines) 5. [Easing](#easing) 6. [Staggers](#staggers) 7. [Control Methods](#control-methods) 8. [Utility Methods](#utility-methods) 9.
Open skill

