watch-patterns

watch-patterns is a skill for Claude Code from komluk/scaffolding. It costs 73 tokens per session (2,378 once invoked), scanned A, original, MIT.

Guidance for watching tasks that take time to finish, such as a build, deployment, file transfer, cleanup job, or log stream. It explains how to check progress and recognise both completion and failure.

In plain words
What is it for?
Use it when writing polling loops, waiting for a remote task, or using a monitor or background process to observe ongoing work.
Why use it?
It helps avoid loops that run forever, miss failures, or mistake a lack of messages for progress.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; positional $N argument.

Part of the scaffolding plugin — 39 skills, 9 commands, 13 agents shipped together

Good fit Use it when writing polling loops, waiting for a remote task, or using a monitor or background process to observe ongoing work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/komluk/scaffolding/watch-patterns
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.

Any agent
npx skills add komluk/scaffolding --skill watch-patterns
Clone the repo
git clone --depth 1 https://github.com/komluk/scaffolding

Made for: Claude Code.

Or install scaffolding, the plugin that ships this one along with the rest of its 39 skills, 9 commands, 13 agents.

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/komluk/scaffolding/watch-patterns/github.svg)](https://agentmods.dev/skills/komluk/scaffolding/watch-patterns)
Your own site
<a href="https://agentmods.dev/skills/komluk/scaffolding/watch-patterns"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/watch-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for watch-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/komluk/scaffolding/watch-patterns"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/watch-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,378 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00073 $0.02378
Opus 5.5 $0.00029 $0.00951
Sonnet 5.5 $0.00015 $0.00476
Haiku 4.5 $0.00007 $0.00238

Measured 18d ago against content hash e8c3bb7ad619, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

watch-patterns scanned grade A with 1 finding 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 18d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| Transient errors | A remote probe MAY fail transiently: `OUT=$(curl -fsS "$URL" 2>&1) || OUT="PROBE_FAILED: $OUT"` — capture and classify; a blind `\|\| true` on every command converts persistent outage into silence. C
skills/watch-patterns/SKILL.md · 186 lines

How it starts

The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Watch Patterns Skill

Purpose

How to observe long-running operations correctly. Anyone can run a loop — the value is a watcher that never lies: it terminates, it detects failure as reliably as success, and its silence is never mistaken for progress.

Key architectural fact: a subagent cannot hold a long-lived observation. Notifications from an armed Monitor land in the conversation that armed it; a subagent finishes and dies. Observation is therefore always armed by the main loop — this skill is loadable anywhere for exactly that reason.

Auto-Invoke Triggers

  • Watching a CI run, deployment, file transfer, GC/prune job, or log stream
  • Writing any poll/until loop over a remote or local state
  • Using the Monitor tool or Bash(run_in_background) for observation

Decision Tree — Choose the Mechanism FIRST

The single most common failure is picking the wrong mechanism. Decide BEFORE writing any script:

Situation Mechanism
"Is it done now?" — answerable immediately One-shot check. Single command, no loop, no monitor.
ONE notification when a condition becomes true (deploy finished, download complete, GC done) Bash(run_in_background) + until loop with a terminal condition and a bounded iteration count. NOT Monitor.
REPEATING events, each occurrence matters (every error line, every restart) Monitor tool with a filter covering ALL terminal states.
CI run status (Gitea Actions) MCP polling: mcp__gitea__gitea-actions_run_read polled until status is terminal. Structured status beats scraping logs.
Metric/log condition (error rate, service down) MCP: mcp__grafana__grafana-query_prometheus / grafana-query_loki_logs. One query returns aggregated truth; a bash loop re-derives it badly.
You only need the outcome eventually, no urgency Do nothing now. Check once when the result is actually needed.

Anti-pattern (observed failure)

Unbounded tail -f / while true piped into Monitor when only ONE notification was needed → the tool stays armed until timeout, and every intermediate line risks a spurious notification. Single notification = Bash(run_in_background) + until; Monitor is for recurring events only.

Read the full file on GitHub · 186 lines

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. 18d ago Changed e8c3bb7ad619
  2. 1mo ago Changed · -3 tokens per session 60adb0126c95
  3. 2mo ago First seen · 186 lines · 76 tokens per session scan A a4fcb4e82b28

Subscribe to this mod's changes

watch-patterns is a skill published in the GitHub repository komluk/scaffolding (15 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 2,378 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

platform-operations

Unified platform operations guidance for CI/CD pipeline design, deployment strategies, observability, SLI/SLOs, and incident-ready rollouts. Use when building release workflows, production monitoring, or reliability controls.

rsmdt/the-startup · 45 tokens

vibe-ship

Generates and audits production-ready deployment setups for any app. Detects the stack from the repo (Node/Next.js/Bun/Deno, Python/Django/FastAPI, Go, Rust, Java/Spring, .NET, Ruby/Rails, PHP/Laravel, Elixir/Phoenix, static sites, monorepos) and writes hardened Dockerfiles, .dockerignore, compose.yaml with…

sudais-khalid/vibe-ship · 254 tokens

loop-on-ci

Monitor PR checks and fix failures until green. Uses gh pr checks as the source of truth for PR-attached checks.

Kripu77/software-factory · 28 tokens

ci-workflow

Design and maintain .NET CI workflows for F#, C#, and mixed solutions with SDK setup, restore, build, test, format checks, package checks, caching, and matrix decisions.

gaelic-ghost/socket · 41 tokens

dockerized-service-release-deployment-workflow

Create a Dockerized-service release contract with clean GitHub Actions builds, main-anchored tags, immutable digest manifests, published-release deployments, production approval, health checks, and exact-digest rollback.

gaelic-ghost/socket · 49 tokens

deploy-planner

Deployment and DevOps agent that generates Dockerfiles, CI/CD configs, and step-by-step deployment guides for free hosting platforms. Triggers on: deploy, launch, hosting, Docker, CI/CD, production, go live, ship it.

batterfried-philosophy172/Agent-Startup-Skills · 52 tokens