monitor-patterns

Streams per-event shell output through filtered Monitor helpers for deploys, CI, and tests.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/leonardoacosta/skills --skill monitor-patterns-leonardoacosta
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: monitor-patterns
Source: https://github.com/leonardoacosta/skills/tree/main/runtime-kit/skills/monitor-patterns
Command: npx skills add https://github.com/leonardoacosta/skills --skill monitor-patterns-leonardoacosta

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes references (resource) components.

What problem does it solve? Long-running commands like test suites, deploys, and CI pipelines either block the agent or dump buffered output all at once, making it impossible to react to individual events as they happen. ## Core Features & Use Cases - Decision Matrix: Maps each monitoring need (test runs, deploys, CI state, PR comments, lock files) to the right primitive โ€” Monitor, background Bash, or raw Bash. - Canonical Helper Library: Provides reusable shell helpers such as monitor_turbo_stream, monitor_vercel_deploy, monitor_gh_ci, monitor_gh_comments, and monitor_lock_files so poll loops are never reinvented inline. - Three Canonical Patterns: Filtered-stream wrapping, shell-poll against remote APIs, and inotify-based file-watch on cooperative signal directories. - Use Case: While running a Playwright suite, receive one event per PASS/FAIL line instead of a single buffered dump, and react to failures immediately. ## Quick Start Ask the agent to monitor the Playwright e2e suite and report each test result as it completes using the monitor helpers.

Frequently Asked Questions about monitor-patterns

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

FAQPage Schema
How do I stream per-test results from a Playwright run?โ–ผ

Wrap the test command with the Monitor primitive and a line-buffered filter, or call monitor_turbo_stream from the shared helper library. Each PASS/FAIL line arrives as a discrete event instead of one buffered stdout dump.

When should I use Monitor versus run_in_background Bash?โ–ผ

Use Monitor when you need to react to every occurrence of an event, such as each test result or deploy state change. Use run_in_background Bash when you only need a single completion signal with no per-event streaming.

Why does my shell poll loop never exit when parsing JSON with jq?โ–ผ

jq is strict and errors on raw control characters embedded in API JSON, and a swallowed 2>/dev/null error leaves the gating variable empty so the terminal-state check never matches. Extract the gate scalar with grep or python json.loads(strict=False) instead.

Can Monitor watch GitHub CI status and PR review comments?โ–ผ

Yes, the monitor_gh_ci helper polls a branch until CI reaches a terminal state, and monitor_gh_comments streams bot review comments on a PR as they post. Both are sourced from the shared monitor-helpers.sh library.

When should I not use the Monitor primitive?โ–ผ

Avoid Monitor for one-shot lookups like playwright test --list, native blocking commands with clean exit codes like gh run watch --exit-status, non-streaming batch output, and parallel sub-agent coordination, where raw or background Bash is correct.