새 기능이나 기획을 시작하기 전에 대화로 목적, 선호, 제약을 정리합니다. 필요하면 그림이나 시제품으로 이해를 확인하고 작업 규모에 맞는 설계를 작성합니다.
- 새 기능의 목적 명확히 하기
- 강연이나 사업 아이디어 정리
- 화면이나 방의 배치 비교
구현이 끝나면 전체 테스트를 확인하고 로컬 병합, 풀 리퀘스트 생성, 현상 유지 중 선택한 작업을 수행합니다. 선택과 작업 환경에 따라 브랜치와 작업 공간을 정리합니다.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work
구현이 끝난 개발 브랜치의 테스트 확인부터 통합 방식 선택, 정리까지 진행합니다. 전체 테스트가 통과하는지 확인하고, 기본 작업 공간인지 별도 작업 공간인지, 이름이 있는 브랜치인지 살펴봅니다. 이후 로컬 병합, Pull Request 생성, 현상 유지 중에서 선택하도록 안내하고 선택한 작업을 수행합니다. 병합 후에는 테스트를 다시 실행하며, 통과한 뒤에 관련 작업 공간과 브랜치를 정리합니다.
개발을 마친 변경을 어떤 방식으로 통합할지 결정할 때 유용합니다. 리뷰에 사용할 작업 공간을 남겨 두거나, 커밋하지 않은 파일을 확인한 뒤 정리하는 절차도 포함합니다.
Pull Request를 만들어 주세요.”Git과 프로젝트 테스트 실행 환경이 필요합니다. 테스트가 실패하면 완료 절차를 중단합니다. Pull Request 생성에는 호스팅 서비스의 명령줄 도구 등을 사용하며 생성 후에도 작업 공간을 유지합니다. 브랜치에 속하지 않는 detached HEAD에서는 로컬 병합을 제시하지 않습니다. 변경 폐기는 명시적인 요청과 discard 확인 입력이 필요합니다.
이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.
AI가 SKILL.md의 내용만을 근거로 4가지 관점에서 판정했습니다. 스타 수나 인기도는 판정에 넣지 않았습니다.
총점은 각 항목을 A=25점, B=15점, C=5점으로 더한 값입니다. 2026년 10월 19일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Core principle: Verify tests → Detect environment → Present options → Execute choice → Clean up.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
Run the project's full test suite (npm test / cargo test / pytest / go test ./...).
If tests fail, report the failures and stop — the menu comes after a green suite:
Tests failing (<N> failures). Must fix before completing:
[Show failures]
If tests pass: continue to Step 2.
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
# Capture now, while still inside the workspace — Step 5 changes directory
# before cleanup (Step 6) needs this value
WORKTREE_PATH=$(git rev-parse --show-toplevel)
This determines which menu to show and how cleanup works:
| State | Menu | Cleanup |
|---|---|---|
GIT_DIR == GIT_COMMON (normal repo) | Standard 3 options | No worktree to clean up |
GIT_DIR != GIT_COMMON, named branch | Standard 3 options | Provenance-based (see Step 6) |
GIT_DIR != GIT_COMMON, detached HEAD | Reduced 2 options (no merge) | Externally managed — leave in place |
The base branch is whatever this work forked from — usually named in the plan, the conversation, or the branch's upstream. If it is not already known, ask: "This branch split from <your best guess> - is that correct?" Confirm before merging: merging into the wrong base is expensive to undo.
Normal repo and named-branch worktree — present exactly these 3 options:
Implementation complete. What would you like to do?
1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (I'll handle it later)
Which option?
Detached HEAD — present exactly these 2 options:
Implementation complete. You're on a detached HEAD (externally managed workspace).
1. Push as new branch and create a Pull Request
2. Keep as-is (I'll handle it later)
Which option?
Present the menu exactly as written — concise, with every option coming from the list above. Discarding the work happens only in response to your human partner explicitly asking for it (see "If your human partner asks to discard the work" below). Wait for their answer; the integration decision is theirs.
# Get main repo root for CWD safety
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"
# Merge first — verify success before removing anything
git checkout <base-branch>
git pull
git merge <feature-branch>
# Verify tests on merged result
<test command>
If tests fail on the merged result: stop, leave the worktree and branch in place, and investigate — nothing has been pushed, so the merge is local and recoverable.
Once the merged result is green: clean up the worktree (Step 6), then delete the branch:
git branch -d <feature-branch>
git push -u origin <feature-branch>
# From a detached HEAD, name the new branch on the remote:
# git push origin HEAD:refs/heads/<new-branch>
Then create the pull/merge request against <base-branch> with the forge's tooling — its CLI if one is available, or the creation URL most forges print when you push — following the repo's PR template and conventions if present, and report the URL to your human partner.
Keep the worktree — your human partner iterates on PR feedback there.
Report: "Keeping branch <name>. Worktree preserved at <path>."
This path exists only as a response to an explicit request to throw the work away. Confirm first:
This will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Worktree at <path>
Type 'discard' to confirm.
Wait for that exact confirmation. When it arrives:
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"
Then clean up the worktree (Step 6) and force-delete the branch:
git branch -D <feature-branch>
Runs for Option 1 and confirmed discards. Options 2 and 3 always
preserve the worktree. Both callers have already changed directory to the
main repo root — worktree removal must run from outside the worktree —
and use the GIT_DIR/GIT_COMMON/WORKTREE_PATH values captured in
Step 2, from before that directory change.
If GIT_DIR == GIT_COMMON: Normal repo, no worktree to clean up. Done.
If WORKTREE_PATH is under .worktrees/ or worktrees/: Superpowers
created this worktree — we own cleanup:
git worktree remove "$WORKTREE_PATH"
git worktree prune # Self-healing: clean up any stale registrations
If removal is refused (contains modified or untracked files): the
worktree holds files that exist nowhere else — uncommitted plans, notes,
or scratch work. Never --force on your own initiative. Show your human
partner what is at stake and ask:
git -C "$WORKTREE_PATH" status --porcelain -uall
Worktree removal refused — these files were never committed:
<file list>
1. Commit them to <branch> before cleanup
2. Move them into <main repo root>
3. Delete them (unrecoverable)
Which?
Carry out the choice, then remove the worktree.
Otherwise: The host environment owns this workspace — leave it in place. If your platform provides a workspace-exit tool, use it.
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|---|---|---|---|---|
| 1. Merge locally | yes | - | - | yes |
| 2. Create PR | - | yes | yes | - |
| 3. Keep as-is | - | - | yes | - |
| Discard (explicit request only) | - | - | - | yes (force) |
| Excuse | Reality |
|---|---|
| "Tests passed earlier this session" | Run the suite on the tree you are about to integrate. A green run only proves the tree it ran on. |
| "They obviously want it merged" | Integration is your human partner's decision. Present the menu and wait. |
| "They seem done with this feature — I'll offer to discard it" | The menu is complete as written. Discard happens only when your human partner asks for it in so many words. |
| "'Yeah, get rid of it' counts as confirmation" | Only the typed word discard authorizes deletion. |
| "The PR is up, so the worktree is clutter now" | PR feedback gets fixed in that worktree. It stays until the work lands. |
| "This other worktree looks stale — I'll clean it too" | Clean up only worktrees under .worktrees/ or worktrees/. Everything else belongs to the host. |
"Removal refused — --force is just finishing the cleanup" | The refusal means files exist only in that worktree. --force destroys them permanently. Show your human partner and ask. |
| "The merged-result failure is probably flaky" | A failing merged result stops everything. Branch and worktree stay put while you investigate. |
| "The base branch is obviously main" | Confirm the fork point or ask. Merging into the wrong base is expensive to undo. |
| "The push was rejected — force-push will fix it" | A rejected push means the remote moved. Investigate; force-push only on your human partner's explicit request. |
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
새 기능이나 기획을 시작하기 전에 대화로 목적, 선호, 제약을 정리합니다. 필요하면 그림이나 시제품으로 이해를 확인하고 작업 규모에 맞는 설계를 작성합니다.
superpowers 작업 기록을 읽고 중복 작업, 계획 이탈, 시간과 토큰 사용량을 조사합니다. 기록 파일의 경로와 줄 번호를 근거로 경위를 보고서로 정리합니다.
서로 독립적인 버그나 테스트 실패를 별도 에이전트에 맡겨 동시에 조사하고 수정합니다. 담당 범위를 정하고 결과 검토, 변경 충돌 확인, 전체 테스트와 통합까지 안내합니다.
같은 세션에서 기존 구현 계획을 작업별로 실행합니다. 테스트의 실패와 성공, 진행 상황과 판단을 기록하고 마지막에 브랜치 전체를 검토합니다.
코드 리뷰 의견을 실제 코드와 지원 환경에 대조해 타당성을 확인합니다. 불명확한 내용을 정리하고 근거를 들어 답변하며, 수정 사항마다 테스트합니다.
기능 구현 후나 병합 전에 별도 에이전트에 코드 리뷰를 요청합니다. 변경 내용과 요구 사항, 대상 커밋을 전달하고 지적된 문제의 심각도에 따라 수정을 진행합니다.