Implements a GitHub user story from planning through PR creation, with research, codebase analysis, and structured commits.
62
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/implement-story/SKILL.mdTakes a GitHub user story issue and produces well-organized PR(s) that reliably meet the acceptance criteria.
The user provides a GitHub issue number or URL. Example:
/implement-story #4550
/implement-story https://github.com/stacklok/toolhive/issues/4550Fetch the issue body using GitHub tools. Extract:
If the issue links to an RFC (look for THV-XXXX references or links to toolhive-rfcs):
../toolhive-rfcs/ first)If no RFC is linked, skip this step.
Search for sibling stories that share context with this one. These inform how to factor the code for extensibility:
# Search by keywords from the issue title
gh search issues "<keywords>" --repo stacklok/toolhive --state open --limit 10
# Search for issues linking to the same RFC
gh search issues "THV-XXXX" --repo stacklok/toolhive --limit 10For each related story, read its acceptance criteria. Ask:
Do not implement sibling stories. Design internal interfaces so they can be extended without refactoring, but do not add config fields, CRD types, or user-facing API surface for functionality that isn't implemented in this PR. Unused config confuses users and reviewers.
Use the Explore agent or direct search to understand:
Document your findings before writing any code.
For each acceptance criterion, identify:
Evaluate the total scope against the project's PR guidelines:
If the story fits in one PR, use a single PR. If not, split into multiple PRs following these patterns:
task operator-manifests operator-generate output in the same PRFirst, show the user a high-level plan covering PR boundaries and what each PR delivers. Do NOT include commit-level details yet — get alignment on the split first.
## Implementation Plan
**Story**: #XXXX — [title]
**PRs**: [1 or N]
### PR 1: [title]
- [what this PR introduces and why]
- **AC covered**: [which acceptance criteria]
### PR 2: [title] (if needed)
- [what this PR introduces and why]
- **AC covered**: [which acceptance criteria]Wait for user approval on the PR split. Adjust if the user has feedback.
Once the user approves the high-level split, enter plan mode for the first PR. In plan mode, explore the codebase and design commit boundaries, file changes, and test strategy. Present the detailed plan for user approval before writing code.
For subsequent PRs, enter plan mode again once CI is green for the previous PR.
git checkout -b <user>/<short-description> mainImplement the changes from the plan. Follow these principles:
Follow the commit boundaries from the plan. Each commit should:
go build ./... passes)After changes that affect generated artifacts, run the appropriate tasks:
| Change Type | Regeneration Command |
|---|---|
CRD type definitions (api/v1beta1/*_types.go) | task operator-manifests operator-generate |
| Mock interfaces | task gen |
| CLI commands or API endpoints | task docs |
| Helm chart values | task helm-docs |
| Any Go file | task license-fix |
Run these before committing the related changes. Include the generated output in the same commit as the trigger.
Follow the PR template at .github/pull_request_template.md and the rules in .claude/rules/pr-creation.md:
Closes #XXXXBefore submitting, review each acceptance criterion from the issue:
If any AC is not covered, either implement it or flag it to the user with a reason.
After pushing, monitor CI status:
gh pr checks <pr-number> --repo stacklok/toolhive --watchIf CI fails:
If the story spans multiple PRs:
mainmainPart of #XXXX)Closes #XXXXcd373ec
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.