Loading...
Loading...
Configure file watching hooks to auto-react to config changes, env file updates, and dependency modifications. Use to set up reactive workflows.
npx skill4agent add rohitg00/pro-workflow file-watcherFileChangedCwdChangedSessionStartCwdChangedwatchPathscwd-changed.js{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"watchPaths": [
"/absolute/path/to/.env",
"/absolute/path/to/package.json"
]
}
}FileChanged{
"hook_event_name": "FileChanged",
"file_path": "/path/to/changed/file",
"event": "change"
}CwdChangedFileChangedCLAUDE_ENV_FILEecho "export PROJECT_TYPE=node" >> "$CLAUDE_ENV_FILE"
echo "export TEST_CMD='npm test'" >> "$CLAUDE_ENV_FILE"const envFile = path.join(projectRoot, '.env');
if (fs.existsSync(envFile)) {
output.hookSpecificOutput = {
hookEventName: 'SessionStart',
watchPaths: [envFile]
};
}npm install{
"FileChanged": [{
"matcher": ".env|package.json|tsconfig.json",
"hooks": [{
"type": "command",
"command": "node scripts/file-changed.js"
}]
}]
}CLAUDE_ENV_FILE