一键导入
monitor
Quality gate and regression monitor. One-shot (`/monitor`) or continuous (`/loop 5m /monitor`). Scope with --tests, --build, or run all checks by default.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Quality gate and regression monitor. One-shot (`/monitor`) or continuous (`/loop 5m /monitor`). Scope with --tests, --build, or run all checks by default.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when working in Coop and needing the local app, receiver PWA, docs, API/signaling server, or extension watcher.
Browser and visual verification for Coop app, extension, popup, sidepanel, and receiver flows. Use when UI changes need rendered proof, console inspection, screenshots, Playwright checks, or local browser debugging.
Debugging & Troubleshooting - systematic root cause investigation with hypothesis testing and evidence collection. Use when the user reports a bug, encounters an error, sees unexpected behavior, or says 'debug this' or 'investigate this issue'.
Performance profiling and optimization - bundle analysis, Lighthouse CI, React Profiler, memory leaks, service worker cache efficiency. Use for performance investigations, optimization, and budget enforcement.
Planning & Execution - create structured implementation plans, check progress, execute in batches, manage lifecycle. Use when the user says 'plan this', asks to break down a feature into steps, or needs a phased implementation strategy before coding.
Code Review & PR Creation - 6-pass systematic review covering correctness, security, performance, patterns, testing, and documentation. Use when reviewing a PR, auditing code changes, or the user asks for systematic code quality analysis.
| name | monitor |
| description | Quality gate and regression monitor. One-shot (`/monitor`) or continuous (`/loop 5m /monitor`). Scope with --tests, --build, or run all checks by default. |
| disable-model-invocation | true |
| argument-hint | [--tests|--build|--fix] [package-filter] [duration|count] |
| user-invocable | true |
| allowed-tools | Bash, Read, Glob, Grep |
| model | opus |
Iteration-aware quality gate. Detects regressions against a stable baseline — not just failures.
| Flag | Checks | Use Case |
|---|---|---|
| (none) | format + lint + tests + build | Full gate (default) |
--tests | tests only | During implementation sprints |
--build | build only | After cross-package changes |
--fix | format + lint in write mode, then all checks | Auto-fix style issues first |
Maintain across loop iterations:
BASELINE (captured on run 1):
format_ok: bool
lint_ok: bool
test_count: number
test_failures: Set<string> # "file > suite > test name"
passing_tests: Set<string>
build_packages:
shared: { ok: bool, errors: string[] }
app: { ok: bool, errors: string[] }
extension: { ok: bool, errors: string[] }
CURRENT (this run): same shape as baseline
DELTA (computed):
new_failures: tests passing at baseline but failing now
fixed: tests failing at baseline but passing now
flaky: tests that oscillate across runs
build_regressions: packages that built at baseline but fail now
build_cascades: downstream failures caused by upstream breakage
--fix: run bun format and bun lint --fix firstbun format --check 2>&1bun lint 2>&1bun run test 2>&1 (NEVER bun test) — parse per-test pass/fail identitybun run build 2>&1 — parse per-package success/failure and error fingerprintsOutput:
Monitor baseline established
| Check | Status | Detail |
|--------|--------|-----------------|
| Format | PASS | |
| Lint | PASS | |
| Tests | PASS | 47/47 |
| Build | PASS | shared ✓ app ✓ extension ✓ |
If pre-existing failures, list as known issues (not regressions).
Run same checks. Compare against baseline (never previous run — prevents drift).
Classification:
Output for clean runs:
Monitor #3 — No regressions. All clear.
Output with regressions:
Monitor #4 — REGRESSION DETECTED
REGRESSIONS:
Tests: 2 new failures
FAIL config.test.ts > resolveChain > defaults to sepolia
FAIL auth.test.ts > createPasskeySession > mock mode
Build: @coop/shared (was OK, now fails)
src/contracts/schema.ts:215 — TS2304: Cannot find name 'ritualPhaseSchema'
CASCADE: app ✗, extension ✗ (depend on shared)
FIXES: 1 test now passing
FLAKY: sync.test.ts > reconnect (PASS/FAIL/PASS/FAIL)
file > suite > name), not countbun run test --filter packages/$PACKAGE--tests: Test checks only--build: Build checks only--fix: Run format/lint in write mode before checkingshared, extension): scope tests to packages/$FILTER1h, 45m): Override time limit3, 10): Override iteration capDefault: 30 minutes or 6 iterations, whichever comes first.
Final summary compares end state to baseline:
Monitor complete — 6 runs over 30m
Baseline: 47 tests, format ok, lint ok, build ok
Final: 45 tests, format ok, lint ok, build ok
Delta: -2 tests (regressions), 0 fixes, 1 flaky
bun test — always bun run test--fix, and even then only format/lint)