file-watcher

Monitor file and directory changes with event callbacks and pattern filtering.

84|15|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/AIDotNet/MoYuCode --skill file-watcher
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-watcher
Source: https://github.com/AIDotNet/MoYuCode/tree/main/skills/tools/file-watcher
Command: npx skills add https://github.com/AIDotNet/MoYuCode --skill file-watcher

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of monitoring file and directory changes, allowing you to react instantly to modifications without constant manual checks.

Core Features & Use Cases

  • Real-time Monitoring: Tracks changes (creation, modification, deletion) in specified files or directories.
  • Event Callbacks: Executes predefined actions or commands when changes are detected.
  • Pattern Filtering: Allows you to focus monitoring on specific file types using patterns.
  • Use Case: Automatically recompile your code whenever you save a .py file, or trigger a backup process when a configuration file is updated.

Quick Start

Watch the './src/' directory for any changes and execute 'npm run build' when a change occurs.

Frequently Asked Questions about file-watcher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor file changes and trigger an automated script?

To monitor file changes and execute an automated script, this Skill tracks real-time modifications in specified directories and triggers predefined event callbacks when changes are detected.

Can I filter file monitoring to only watch specific file types?

Yes, you can filter file monitoring to specific file types using pattern filtering, allowing you to focus tracking on targeted extensions like `.py` or `.json` and ignore irrelevant modifications in the same directory.

Do I need Python 3 to run automated file watching tasks?

Yes, you need Python 3 to run file watching tasks, as the Skill relies on standard Python libraries for file system operations and subprocess management to execute automated actions upon directory modifications.

What is the best way to automatically recompile code when files are modified?

The best way to automatically recompile code when files are modified is configuring event callbacks to execute build commands, triggering processes like `npm run build` instantly upon saving changes in your source directory.

Does file monitoring support detecting deletions and creations or just modifications?

File monitoring supports detecting deletions and creations alongside modifications, providing comprehensive real-time tracking of all file system changes within your specified target directories for automated task execution.