一键导入
feature
Implement features using worktree-based development with TDD. Use after spec approval to build features in isolated git worktrees with quality gates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement features using worktree-based development with TDD. Use after spec approval to build features in isolated git worktrees with quality gates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Bootstrap new projects or add the agents-workflow system to existing projects. Use for new project scaffolding (Next.js, Python, Rust) or adding workflow capabilities to any git repository.
Generate an actionable retro from Pi session logs + orchestration artifacts, and propose concrete doc/template improvements.
Entry point for feature planning workflow. Guides users through PRD creation, spec generation, and swarm design with automatic context management.
Execute implementation plans with parallel worker agents in git worktrees. Spawns agents, monitors progress, coordinates merges. Use after /skill:plan completes.
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
Analyze codebase for optimization and refactoring opportunities. Use for periodic quality checks, identifying tech debt, and planning improvements.
| name | feature |
| description | Implement features using worktree-based development with TDD. Use after spec approval to build features in isolated git worktrees with quality gates. |
Implement features using isolated git worktrees, TDD methodology, and structured PR creation.
Key principle: Don't start implementing until the spec is implementation-ready.
/skill:feature [feature-name] # Implement from existing spec
/skill:feature [feature-name] --no-worktree # Implement in current branch
/skill:feature [feature-name] --continue # Resume work on existing worktree
/skill:feature [feature-name] --reset # Delete existing worktree and start fresh
/skill:feature [feature-name] --skip-checks # Skip readiness assessment (use with caution)
1. Request Analysis → Is the request clear enough?
2. Spec Discovery → Find and load the spec
3. Readiness Assessment → Is the spec implementation-ready?
4. Gap Resolution → Interview or redirect if needed
5. Pre-flight Checks → Git state, worktree setup
6. Implementation → TDD approach
7. Quality Gates → Tests, lint, build
8. PR Creation → Draft PR for review
Before looking for a spec, analyze the user's request:
/skill:feature user-avatar-upload ✓ Specific feature name
/skill:feature api-rate-limiting ✓ Clear scope
/skill:feature checkout-flow-v2 ✓ Named feature
/skill:feature improvements ✗ Too vague - what improvements?
/skill:feature make it faster ✗ No specific scope
/skill:feature fix the bugs ✗ Which bugs?
/skill:feature ✗ No feature specified
If request is vague, ask for clarification:
Route appropriately:
| Response | Action |
|---|---|
| New feature, no spec | Suggest /skill:plan {feature} → /skill:feature |
| Improvement, has review | Suggest /skill:plan {feature} --spec --from-review → /skill:feature |
| Bug fix | Enter plan mode instead |
| Has spec file | Proceed with provided path |
Search for the spec in order:
1. docs/specs/{feature-name}-spec.md # Primary location
2. docs/specs/{feature-name}.md # Alternate naming
3. Glob: docs/specs/*{feature-name}*.md # Fuzzy match
If no spec found:
/skill:plan {feature-name} --specThis is the critical gate. Validate the spec is implementation-ready.
| Criteria | Check | Blocking? |
|---|---|---|
| Implementation phases | Has numbered phases with descriptions | Yes |
| File targets | Specifies files to create/modify | Yes |
| Testable acceptance criteria | Has measurable success conditions | Yes |
| No TBD sections | No "TBD", "to be determined", "TODO" | Yes |
| No ambiguous language | No "might", "possibly", "maybe" | Yes |
| API contracts (if API) | Full request/response schemas | Yes |
| Data models (if data) | Types with field definitions | Yes |
| Error handling | Error scenarios enumerated | No (warn) |
| Performance targets | Specific numbers if relevant | No (warn) |
# Check for TBD/TODO in spec
Grep: "TBD|TODO|to be determined|to be decided" in spec file
# Check for ambiguous language
Grep: "might|maybe|possibly|could be|we'll see|not sure" in spec file
# Check for implementation phases
Grep: "## Phase|### Phase|## Implementation|### Step" in spec file
# Check for file targets
Grep: "src/|lib/|components/|\.ts|\.tsx|\.py" in spec file
If readiness assessment finds issues, resolve them before proceeding.
Conduct targeted interview:
Gap-specific questions:
| Gap | Question |
|---|---|
| Missing phases | "How should we break this into implementation steps?" |
| Missing file targets | "Which files should this change touch?" |
| TBD section found | "The spec says TBD for [X]. What should it be?" |
| Ambiguous requirement | "The spec says 'might [X]'. Should we include this or not?" |
| Missing API schema | "What should the request/response look like for [endpoint]?" |
| Missing error handling | "What should happen when [error case] occurs?" |
After interview, update spec file and re-run assessment.
Redirect to spec workflow:
The spec has significant gaps. Consider:
1. Run `/skill:plan {feature-name} --spec` to regenerate
2. Manually update the spec and retry
For changes estimated < 50 lines:
Scoping interview (5 questions):
If > 50 lines: Redirect to spec workflow If < 50 lines: Generate lightweight task doc and proceed
git status --porcelain
If dirty (uncommitted changes):
stash - Stash changes and continuecommit - Commit changes firstabort - Stop and let user handle manuallywt list # List all worktrees
If feat/{feature-name} exists:
--continue flag: Switch to it and resume--reset flag: Delete and recreategit fetch origin dev
git rev-list --count dev..origin/dev
If behind, pull latest:
git checkout dev && git pull origin dev
Create new worktree from dev using Worktrunk:
wt switch -c feat/{feature-name} --base dev
Branch Strategy:
dev (working branch)devdev → main for releasesFor each phase in the spec:
wt step commit --stage=modified # LLM-generated commit message
Make atomic commits per logical change:
# After completing a logical unit of work:
wt step commit --stage=modified # Generates: "feat(avatar): add S3 upload configuration"
Commit message format (auto-generated):
feat({scope}): {description}
fix({scope}): {description}
test({scope}): {description}
refactor({scope}): {description}
Before proceeding to PR:
Run validation:
bun run lint
bun run typecheck # if available
bun run test
bun run build
Ensure branch is pushed:
git push -u origin feat/{feature-name}
Create PR (targeting dev branch):
gh pr create --draft --base dev \
--title "feat({scope}): {description}" \
--body "## Summary
[Generated from spec - 2-3 sentences]
Implements: docs/specs/{feature-name}-spec.md
## Changes
- [Key change 1]
- [Key change 2]
- [Key change 3]
## Test Plan
- [ ] Unit tests added/updated
- [ ] Integration tests pass
- [ ] Manual testing completed
## Checklist
- [ ] Tests pass
- [ ] Lint passes
- [ ] Build succeeds
- [ ] Self-reviewed
- [ ] Docs updated (if needed)
---
**Spec**: docs/specs/{feature-name}-spec.md
**PRD**: docs/prds/{feature-name}.md
"
After PR is merged:
wt merge feat/{feature-name} # Squash, rebase, cleanup
Or manually:
wt remove feat/{feature-name} # Delete worktree and branch
Restore stashed changes if any:
git stash list # Check for auto-stash
git stash pop # If found
Keep PRs under 400 lines:
wt remove feat/{feature-name} # Clean up
wt switch -c feat/{feature-name} --base dev # Retry
User: /skill:feature user-avatar-upload
Pi: Loading spec from docs/specs/user-avatar-upload-spec.md...
Readiness Assessment:
✓ Implementation phases: 3 phases
✓ File targets: 8 files specified
✓ Acceptance criteria: 5 testable criteria
✓ No TBD sections
✓ No ambiguous language
✓ API contracts: Complete
✓ Data models: Defined
✓ Error handling: Covered
✓ Performance targets: Specified
Spec is implementation-ready.
Pre-flight checks:
✓ Working directory clean
✓ No existing worktree
✓ dev branch up-to-date
Creating worktree...
> wt switch -c feat/user-avatar-upload --base dev
Starting implementation...
User: /skill:feature user-notifications
Pi: Loading spec...
Readiness Assessment:
✓ Implementation phases: 3 phases
✓ File targets: specified
✗ TBD found: "Notification storage: TBD"
✗ Ambiguous: "might support email notifications"
✓ API contracts: Complete
The spec has gaps. Let me clarify:
Q: The spec says 'Notification storage: TBD'. What storage should we use?
User: PostgreSQL with a notifications table
Q: Should we include email notifications in this implementation?
User: No, just in-app for now
Updated spec. Re-running assessment...
✓ All critical checks pass
Proceeding with implementation...
/skill:plan - Planning workflow (PRD → Spec → Tasks)/skill:review-codebase - Review for improvement opportunities/skill:swarm - Parallel agent execution and orchestration