flow-implement

Implements OpenSpec changes in isolated git worktrees with section-by-section commits and draft PRs.

Updated Nov 7, 2023
One-click install
npx skills add https://github.com/lstellway/nixfiles --skill flow-implement-lstellway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flow-implement
Source: https://github.com/lstellway/nixfiles/tree/main/modules/home-manager/claude/skills/flow-implement
Command: npx skills add https://github.com/lstellway/nixfiles --skill flow-implement-lstellway

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Executing a planned OpenSpec change directly on your main checkout risks polluting your working tree and producing one giant unreviewable commit. This Skill runs the implementation in an isolated git worktree, commits section by section, and opens a draft PR so review can start immediately. ## Core Features & Use Cases - Worktree Isolation: Creates a plain git worktree under .claude/worktrees/<change-id> so your main checkout stays clean during implementation. - Iterative Commit Cadence: Delegates to a subagent running /opsx:apply, committing once per logical section of tasks.md after tests, lint, and typecheck pass. - Draft PR Scaffolding: Pushes once at the end and opens a draft PR via gh pr create --draft with a body linking the OpenSpec change and mirroring the tasks checklist. - Use Case: You have a change at openspec/changes/rotate-secrets-on-startup/ with proposal and tasks ready. Run the skill to get a feature branch with reviewable per-section commits and a draft PR, without touching your main working tree. ## Quick Start Ask the AI to run /flow-implement with your change-id, for example: implement the rotate-secrets-on-startup OpenSpec change in a worktree and open a draft PR.

Frequently Asked Questions about flow-implement

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

FAQPage Schema
How do I implement an OpenSpec change in a git worktree?

Run /flow-implement with the change-id. The skill verifies proposal.md and tasks.md exist, creates a worktree at .claude/worktrees/<change-id> on a new branch, and delegates implementation to a subagent that commits section by section.

How does the skill create a draft PR after implementation?

After all sections of tasks.md are complete, the subagent pushes the branch once and runs gh pr create --draft. The PR body links the OpenSpec change directory and includes a checklist mirroring the tasks.md sections.

Can I use this without the GitHub CLI or a GitHub remote?

Yes. If gh is unavailable or the repository is not a GitHub remote, PR creation is skipped gracefully. The pushed branch with section-by-section commits remains the minimum deliverable.

What happens when tests or lint keep failing during implementation?

The subagent attempts at most two fixes for the same failure mode. If the failure persists after the second attempt, it stops and reports the issue as a blocker rather than retrying further.

When should I not use flow-implement?

Skip it if you want to implement directly on your main checkout without a worktree; use /opsx:apply directly instead. Also do not use it for archiving completed changes, which is handled by flow-retro after the PR merges.