feature-complete
GitHub用于完成功能开发:验证代码、提交更改、推送分支并创建 GitHub PR。不执行合并,由 Adnan 审查后手动 Squash Merge。若在主分支或验证失败则拒绝操作。
Trigger Scenarios
Install
npx skills add NeverSight/learn-skills.dev --skill feature-complete -g -y
SKILL.md
Frontmatter
{
"name": "feature-complete",
"description": "Commit all working changes on the current branch, push to origin, and open a GitHub PR against main using the loaded spec for context. Adnan reviews and squash-merges manually on GitHub.",
"argument-hint": [
"<type: PR title>"
],
"disable-model-invocation": true
}
/feature-complete
Wraps up a feature: commits any uncommitted work, pushes the branch, and opens a PR. Does not merge — Adnan reviews and squash-merges on GitHub.
Preconditions
- Must be on a feature branch, not
main. Verify withgit rev-parse --abbrev-ref HEAD. If onmain, refuse:Cannot complete from main. Run /feature-load + /feature-start first. .claude/current-feature.mdshould exist for context. If missing, warn but proceed (the user may have rungitcommands manually).
Steps
-
Run the full validation suite by invoking the same checks as
/feature-test:npm run typecheck && npm run lint && npm run build && npm run test && npm run test:e2eSTOP on any failure. Do not commit. Do not push. Surface the failure and tell the user to fix before re-running.
-
Determine PR title.
- If
$ARGUMENTSis provided, use it. Must match^(feat|fix|chore|docs|refactor|perf|style|test|build|ci): .+$, ≤72 chars. - If
$ARGUMENTSis empty, derive from.claude/current-feature.md'stypeandtitlefields:<type>: <title>(lowercase first word, truncate to 72 chars).
- If
-
Commit any uncommitted changes.
git status --porcelain— if non-empty, stage + commit. Otherwise skip.- Subject: the PR title (or a
chore: tidy up before PRif these are last-minute fixups). - Body: 1–3 bullets describing the final changes.
- NEVER add
Co-Authored-By: Claude …or bot footers.
-
Push the branch.
git push -u origin HEAD -
Build the PR body. Draw from the loaded spec + the diff vs main:
## Summary - <bullet — what the PR does, in plain English> - <bullet — why, if not obvious from the spec> - <bullet — any noteworthy implementation choice> ## Spec <one-paragraph quote or summary of the spec from .claude/current-feature.md> ## Test plan - [ ] `npm run test:all` passes - [ ] (manual) <one or two feature-specific checks from the spec>NEVER add a "🤖 Generated with Claude Code" footer.
-
Open the PR.
gh pr create --base main --title "<title>" --body "$(cat <<'EOF' <body> EOF )" -
Report the PR URL in one line.
-
Return to main. Run
git switch main && git pullso the working tree is clean for the next/feature-load. -
Clean up stale branches (local + remote). Run
npm run clean:branches. Two cleanup cases:- Local — force-deletes any local branch whose origin counterpart is gone (typically previously-merged PRs; squash-merge creates a new commit on
mainsogit branch -ddoesn't recognize the merge and refuses; the upstream-gone signal is the strongest proof the work has landed). - Remote — deletes any remote branch on
originwhose PR is MERGED on GitHub. Belt-and-suspenders for the rare case auto-delete-on-merge didn't fire (setting was off when the PR merged, or the branch was re-pushed after merge).
The branch from the PR just opened is not stale yet — its remote is alive, its PR is open — so it survives this cleanup and will be reaped on the next
/feature-completeafter Adnan merges it. - Local — force-deletes any local branch whose origin counterpart is gone (typically previously-merged PRs; squash-merge creates a new commit on
What this skill does NOT do
- Does not merge the PR — Adnan reviews and squash-merges on GitHub manually.
- Does not delete the local branch for the PR it just opened — the upstream is still alive. Cleanup happens on the next
/feature-completerun, after Adnan has merged this PR. - Does not delete
.claude/current-feature.md— left in place until the next/feature-load. - Does not approve its own PR (impossible on GitHub for the PR author anyway).
Version History
- e0220ca Current 2026-07-05 23:25


