| name | git |
| description | Automate Git workflow for AgentOS. Handles branch creation, TODO-based commits, and PR generation following project conventions. |
Git Workflow Skill
Description
AgentOS 프로젝트의 형상관리 워크플로우를 자동화합니다. 브랜치 생성, TODO별 커밋, PR 생성을 프로젝트 컨벤션에 맞게 처리합니다.
이 스킬이 실행되는 경우:
- "커밋 만들어줘", "변경사항 커밋해줘"
- "PR 만들어줘", "Pull Request 생성"
- "브랜치 만들어줘"
- 작업 완료 후 자동 커밋/PR 필요 시
Workflow
1. 현재 상황 파악
먼저 Git 상태를 확인합니다:
# 현재 브랜치 확인
git branch --show-current
# 변경사항 확인
git status
# 최근 커밋 확인
git log --oneline -5
2. 상황별 Decision Tree
Case 1: 브랜치가 없거나 main 브랜치인 경우
→ 브랜치 생성
Case 2: 작업 중 (변경사항 있음)
→ TODO별 커밋
Case 3: 모든 TODO 완료 (기능 완성)
→ PR 생성
브랜치 생성 워크플로우
브랜치 명명 규칙
기능 타입에 따라 적절한 접두사 사용:
| 타입 | 접두사 | 예시 |
|---|---|---|
| UX 기능 | feature/ux-* |
feature/ux-command-palette |
| 컴포넌트 | feature/component-* |
feature/component-settings-panel |
| Core 로직 | feature/* |
feature/redis-chat-session |
| 버그 수정 | fix/* |
fix/chatapp-state-sync |
| 성능 개선 | perf/* |
perf/virtual-scrolling |
| 리팩터링 | refactor/* |
refactor/component-separation |
실행 절차
# 1. main 브랜치 최신화
git checkout main
git pull origin main
# 2. 새 브랜치 생성
git checkout -b feature/descriptive-name
상세 가이드: 브랜치 전략
TODO별 커밋 워크플로우
커밋 메시지 형식
TODO 진행 중:
🚧 [TODO 2/5] WIP: Implement keyboard shortcuts
- Add global keyboard event listener
- Register Cmd+K shortcut
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
TODO 완료:
✅ [TODO 2/5] Complete keyboard shortcut implementation
- Global keyboard event listener
- Cmd+K shortcut registration
- kbar integration
- Prevent default browser behavior
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
전체 기능 완료:
🎉 [FEATURE] Complete Command Palette system implementation
- Cmd+K keyboard shortcut for instant access
- Categories: chat, settings, navigation, mcp
- Real-time search with fuzzy matching
- Context-aware command suggestions
- Integration with app state and navigation
Resolves: GUI_CYCLIC_UX_REDESIGN_PLAN.md Phase 1 Task 1
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
실행 절차
# 1. 변경사항 스테이징
git add .
# 2. 커밋 (heredoc 사용)
git commit -m "$(cat <<'EOF'
✅ [TODO x/y] Description
- Implementation detail 1
- Implementation detail 2
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
상세 가이드: TODO별 커밋 전략
PR 생성 워크플로우
PR 생성 전 체크리스트
자동으로 다음 사항을 확인:
- 모든 TODO가 완료되었는가?
- Plan 문서가
docs/로 승격되었는가? (plan/ 파일 삭제) - 브랜치가 원격에 푸시되었는가?
PR 본문 구조
GitHub PR 템플릿(.github/pull_request_template.md)을 기반으로 작성:
## Context
- Plan: `plan/feature-name.md` → `docs/path/feature-name.md` (승격 완료)
- Scope: Command Palette implementation
## Requirements
- ✅ Cmd+K 단축키로 즉시 접근
- ✅ 카테고리별 명령어 정리
- ✅ 실시간 퍼지 검색
## TODO Status
- [x] TODO 1/4: kbar 라이브러리 통합
- [x] TODO 2/4: 명령어 액션 구현
- [x] TODO 3/4: 카테고리 및 검색 기능
- [x] TODO 4/4: 앱 상태 통합
## Changes
- Command Palette 시스템 구현
- kbar 통합 및 키보드 단축키
- 카테고리별 명령어 관리
- 퍼지 검색 기능
## Docs
- Plan→Docs 승격: ✅ 완료
- 경로: `docs/apps/gui/frontend/command-palette.md`
- 기존 문서 병합: N/A
## Risks/Notes
- 기존 단축키와 충돌 가능성 확인 필요
실행 절차
# 1. 원격 브랜치에 push
git push origin feature/branch-name
# 2. PR 생성 (웹 브라우저에서 템플릿 자동 적용)
gh pr create --title "Add Command Palette system" --web
# 또는 CLI로 템플릿 사용
gh pr create --title "Add Command Palette system" \
--body-file .github/pull_request_template.md --web
상세 가이드: Pull Request 생성
금지 사항 (Critical)
❌ 절대 실행 금지 명령어
# 1. 직접 병합 금지
git checkout main
git merge feature/branch-name # ❌ 절대 금지!
# 2. main 브랜치 직접 push 금지
git push origin main # ❌ 절대 금지!
# 3. PR 승인 전 브랜치 삭제 금지
git branch -d feature/branch # ❌ 절대 금지!
# 4. Hook 우회 금지
git commit --no-verify # ❌ 절대 금지!
git push --no-verify # ❌ 절대 금지!
# 5. force push 금지 (main)
git push --force origin main # ❌ 절대 금지!
✅ 올바른 프로세스
# 1. 브랜치에서 작업 완료
git push origin feature/branch-name
# 2. Pull Request 생성
gh pr create --web
# 3. PR 승인 대기 (브랜치 유지!)
# 4. GitHub에서 Merge 버튼 클릭
# 5. 그 후에만 로컬 브랜치 정리
git checkout main
git pull origin main
git branch -d feature/branch-name
상세 금지 사항: 절대 금지 사항
Decision Matrix
| 상황 | 현재 브랜치 | 변경사항 | TODO 상태 | 액션 | 가이드 링크 |
|---|---|---|---|---|---|
| 작업 시작 | main |
없음 | - | 브랜치 생성 | 브랜치 전략 |
| TODO 진행 중 | feature/* |
있음 | 진행 중 | WIP 커밋 | 커밋 전략 |
| TODO 완료 | feature/* |
있음 | 완료 | TODO 완료 커밋 | 커밋 전략 |
| 기능 완료 | feature/* |
모두 커밋됨 | 전체 완료 | PR 생성 | PR 체크리스트 |
Quick Actions
상황별 즉시 실행 명령어
브랜치 생성
git checkout main && git pull origin main
git checkout -b feature/descriptive-name
TODO 커밋
git add .
git commit -m "$(cat <<'EOF'
✅ [TODO x/y] Description
- Detail 1
- Detail 2
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
기능 완료 커밋
git add .
git commit -m "$(cat <<'EOF'
🎉 [FEATURE] Complete feature implementation
- Key achievement 1
- Key achievement 2
- Key achievement 3
Resolves: PLAN_FILE.md
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
PR 생성
git push origin $(git branch --show-current)
gh pr create --web
Examples
Example 1: 새 기능 개발 전체 플로우
# 1. 브랜치 생성
git checkout main
git pull origin main
git checkout -b feature/ux-command-palette
# 2. TODO 1 완료 후 커밋
git add .
git commit -m "✅ [TODO 1/4] Add kbar library integration
- Install kbar dependencies
- Basic setup and configuration
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>"
# 3. TODO 2 완료 후 커밋
git add .
git commit -m "✅ [TODO 2/4] Implement command actions
- Command action handlers
- Keyboard shortcuts (Cmd+K)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>"
# 4. 전체 완료
git add .
git commit -m "🎉 [FEATURE] Complete Command Palette system
- Cmd+K instant access
- Categories and search
- App state integration
Resolves: GUI_CYCLIC_UX_REDESIGN_PLAN.md
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>"
# 5. PR 생성
git push origin feature/ux-command-palette
gh pr create --web
Example 2: 버그 수정
# 1. 브랜치 생성
git checkout -b fix/chatapp-state-sync
# 2. 수정 후 커밋
git add .
git commit -m "fix: resolve chat state synchronization issue
- Fix race condition in state update
- Add proper event listeners cleanup
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>"
# 3. PR 생성
git push origin fix/chatapp-state-sync
gh pr create --web
참고 문서
전체 Git 워크플로우 가이드:
핵심 원칙
- 작은 단위, 자주 커밋: TODO별로 명확한 진행상황 추적
- PR Only: 모든 병합은 반드시 Pull Request를 통해서만
- 브랜치 보호: PR 승인 전까지 절대 삭제 금지
- 문서 동기화: Plan→Docs 승격 및 기존 문서 병합