plugin/skills/execute-story/SKILL.md
February 4, 2026
Select agents to install to:
npx add-skill https://github.com/Roeia1/SAGA/blob/main/plugin/skills/execute-story/SKILL.md -a claude-code --skill execute-storyInstallation paths:
.claude/skills/execute-story/# Execute Story Skill
!`node $SAGA_PLUGIN_ROOT/scripts/find.js "$0" --type story --status ready`
## Tasks
| Subject | Description | Active Form | Blocked By | Blocks |
|---------|-------------|-------------|------------|--------|
| Resolve story | The `saga find` command ran above and output a JSON result. Handle the result based on its structure: (1) **If found=true**: Extract `data.epicSlug`, `data.slug`, and `data.worktreePath` and proceed. (2) **If found=false with matches array**: Use AskUserQuestion to disambiguate with question "Which story do you want to implement?", header "Story", multiSelect false, and options array where each item has label "<slug>" and description "<title> (Epic: <epicSlug>, Status: <status>)" for each story in the matches array. After selection, use the selected story's `epicSlug`, `slug`, and `worktreePath`. (3) **If found=false with error**: Display the error message and suggest using `/task-list` to see available stories, then stop. | Resolving story | - | Update worktree branch |
| Update worktree branch | Before starting implementation, ensure the worktree branch has the latest changes from master. Run using Bash: `cd "<worktreePath>" && git fetch origin master && git merge origin/master -m "Merge origin/master into story branch" && cd "$SAGA_PROJECT_DIR"` where `<worktreePath>` is `data.worktreePath` from the resolved story. This ensures workers start with the latest codebase, avoiding merge conflicts later. The final `cd` returns to the project root before running the orchestrator. | Updating worktree | Resolve story | Run implementation orchestrator |
| Run implementation orchestrator | Run the command using Bash: `node $SAGA_PLUGIN_ROOT/scripts/implement.js "<slug>" --max-cycles 10 --max-time 60 --model opus` where `<slug>` is `data.slug` from the resolved story. The script creates a detached tmux session and returns immediately with JSON output containing: `mode` ("detached"), `sessionName` (tmux session name), `outputFile