SkillAgentSearch skills...

file-watcher

Configure file watching hooks to auto-react to config changes, env file updates, and dependency modifications. Use to set up reactive workflows.

Install / Use

npx skills add rohitg00/pro-workflow --skill file-watcher

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

84/100

Category

Automation

Supported Platforms

Claude Code

Our assessment of file-watcher

file-watcher scores 84/100 on our quality scale, 1966th of 3,055 Automation skills we index.

Its SKILL.md is 2.4 KB long, well organised into 10 sections with 5 code examples: moderately detailed.

With 2,876 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
20/30
Structure
20/20
Description
15/15
Adoption
15/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 8 days ago, so file-watcher is actively maintained.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

file-watcher compared with similar skills

All 4 of these similar skills score higher than file-watcher; compare them before choosing.

SkillScoreStarsUpdatedFormat
file-watcher (this skill)by rohitg00842.9k8d agoSKILL.md
Agent-Reachby Panniantong10087.6k16d agoCLAUDE.md
rufloby ruvnet10073.7ktodayCLAUDE.md
Scraplingby D4Vinci10085.1k1d agoMCP Server
algorithmic-artby anthropics100177.9k9d agoSKILL.md

Frequently asked questions

How do I install file-watcher?
Run npx skills add rohitg00/pro-workflow --skill file-watcher. The install tabs above show the steps for each supported agent.
Which AI agents does file-watcher work with?
It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
Is file-watcher safe to use?
It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is file-watcher still maintained?
The repository was last updated 8 days ago, so file-watcher is actively maintained.

name: file-watcher description: Configure file watching hooks to auto-react to config changes, env file updates, and dependency modifications. Use to set up reactive workflows. user-invocable: true

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:

echo "export PROJECT_TYPE=node" >> "$CLAUDE_ENV_FILE"
echo "export TEST_CMD='npm test'" >> "$CLAUDE_ENV_FILE"

Common Watch Patterns

Watch .env for Changes

const envFile = path.join(projectRoot, '.env');
if (fs.existsSync(envFile)) {
  output.hookSpecificOutput = {
    hookEventName: 'SessionStart',
    watchPaths: [envFile]
  };
}

Watch package.json for Dependency Changes

Detect when dependencies change and remind to run npm install.

Watch tsconfig.json for Config Changes

Remind to restart TypeScript checks when config changes.

Setup

Add to hooks.json:

{
  "FileChanged": [{
    "matcher": ".env|package.json|tsconfig.json",
    "hooks": [{
      "type": "command",
      "command": "node scripts/file-changed.js"
    }]
  }]
}

Rules

  • Use absolute paths for watchPaths (required by Claude Code)
  • Matcher uses pipe-separated filenames
  • Watcher uses 500ms stability threshold and 200ms poll interval
  • Keep file-changed handlers fast (<5s) to avoid blocking
  • Use CLAUDE_ENV_FILE for injecting env vars, not direct export

Related Skills

View on GitHub
GitHub Stars2.9k
CategoryAutomation
Updated8d ago
Forks289

Languages

JavaScript

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium