file-watcher

Monitor directories for file changes and trigger Claude prompts.

1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/hbvg234/jnmt.vn --skill file-watcher-hbvg234
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-watcher
Source: https://github.com/hbvg234/jnmt.vn/tree/main/.claude/skills/file-watcher
Command: npx skills add https://github.com/hbvg234/jnmt.vn --skill file-watcher-hbvg234

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Chokidar-based file watcher that triggers Claude prompts on file changes. Useful for automated AI reactions to file changes — design sync, code validation, config regeneration, and more.

Core Features & Use Cases

  • Watches a directory for add/change events and prompts Claude with context about the changed file.
  • Supports a {{file}} placeholder in prompts to inject the changed file path.
  • Debounces changes and offers optional glob filtering to control which files trigger actions.

Quick Start

Run the watcher on a target directory to trigger Claude prompts for every changed file.

Frequently Asked Questions about file-watcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trigger Claude prompts automatically when files change?

To trigger Claude prompts automatically on file changes, use a watcher to monitor your directory and inject the changed file path into a {{file}} placeholder within your prompt. This enables real-time AI reactions for code reviews and configuration regeneration.

What do I need to set up automated file watching with Claude CLI?

Automated file watching with Claude CLI requires Node.js and the chokidar library to monitor directory events. You configure prompts containing a {{file}} placeholder, with optional debounce settings and glob filters to control which changes trigger actions.

Can I filter which file changes trigger Claude prompts?

Yes, you can filter which file changes trigger Claude prompts using optional glob filtering. This allows you to restrict watch events to specific file types or directories, and debounce settings prevent rapid successive triggers from overlapping.

What is the best way to automate code reviews during development?

Automating code reviews during development is best handled by a real-time file watcher that prompts Claude with the edited file's context. This approach synchronizes design updates and validates code immediately upon saving changes.

Does chokidar work with Claude CLI for real-time development automation?

Yes, chokidar works with Claude CLI by watching directories for add and change events, then passing the file path to Claude. This integration supports real-time development automation like design synchronization and config regeneration.

Why use a debounce when watching files to trigger AI prompts?

Using a debounce when watching files prevents multiple AI prompts from firing during rapid successive saves. It ensures Claude CLI only triggers once after changes settle, avoiding duplicate processing for a single edit event.