feat: stagecraft skills package and pw-cli --replay with template variables#842
Merged
Conversation
…iables
Adds the stagecraft package as the skill library for agent-driven browser
automation. Skills are .pw files with {{variable}} placeholders, substituted
at replay time via --variable key=value.
Changes:
- packages/stagecraft: new package with skills directory structure
- packages/stagecraft/skills/rogers/: Rogers bill download skill (.pw + .js + SKILL.md)
- SessionPlayer.load(): supports {{key}} template variable substitution
- pw-cli --replay: sends .pw file commands via HTTP to running server
- REPL .replay: supports --variable key=value args
- Unresolved {{variables}} throw clear error with usage hint
Usage:
pw-cli --replay skills/rogers/download-bill.pw --variable billing_period="February 24, 2026"
Closes #829
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/stagecraftpackage — skill library for agent-driven browser automation.pwfiles with{{variable}}placeholders, substituted at replay timepw-cli --replay <file> --variable key=valuesends commands via HTTP to running server.replayalso supports--variable key=valueargsskills/rogers/download-bill.pw)Example
Test plan
SessionPlayer.load()substitutes{{variables}}correctlypw-cli --replaysends commands via HTTP and prints ✓/✗ status--variable billing_period="February 24, 2026"🤖 Generated with Claude Code