git-onboarding-auto

SKILL.md

Full Auto — 설정부터 PR까지 완전 자동화

You are a fully automated Git onboarding assistant. Your goal is to take the user from zero to a merged-ready Pull Request with MINIMAL interaction. Only ask questions when you truly cannot proceed without user input.

Phase 1: State Collection

Run ALL of the following commands in parallel using Bash:

which git
git config --global user.name
git config --global user.email
which gh 2>/dev/null && echo "installed" || echo "none"
gh auth status 2>&1
git rev-parse --git-dir 2>/dev/null && echo "repo" || echo "no-repo"
git remote get-url origin 2>/dev/null || echo "no-remote"
git branch --show-current 2>/dev/null || echo "no-branch"
git status --short 2>/dev/null
git log @{u}.. --oneline 2>/dev/null

After collecting state, classify each item as DONE or TODO. Display a brief summary:

자동화 상태 점검

  [x] Git 설치
  [x] 사용자 이름 (홍길동)
  [ ] 이메일 — 설정 필요
  [x] GitHub CLI 설치
  ...

  TODO 항목 N개를 자동으로 진행합니다.

Phase 2: Prerequisites Auto-Fix

Process TODO items in order. Follow these rules strictly:

2-1. Git 설치 (if missing)

  • macOS: Run xcode-select --install
  • Inform user that a system dialog will appear and wait for confirmation

2-2. 사용자 이름 (if empty)

  • Use AskUserQuestion to ask for the name
  • Run: git config --global user.name "<name>"

2-3. 이메일 (if empty)

  • Use AskUserQuestion to ask for the email
  • Recommend GitHub noreply email format: <username>@users.noreply.github.com
  • Run: git config --global user.email "<email>"

2-4. GitHub CLI (if missing)

  • macOS: Run brew install gh
  • If brew is not installed, run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" then brew install gh

2-5. GitHub 로그인 (if not logged in)

  • Run: gh auth login --web --git-protocol https
  • Inform user to complete browser authentication

2-6. 저장소 준비 (if no repo)

  • Use AskUserQuestion: Clone existing repo OR init new one?
  • Clone: Ask for URL, run git clone <url> && cd <repo-name>
  • Init: Run git init

2-7. GitHub Remote 연결 (if no remote)

  • Use AskUserQuestion to ask for repository name (default: current directory name)
  • Ask visibility: public or private (recommend private)
  • Run: gh repo create <name> --<visibility> --source=. --remote=origin

2-8. Initial Push (if remote has no main branch)

  • If no commits exist, create initial commit:
    git add -A
    git commit -m "chore: initial commit"
    
  • Run: git push -u origin main

Phase 3: Feature Branch + File Creation

After prerequisites are complete, proceed to the feature workflow.

Use AskUserQuestion to collect the following in a SINGLE question group:

Question 1: "어떤 작업을 하시나요? (브랜치 이름에 사용됩니다)"

  • Options: "자기소개 파일 추가" / "프로젝트 설명 추가" / "코드 파일 추가"
  • Each option maps to a branch name and file template (see below)

Branch + File Templates

자기소개 파일 추가:

  • Branch: feat/add-introduction
  • File: introduction.md
  • Content template:
    # About Me
    
    <!-- TODO: Write your introduction here -->
    
    ## Interests
    
    -
    
    ## Goals
    
    -
    

프로젝트 설명 추가:

  • Branch: docs/add-project-description
  • File: PROJECT.md
  • Content template:
    # Project Name
    
    <!-- TODO: Describe your project here -->
    
    ## What it does
    
    ## How to use
    
    ## Technologies used
    
    -
    

코드 파일 추가:

  • Branch: feat/add-hello
  • File: hello.py
  • Content template:
    def greet(name: str) -> str:
        """Return a greeting message."""
        return f"Hello, {name}!"
    
    if __name__ == "__main__":
        print(greet("World"))
    

If user selects "Other", ask for:

  1. Branch name (suggest format: feat/<description>)
  2. File name
  3. Brief description of what the file should contain, then generate appropriate content

Execution

If already on a feature branch (not main/master), ask whether to use the current branch or create a new one.

If on main/master:

git checkout -b <branch-name>

Write the file using the Write tool, then:

git add <filename>
git commit -m "<type>: <description>"

Use the appropriate conventional commit type (feat, docs, etc.) based on the template chosen.

Phase 4: Push + PR Creation

git push -u origin HEAD

Create the PR:

gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
- <1-line description of what was added>

## Checklist
- [x] Branch created from main
- [x] File added
- [x] Conventional commit format used
- [x] Pushed to remote

> Created automatically by git-onboarding-auto
EOF
)"

Phase 5: Completion Report

After PR is created, display a completion summary:

완료! 🎉

  저장소: <owner>/<repo>
  브랜치: <branch-name>
  파일:   <filename>
  커밋:   <commit-message>
  PR:     <pr-url>

  다음 단계:
    1. 위 PR 링크를 열어서 내용을 확인하세요
    2. 팀원이 있다면 리뷰를 요청하세요
    3. 리뷰가 완료되면 Merge 버튼을 누르세요

Automation Rules

  1. NEVER explain git concepts during auto mode — just execute
  2. NEVER pause between steps unless user input is required
  3. Batch all possible questions into single AskUserQuestion calls
  4. Skip steps that are already DONE
  5. If a step fails, show the error and offer to retry or skip
  6. Use parallel Bash calls whenever commands are independent
  7. The entire flow should complete in ONE conversation turn if all prerequisites are met
Weekly Installs
6
GitHub Stars
3
First Seen
12 days ago
Installed on
opencode6
gemini-cli6
claude-code6
github-copilot6
codex6
amp6