Token导航 LogoToken导航TokenDH.com
待分类敏感数据github未标认证来源可访问许可证需确认审计提醒

file-watcher文件观察者

Agent Skill

file-watcher 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

216

周安装

9

GitHub Stars

公开资料未说明

下载量

72
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:file-watcher(文件观察者)
来源仓库:https://github.com/winsorllc/upgraded-carnival
仓库路径:skills/file-watcher
安装命令:
npx skills add https://github.com/winsorllc/upgraded-carnival --skill file-watcher
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/winsorllc/upgraded-carnival --skill file-watcher

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适用于围绕仓库状态、代码变更或协作事项进行整理和分析。
  • 通过命令行工具调用,可集成到 Codex、Claude、Cursor、Gemini CLI 中使用。
  • 安装命令:npx skills add https://github.com/winsorllc/upgraded-carnival --skill file-watcher。
  • 使用前请确认权限范围、维护状态及是否涉及联网或文件操作。

SKILL.md

File Watcher Skill

Monitor files and directories for changes and trigger actions when changes occur.

When to Use

USE this skill when:

  • "Watch for file changes"
  • "Run command when file changes"
  • "Monitor directory for new files"
  • "Execute script on file create"
  • "Watch multiple files for changes"

When NOT to Use

DON'T use this skill when:

  • One-time file check → use test/read commands
  • Scheduled monitoring → use cron
  • Need persistent logging → use dedicated monitoring

Commands

Watch Directory

{baseDir}/watch.sh <directory> --command "echo 'Changed'"
{baseDir}/watch.sh ./src --command "npm run build"
{baseDir}/watch.sh ./logs --command "./process.sh" --pattern "*.log"

Watch Single File

{baseDir}/watch.sh --file config.json --command "echo 'Config changed'"
{baseDir}/watch.sh --file /var/log/app.log --command "tail -5 /var/log/app.log"

Watch Multiple Files

{baseDir}/watch.sh --files "file1.txt,file2.txt,file3.txt" --command "echo 'Changed'"
{baseDir}/watch.sh --files-from list.txt --command "echo 'Changed'"

Event Types

{baseDir}/watch.sh ./src --command "make" --events create,modify,delete
{baseDir}/watch.sh ./src --command "make" --events create
{baseDir}/watch.sh ./src --command "make" --events modify

Background Mode

{baseDir}/watch.sh ./src --command "make" --daemon
{baseDir}/watch.sh ./src --command "make" --pidfile /tmp/watcher.pid

Debounce

{baseDir}/watch.sh ./src --command "npm run build" --debounce 2
{baseDir}/watch.sh ./src --command "npm run build" --debounce-file

Options

OptionDescriptionDefault
--command CMDCommand to run on changeRequired
--file FILEWatch single fileNone
--files "F1,F2,..."Watch multiple filesNone
--files-from FILERead file list from fileNone
--pattern GLOBFile pattern to match*
--events TYPESEvents: create,modify,deleteall
--recursiveWatch subdirectoriestrue
--no-recursiveDon't recursefalse
--debounce SECSDebounce time0
--debounce-fileDebounce per filefalse
--daemonRun in backgroundfalse
--pidfile FILEPID file for daemonNone
--timeout SECSStop after N secondsNone
--quietSuppress outputfalse
--verboseShow all eventsfalse

Events

EventDescription
createFile or directory created
modifyFile content modified
deleteFile or directory deleted
moveFile moved (renamed)
accessFile accessed (read)
attribFile attributes changed

Output Format

[2026-02-25 20:41:00] MODIFY /path/to/file.txt
Running: echo 'Changed'
...
[2026-02-25 20:41:01] CREATE /path/to/newfile.txt
Running: echo 'Changed'
...

With --json:

{"event": "MODIFY", "file": "/path/to/file.txt", "timestamp": "2026-02-25T20:41:00Z", "command_output": "..."}

Examples

Watch and rebuild:

{baseDir}/watch.sh ./src --command "npm run build" --debounce 1

Watch for new log files:

{baseDir}/watch.sh ./logs --command "./new-log.sh" --events create

Watch config and restart:

{baseDir}/watch.sh --file config.json --command "pm2 restart app"

Watch multiple files:

{baseDir}/watch.sh --files "config.json,.env,package.json" --command "npm run build"

Watch in background:

{baseDir}/watch.sh ./src --command "make" --daemon --pidfile /tmp/watcher.pid

Watch for deleted files:

{baseDir}/watch.sh ./uploads --command "echo 'File deleted'" --events delete

Debouncing

The --debounce option prevents rapid-fire commands:

  • --debounce N: Wait N seconds after the last event before running the command
  • --debounce-file: Track debounce per file independently
# Wait 2 seconds after last change
{baseDir}/watch.sh ./src --command "build.sh" --debounce 2

# Debounce per file (each file gets its own timer)
{baseDir}/watch.sh ./src --command "process.sh" --debounce-file --debounce 1

Notes

  • Uses inotifywait (Linux) or fswatch (macOS) when available
  • Falls back to polling on systems without native support
  • Command receives $FILE and $EVENT environment variables
  • Recursive by default for directories
  • Can watch thousands of files efficiently
  • Clean shutdown with SIGTERM or SIGINT

Dependencies

  • Linux: inotifywait (inotify-tools package)
  • macOS: fswatch (brew install fswatch)
  • Both: Polling fallback with 1-second interval

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.22%
按下载量换算27

Claude

28.94%
按下载量换算21

Cursor

20.32%
按下载量换算15

Gemini CLI

10.73%
按下载量换算8

安全审计

Gen Agent Trust Hub

可疑

Socket

可疑

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills