watch

Streams MySpec project events over WebSocket and maps each event to factory manager actions.

Updated Sep 12, 2026
One-click install
npx skills add https://github.com/myspecs/claude-plugins --skill watch-myspecs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: watch
Source: https://github.com/myspecs/claude-plugins/tree/main/plugins/myspec-factory/skills/watch
Command: npx skills add https://github.com/myspecs/claude-plugins --skill watch-myspecs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? During a factory run, the manager needs to know immediately when spec files change, spec sessions complete, or projects are deleted, without wasteful polling, and must track worker pull requests that never emit platform events. ## Core Features & Use Cases - Event feed management: Mints a scoped stream token, opens the presigned WebSocket URL in Claude Code's Monitor tool, and reacts to each frame (spec_file.updated, spec_session.updated, project.deleted) with the correct manager action. - Pull request monitoring: Ships tested bash scripts (pr-watch.sh, postmerge-watch.sh) that watch worker branches, PR checks, review decisions, and post-merge workflow runs, printing one line per state change. - Token lifecycle and recovery: Handles token rotation before expiry, reconnects with ?after=<last_seq> cursors, dead-feed detection, resync after gaps, and a polling fallback when stream tokens are unavailable. - Use Case: While workers build tasks from a bundle, the manager opens the event feed, gets notified when a human edits tasks.md mid-run, pauses affected dispatches, and merges worker PRs as soon as checks pass and the reviewer approves the current head. ## Quick Start Ask Claude to watch the MySpec project event feed for your factory bundle and react to spec changes and worker pull requests.

Frequently Asked Questions about watch

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

FAQPage Schema
How do I watch a MySpec project for spec file changes without polling?▼

Mint a stream token with create_stream_token scoped to the project and the spec_file event types, then pass the returned WebSocket URL to Claude Code's Monitor tool. Each event frame arrives as a notification mapped to a manager action.

How to monitor a GitHub pull request's checks and review state from a script?▼

Run pr-watch.sh with the repo clone directory, the PR title prefix, and --since set to the session start time. It prints one line per state change covering branches, checks, review decision, and approval on the current head, exiting when the PR merges or closes.

Does the MySpec event stream require a specific MCP server version?▼

Yes, it requires @myspec/mcp-server 0.4.0 or newer and a platform with REALTIME_STREAM_ENABLED. When create_stream_token is absent from the tool list, the skill falls back to polling with get_spec_file content_version comparisons.

Why did the event feed stop receiving frames and how do I recover?▼

Idle WebSocket connections drop every 15-25 minutes (close 1006) and Monitor windows cap at 30 minutes. Reconnect to the same URL with ?after=<last_seq>; if the token expired or the URL is lost, mint a replacement and resync every bundle file with get_spec_file.

What are the security rules for MySpec stream token URLs?▼

The presigned URL is the only credential and grants read access to all project events until expiry. Pass it directly into Monitor, never log or repeat it, request the shortest ttl_seconds that covers the work, and revoke it with revoke_stream_token when the run ends.

When should I use the polling fallback instead of stream tokens?▼

Use the fallback when create_stream_token is not available in the MCP tool list. Skip minting, run the pull request scripts with gh and git, and detect spec changes by comparing content_version from get_spec_file before each integrate and dispatch step.