Community코딩 & 개발github.com

alfathafp/portofolio-web-design

구현이 완료되고 모든 테스트를 통과했을 때, 작업을 통합하는 방법을 결정하기 위해 사용합니다.

portofolio-web-design란 무엇인가요?

이 스킬은 개발 브랜치의 작업을 완료하고 통합하는 표준화된 워크플로우를 제공합니다. 핵심 원칙은 '테스트 검증 → 환경 감지 → 옵션 제시 → 선택 실행 → 정리'의 5단계로 구성됩니다. 이 스킬은 Git 저장소 유형(일반 저장소, 워크트리, 분리된 HEAD)을 자동으로 감지하여 적절한 메뉴(병합, PR 생성, 유지, 폐기)를 사용자에게 제시합니다. 특히 분리된 HEAD 환경에서는 워크트리를 유지하는 축소된 옵션을 제공합니다. 또한, 병합 후 테스트 실패 시에는 중단하고 조사하도록 하며, '폐기'는 사용자의 명시적인 'discard' 입력이 있을 때만 수행하도록 설계되어 안전한 작업 통합이 가능합니다. 이 스킬은 Claude Code, Cursor, Codex 등 AI 코딩 어시스턴트 환경에서 개발 브랜치를 마무리할 때 일관된 프로세스를 강제하여 실수를 방지합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/finishing-a-development-branch

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

개발 브랜치 마무리하기

개요

핵심 원칙: 테스트 검증 → 환경 감지 → 옵션 제시 → 선택 실행 → 정리.

시작 시 알림: "개발 브랜치 마무리 스킬을 사용하여 이 작업을 완료합니다."

1단계: 테스트 검증

프로젝트의 전체 테스트 스위트를 실행합니다 (npm test / cargo test / pytest / go test ./...).

테스트가 실패하면, 실패 내용을 보고하고 중단합니다 — 메뉴는 모든 테스트가 통과된 후에 나타납니다:

테스트 실패 (<N>개 실패). 완료하려면 먼저 수정해야 합니다:

[실패 내용 표시]

테스트가 통과하면: 2단계로 계속 진행합니다.

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)
# 워크스페이스 내부에 있는 동안 지금 값을 캡처합니다 — 5단계에서 디렉터리를 변경하기 전에
# 정리(6단계)가 이 값을 필요로 합니다
WORKTREE_PATH=$(git rev-parse --show-toplevel)

이 정보를 통해 표시할 메뉴와 정리 방식을 결정합니다:

상태메뉴정리
GIT_DIR == GIT_COMMON (일반 저장소)표준 3개 옵션정리할 워크트리 없음
GIT_DIR != GIT_COMMON, 이름 있는 브랜치표준 3개 옵션출처 기반 (6단계 참조)
GIT_DIR != GIT_COMMON, 분리된 HEAD축소된 2개 옵션 (머지 없음)외부 관리 — 그대로 둠

3단계: 기준 브랜치 결정

기준 브랜치는 이 작업이 분기된 브랜치로, 일반적으로 계획, 대화 또는 브랜치의 업스트림에 명시되어 있습니다. 아직 알려지지 않은 경우 "이 브랜치는 <최선의 추측>에서 분기되었습니다 — 맞습니까?"라고 물어보세요. 병합 전에 확인하세요: 잘못된 기준 브랜치로 병합하면 되돌리기가 어렵습니다.

4단계: 옵션 제시

일반 저장소 및 이름 있는 브랜치 워크트리 — 정확히 다음 3가지 옵션을 제시:

구현이 완료되었습니다. 어떻게 하시겠습니까?

1. <기준-브랜치>에 로컬로 병합
2. 푸시하고 Pull Request 생성
3. 브랜치를 그대로 유지 (나중에 처리하겠습니다)

어떤 옵션을 선택하시겠습니까?

분리된 HEAD — 정확히 다음 2가지 옵션을 제시:

구현이 완료되었습니다. 분리된 HEAD(외부 관리 워크스페이스)에 있습니다.

1. 새 브랜치로 푸시하고 Pull Request 생성
2. 그대로 유지 (나중에 처리하겠습니다)

어떤 옵션을 선택하시겠습니까?

메뉴를 작성된 그대로 제시하세요 — 간결하게, 모든 옵션은 위 목록에서 가져와야 합니다. 작업 폐기는 사용자 파트너가 명시적으로 요청할 때만 발생합니다 (아래 "사용자 파트너가 작업 폐기를 요청하는 경우" 참조). 답변을 기다리세요; 통합 결정은 사용자의 몫입니다.

5단계: 선택 실행

옵션 1: 로컬로 병합

# CWD 안전을 위해 메인 저장소 루트 획득
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"

# 먼저 병합 — 제거하기 전에 성공 확인
git checkout <기준-브랜치>
git pull
git merge <기능-브랜치>

# 병합 결과에 대한 테스트 검증
<테스트 명령어>

병합 결과에서 테스트가 실패하면: 중단하고, 워크트리와 브랜치를 그대로 두고 조사합니다 — 아직 푸시되지 않았으므로 병합은 로컬이며 복구 가능합니다.

병합 결과가 통과되면: 워크트리를 정리(6단계)한 후 브랜치를 삭제합니다:

git branch -d <기능-브랜치>

옵션 2: 푸시하고 PR 생성

git push -u origin <기능-브랜치>
# 분리된 HEAD에서 리모트에 새 브랜치 이름 지정:
# git push origin HEAD:refs/heads/<새-브랜치>

그런 다음 <기준-브랜치>에 대해 forge의 도구를 사용하여 풀/병합 요청을 생성합니다 — CLI가 있으면 그것을 사용하고, 없으면 대부분의 forge가 푸시 시 출력하는 생성 URL을 사용합니다 — 저장소의 PR 템플릿과 규칙이 있다면 따르고, URL을 사용자 파트너에게 보고합니다.

워크트리를 유지합니다 — 사용자 파트너가 PR 피드백을 그곳에서 반복합니다.

옵션 3: 그대로 유지

보고: "브랜치 <이름>을 유지합니다. 워크트리가 <경로>에 보존되었습니다."

사용자 파트너가 작업 폐기를 요청하는 경우

이 경로는 작업을 폐기하라는 명시적인 요청에 대한 응답으로만 존재합니다. 먼저 확인하세요:

이 작업은 영구적으로 삭제됩니다:
- 브랜치 <이름>
- 모든 커밋: <커밋-목록>
- <경로>의 워크트리

확인하려면 'discard'를 입력하세요.

정확히 그 확인을 기다리세요. 확인이 오면:

MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
cd "$MAIN_ROOT"

그런 다음 워크트리를 정리(6단계)하고 브랜치를 강제 삭제합니다:

git branch -D <기능-브랜치>

6단계: 워크스페이스 정리

옵션 1 및 확인된 폐기에 대해 실행됩니다. 옵션 2와 3은 항상 워크트리를 유지합니다. 두 호출자 모두 이미 메인 저장소 루트로 디렉터리를 변경했습니다 — 워크트리 제거는 워크트리 외부에서 실행해야 합니다 — 그리고 2단계에서 캡처한 GIT_DIR/GIT_COMMON/WORKTREE_PATH 값을 사용합니다 (디렉터리 변경 전의 값).

GIT_DIR == GIT_COMMON인 경우: 일반 저장소, 정리할 워크트리 없음. 완료.

WORKTREE_PATH가 .worktrees/ 또는 worktrees/ 아래에 있는 경우: Superpowers가 이 워크트리를 생성했습니다 — 정리 책임이 있습니다:

git worktree remove "$WORKTREE_PATH"
git worktree prune  # 자가 치유: 오래된 등록 정리

제거가 거부된 경우 (modified or untracked files 포함): 워크트리에 다른 곳에는 없는 파일이 있습니다 — 커밋되지 않은 계획, 메모 또는 작업 파일입니다. 스스로 --force를 사용하지 마세요. 사용자 파트너에게 무엇이 문제인지 보여주고 물어보세요:

git -C "$WORKTREE_PATH" status --porcelain -uall
워크트리 제거가 거부되었습니다 — 다음 파일은 한 번도 커밋되지 않았습니다:

<파일 목록>

1. 정리 전에 <브랜치>에 커밋합니다
2. <메인 저장소 루트>로 이동합니다
3. 삭제합니다 (복구 불가)

어떻게 하시겠습니까?

선택을 수행한 후 워크트리를 제거합니다.

그 외의 경우: 호스트 환경이 이 워크스페이스를 소유합니다 — 그대로 둡니다. 플랫폼에서 워크스페이스 종료 도구를 제공하는 경우 그것을 사용합니다.

빠른 참조

옵션병합푸시워크트리 유지브랜치 정리
1. 로컬로 병합예--예
2. PR 생성-예예-
3. 그대로 유지--예-
폐기 (명시적 요청만)---예 (강제)

일반적인 합리화

변명현실
"이번 세션 초반에 테스트가 통과했었어"통합하려는 트리에서 스위트를 실행하세요. 통과한 실행은 실행된 트리만 증명합니다.
"그들이 분명히 병합을 원할 거야"통합은 사용자 파트너의 결정입니다. 메뉴를 제시하고 기다리세요.
"이 기능이 완료된 것 같아 — 폐기하겠다고 제안할게"메뉴는 작성된 대로 완전합니다. 폐기는 사용자 파트너가 명시적으로 요청할 때만 발생합니다.
"'응, 없애'가 확인으로 간주됩니다"오직 입력된 단어 discard만 삭제를 승인합니다.
"PR이 올라갔으니 워크트리는 이제 잡동사니야"PR 피드백은 그 워크트리에서 수정됩니다. 작업이 완료될 때까지 유지됩니다.
"이 다른 워크트리가 오래된 것 같아 — 나도 정리할게".worktrees/ 또는 worktrees/ 아래의 워크트리만 정리하세요. 나머지는 모두 호스트에 속합니다.
"제거가 거부됐어 — --force는 정리를 마무리하는 것뿐이야"거부는 파일이 해당 워크트리에만 존재한다는 것을 의미합니다. --force는 파일을 영구적으로 파괴합니다. 사용자 파트너에게 보여주고 물어보세요.
"병합 결과 실패는 아플리케이션 문제일 거야"병합 결과 실패는 모든 것을 중단시킵니다. 브랜치와 워크트리는 조사하는 동안 그대로 둡니다.
"기준 브랜치는 분명히 main이야"분기점을 확인하거나 물어보세요. 잘못된 기준 브랜치로 병합하면 되돌리기가 어렵습니다.
"푸시가 거부됐어 — 강제 푸시로 해결할게"푸시 거부는 리모트가 이동했음을 의미합니다. 조사하세요; 강제 푸시는 사용자 파트너의 명시적 요청이 있을 때만 수행합니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step.

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

관련 스킬