Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Watches files with chokidar and runs a Claude prompt via claude -p on each added or changed file.
41% 100%+59 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 9 of 22 without it.
3 of 3 safety checks passed
Not used yet
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.
# 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}}'
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) |
add and change events{{file}} placeholder in the prompt is replaced with the actual file pathclaude -p '<prompt>' --print is executed via child_process.execSyncNext to this one in the catalogue, plus more from the same author.