file-watcher
仓库创建 2026年2月2日最近提交 6 天前SkillHot 收录 20 天前
▸ 精选理由
便于搭建自动重载与依赖监控,提升开发迭代效率。
这个 Skill 做什么
配置文件监听钩子,自动响应配置、环境或依赖变更以实现响应式工作流。
为开发流程配置文件监听钩子,自动对配置、环境或依赖变更做响应,比如自动重载配置、触发构建或跑测试,减少手动操作。适合想搭响应式工作流、监控依赖更新或观察构建产物变化的团队使用。基于 Claude Code 的 FileChanged、CwdChanged 等钩子实现,能在会话启动或目录切换时触发相应动作。
▸ 展开 SKILL.md 英文原文
Configure file watching hooks to auto-react to config changes, env file updates, and dependency modifications. Use to set up reactive workflows.
2.7k
Stars
257
Forks
40
仓库内 Skill
+55
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/rohitg00/pro-workflow/main/skills/file-watcher/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/rohitg00/pro-workflow/main/skills/file-watcher/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# File Watcher
Use Claude Code's `FileChanged` and `CwdChanged` hooks to create reactive workflows that respond to file system changes.
## Trigger
Use when:
- Setting up auto-reload for config changes
- Watching for dependency updates
- Monitoring build output
- Creating reactive development workflows
## How File Watching Works
Claude Code's `SessionStart` and `CwdChanged` hooks support returning `watchPaths` to register file watchers. The current `cwd-changed.js` script focuses on env injection; to add watch registration, your hook script must output this JSON structure:
```json
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"watchPaths": [
"/absolute/path/via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有