Sets up file system watchers that trigger actions when your config files, env files, or dependencies change. You register watch paths through SessionStart or CwdChanged hooks, then handle changes via FileChanged events. The built-in cwd-changed.js already handles env injection, so this is mainly useful when you want to extend that with additional reactive workflows like auto-reminding to run npm install when package.json changes or restarting TypeScript checks when tsconfig.json updates. Watchers use a 500ms stability threshold to avoid firing on rapid successive changes. Keep your handlers quick since they run synchronously. The matcher syntax is a bit clunky with pipe-separated filenames, but it works.

skills.sh installs
165
GitHub stars
2.9K
last updated
Jun 8, 2026

Install

$ npx -y skills add rohitg00/pro-workflow --skill file-watcher --agent claude-code

Installs into .claude/skills of the current project.

Files

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:

{
  "hookSpecificOutput": {
    "hookEventName": "SessionStart",
    "watchPaths": [
      "/absolute/path/to/.env",
      "/absolute/path/to/package.json"
    ]
  }
}

When watched files change, the FileChanged hook fires with:

{
  "hook_event_name": "FileChanged",
  "file_path": "/path/to/changed/file",
  "event": "change"
}

Environment Injection

CwdChanged and FileChanged hooks can write to CLAUDE_ENV_FILE to inject environment variables into subsequent Bash commands:

Sponsors

Details

Repository
github.com/rohitg00/pro-workflow
Categories
Frontend Development, Automation & Workflows
First seen
Jun 11, 2026

More from rohitg00/pro-workflow

All 35
10xsardius avatarwagmi0xsardius/onchain-typescript-skillsReact hooks for Ethereum and EVM blockchain interactions using Wagmi v3. Use when building React or Next.js apps with wallet connections, contract reads/writes,163skills.sh installs
2community-access avataremail-accessibilitycommunity-access/accessibility-agentsAudits HTML email templates for accessibility under email client rendering constraints. Covers table-based layout, inline styling, image blocking fallbacks, sem162skills.sh installs
3jerrar670 avatarimplement_lenis_scrolljerrar670/surf-websiteInstructions for implementing Lenis smooth scrolling in a Next.js or React application.162skills.sh installs
4solar-luna avatarwechat-article-formattersolar-luna/fully-automatic-article-generation-skill将Markdown文章转换为美化的HTML格式,适配微信公众号发布。应用专业CSS样式、代码高亮、优化排版。当用户说"美化这篇文章"、"转换为HTML"、"优化公众号格式"、"生成公众号HTML"时使用。157skills.sh installs
5oimiragieo avatardiagram-generatoroimiragieo/agent-studioGenerates architecture, database, and system diagrams using Mermaid syntax. Creates visual representations of system architecture, database schemas, component r146skills.sh installs
6webmaxru avatarenonic-webhook-integratorwebmaxru/enonic-agent-skillsSets up Enonic XP event listeners, webhook configurations, and external system integrations triggered by content lifecycle events. Covers lib-event listener reg144skills.sh installs