# watchexec File Watcher and Command Re-Runner

> watchexec is a standalone file-watching tool written in Rust that automatically executes commands when it detects file modifications. It respects .gitignore rules, coalesces rapid filesystem events, and works cross-platform without requiring any language runtime.

- Skill: `agentskillexchange/watchexec-file-watcher-and-command-re-runner` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/watchexec-file-watcher-and-command-re-runner`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/watchexec-file-watcher-and-command-re-runner/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/watchexec-file-watcher-and-command-re-runner

---


# watchexec File Watcher and Command Re-Runner

watchexec is a standalone file-watching tool written in Rust that automatically executes commands when it detects file modifications. It respects .gitignore rules, coalesces rapid filesystem events, and works cross-platform without requiring any language runtime.

## Installation

Requirements and caveats from upstream:
- Simple invocation and use, does not require a cryptic command line involving xargs
- Does not require a language runtime, not tied to any particular language or ecosystem
- Call/restart python server.py when any Python file in the current directory (and all subdirectories) changes:

Basic usage or getting-started notes:
- Example use cases:
- Automatically run unit tests
- Run linters/syntax checkers

- Source: https://github.com/watchexec/watchexec
- Extracted from upstream docs: https://raw.githubusercontent.com/watchexec/watchexec/HEAD/README.md

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/watchexec-file-watcher-command-rerunner/)

