watch-folder

watch-folder is a command for coding agents from coltonbearden/carrel. It costs 20 tokens per session (472 once invoked), scanned A, original, MIT.

A command for monitoring a folder and running carrel actions when files appear or change.

In plain words
What is it for?
It helps run commands for newly created or modified files, with options for filtering, waiting briefly between events, one-time runs, time limits, and machine-readable logs.
Why use it?
It automates repeated file processing and can limit the work to selected file types or events.

Command

Part of the carrel-watch plugin — 1 skill, 1 command shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/coltonbearden/carrel/watch-folder
Clone the repo
git clone --depth 1 https://github.com/coltonbearden/carrel

Or install carrel-watch, the plugin that ships this one along with the rest of its 1 skill, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for watch-folder

README.md
[![agentmods](https://agentmods.dev/badge/commands/coltonbearden/carrel/watch-folder.svg)](https://agentmods.dev/commands/coltonbearden/carrel/watch-folder)
Your own site
<a href="https://agentmods.dev/commands/coltonbearden/carrel/watch-folder"><img src="https://agentmods.dev/badge/commands/coltonbearden/carrel/watch-folder.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 472 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.00472
Opus 5 $0.00010 $0.00236
Sonnet 5 $0.00004 $0.00094
Haiku 4.5 $0.00002 $0.00047

Measured 3d ago against content hash 6819fd6bb188, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

watch-folder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/carrel-watch/commands/watch-folder.md · 27 lines

What it actually says

Set up a folder watch for: $ARGUMENTS

Run the carrel CLI via Bash. First run carrel watch --help to confirm the exact flags available in the installed version, then map the user's request onto them — never invent flags. The expected interface is:

carrel watch DIR --on created,modified [--glob '*.pdf'] --run 'carrel thumb {path} --out-dir thumbs'
             [--debounce 500] [--once] [--timeout SECS] [--json-lines]
  • --on: comma-separated events (created, modified, deleted, moved).
  • --glob: only react to matching filenames.
  • --run CMD (repeatable, runs in order): the action; {path} is replaced with the triggering file (shell-quoted for you).
  • --once: exit after the first triggered action — use for demos/tests. --timeout SECS: hard stop.
  • --json-lines: machine-readable event log on stdout.

If carrel watch --help reports that the command does not exist, the installed carrel predates it — say so instead of guessing flags.

Important: this is a long-running foreground process. Run it via Bash in the background (or with --timeout/--once for a bounded demo), tell the user how it will keep running and that Ctrl-C/kill stops it cleanly. Suggest recipes from this plugin's watch-automation skill (auto-thumb, auto-index, auto-convert drop folders). Report the watch config back: directory, events, glob, action(s).

Requires the carrel CLI on PATH. If carrel is not found, tell the user to install it with uv tool install <path-to-carrel-repo> (see the repo's INSTALL notes), or run it as uv run carrel ... from the carrel repo root.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 27 lines · 20 tokens per session scan A 6819fd6bb188

Subscribe to this mod's changes

watch-folder is a command published in the GitHub repository coltonbearden/carrel (1 stars, last pushed 22d ago), licensed MIT. It adds 20 tokens to every session and 472 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.