Agent skill
file-watcher-setup
Set up cross-platform file system watching with debouncing and efficient change detection
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/file-watcher-setup
SKILL.md
file-watcher-setup
Set up cross-platform file system watching with debouncing, efficient change detection, and proper resource management.
Capabilities
- Watch files and directories
- Configure debouncing
- Handle recursive watching
- Filter file types
- Detect add/change/delete events
- Handle watcher errors
- Resource cleanup
Input Schema
{
"type": "object",
"properties": {
"projectPath": { "type": "string" },
"watchLibrary": { "enum": ["chokidar", "native", "nsfw"] },
"debounceMs": { "type": "number", "default": 300 }
},
"required": ["projectPath"]
}
Chokidar Example
const chokidar = require('chokidar');
const watcher = chokidar.watch('/path/to/watch', {
ignored: /(^|[\/\\])\../,
persistent: true,
ignoreInitial: true,
awaitWriteFinish: {
stabilityThreshold: 300,
pollInterval: 100
}
});
watcher
.on('add', path => console.log(`Added: ${path}`))
.on('change', path => console.log(`Changed: ${path}`))
.on('unlink', path => console.log(`Removed: ${path}`));
Related Skills
file-dialog-abstractionfile-system-integrationprocess
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?