Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .claude/skills/commit/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Smart Commit

Conventional Commits 형식으로 Git 커밋을 생성한다.

**When to Use:** "커밋해줘", "반영해", "commit", 변경사항 저장
**Not for:** PR 생성 (-> `create-pr`)

---
Comment on lines +6 to +13
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 스킬 문서는 다른 스킬들처럼 YAML frontmatter(---\nname: ...\ndescription: ...\nargument-hint: ...\n---)가 없습니다. 현재 .claude/skills/*/SKILL.md 대부분이 frontmatter를 사용하고 있어(예: setup, run-scenario), 메타데이터 누락 시 스킬 인식/검색이 실패할 수 있으니 동일한 형식으로 추가해 주세요.

Copilot uses AI. Check for mistakes.

## Commit Types

| Type | 설명 |
|------|------|
| `feat` | 새로운 기능 추가 |
| `fix` | 버그 수정 |
| `docs` | 문서 변경 |
| `refactor` | 리팩토링 |
| `test` | 테스트 코드 추가/수정 |
| `chore` | 빌드, 설정, 기타 |

## Commit Format

```
<type>: <description>

[optional body]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
```

---

## Execution Steps

### 1. 변경사항 분석

```bash
git status
git diff --staged
git diff
git log --oneline -5
```

### 2. Type 결정

| 변경 내용 | 권장 타입 |
|----------|----------|
| 새 기능/액션 추가 | `feat` |
| 버그 수정 | `fix` |
| 문서 변경 (README, docs/) | `docs` |
| 코드 구조 개선 | `refactor` |
| 테스트 코드 | `test` |
| 설정, 스킬, 기타 | `chore` |

> 소스코드 + 문서가 함께 변경되면 소스코드의 type을 따른다. 문서만 변경 시 `docs`.

### 3. 커밋 메시지 생성 규칙

```
- Header 72자 이하
- 한글 또는 영문 (프로젝트 기존 커밋 스타일 따름)
- 끝에 마침표 없음
- Body에 주요 변경 항목 나열 (선택)
```

### 4. 파일 스테이징 및 커밋

자동 생성 파일(`.serena/project.yml` 등)은 제외한다.

```bash
git add <relevant-files>
git commit -m "$(cat <<'EOF'
<type>: <description>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"
```

### 5. 검증

```bash
git status
git log --oneline -1
```

---

## Examples

```bash
feat: CLICK_SNAPSHOT_TEXT 퍼지 매칭 액션 추가
fix: CDP 직접 입력에서 특수문자 이스케이프 오류 수정
docs: README 범용 프레임워크 구조로 전면 재작성
refactor: 하드코딩된 자격증명을 환경변수로 분리
test: 시나리오 파서 단위 테스트 추가
chore: requirements.txt websocket-client 추가
```

---

**Related Skills:**
- [create-pr](../create-pr/SKILL.md) - PR 생성
114 changes: 114 additions & 0 deletions .claude/skills/create-pr/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Create Pull Request

GitHub에 PR을 생성하고 설명을 자동 생성한다.

**When to Use:** "PR 만들어줘", "풀리퀘", "PR 생성", "github 반영"
**Not for:** 커밋 (-> `commit`)

---
Comment on lines +6 to +13
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 스킬 문서는 다른 스킬들처럼 YAML frontmatter(---\nname: ...\ndescription: ...\nargument-hint: ...\n---)가 없습니다. 현재 .claude/skills/*/SKILL.md 대부분이 frontmatter를 사용하고 있어(예: setup, run-scenario), 메타데이터 누락 시 스킬 인식/검색이 실패할 수 있으니 동일한 형식으로 추가해 주세요.

Copilot uses AI. Check for mistakes.

## Branch Naming Convention

| Type | Branch Pattern | Example |
|------|---------------|---------|
| `feat` | `feat/<description>` | `feat/snapshot-text-action` |
| `fix` | `fix/<description>` | `fix/cdp-special-char` |
| `docs` | `docs/<description>` | `docs/readme-rewrite` |
| `refactor` | `refactor/<description>` | `refactor/env-credentials` |
| `test` | `test/<description>` | `test/parser-unit-tests` |
| `chore` | `chore/<description>` | `chore/deps-update` |

---

## Execution Steps

### 1. 현재 상태 확인

```bash
git status
git diff --staged
git diff
git branch --show-current
git log main..HEAD --oneline
git diff main...HEAD --stat
```

- 미커밋 변경이 있으면 `/commit` 스킬을 먼저 안내한다.
- 현재 브랜치가 `main`이면 새 브랜치 생성을 안내한다.

### 2. 변경사항 분석

```bash
git diff main...HEAD
git log main..HEAD --oneline
```

전체 커밋 히스토리를 분석하여 PR 제목과 설명을 결정한다.

### 3. PR 제목 결정

```
<type>: <description>
```

- 72자 이하
- Conventional Commit 형식
- 커밋이 여러 개면 전체 변경을 아우르는 제목

### 4. PR 설명 생성

```markdown
## Summary
- 변경 항목 1
- 변경 항목 2
- 변경 항목 3

## Test plan
- [ ] 테스트 항목 1
- [ ] 테스트 항목 2
```

### 5. Push 및 PR 생성

```bash
# remote에 push (필요한 경우)
git push -u origin <branch-name>

# PR 생성
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
- ...

## Test plan
- [ ] ...

🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
```

### 6. 검증

```bash
gh pr view --json url,title,body
```

PR URL을 사용자에게 출력한다.

---

## Checklist

```
- [ ] 미커밋 변경 없음
- [ ] 브랜치 컨벤션 준수
- [ ] remote push 완료
- [ ] PR 제목 Conventional Commit 형식
- [ ] PR 설명에 Summary + Test plan 포함
- [ ] PR URL 출력
```

---

**Related Skills:**
- [commit](../commit/SKILL.md) - 커밋 생성
16 changes: 16 additions & 0 deletions .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Auto approve

on:
pull_request:
types: [opened, edited]

jobs:
auto-approve:
runs-on: ubuntu-latest
steps:
- name: Auto approve if title contains "chore" or "docs" or "revert" or "test"
if: contains(github.event.pull_request.title, 'chore') ||
contains(github.event.pull_request.title, 'docs') ||
contains(github.event.pull_request.title, 'revert') ||
contains(github.event.pull_request.title, 'test')
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

자동 승인 조건이 PR 제목의 substring 매칭(contains)에만 의존합니다. 이 방식은 docs:가 제목에 포함된 코드 변경 PR까지 승인될 수 있어 위험하고, 또한 대소문자/부분문자열 매칭으로 오탐이 발생할 수 있습니다. 최소한 startsWith(toLower(title), 'docs:')처럼 prefix로 제한하거나, 더 안전하게 on.pull_request.paths/파일 변경 검사로 docs-only 변경일 때만 승인하도록 바꿔 주세요.

Suggested change
- name: Auto approve if title contains "chore" or "docs" or "revert" or "test"
if: contains(github.event.pull_request.title, 'chore') ||
contains(github.event.pull_request.title, 'docs') ||
contains(github.event.pull_request.title, 'revert') ||
contains(github.event.pull_request.title, 'test')
- name: Auto approve if title starts with "chore:", "docs:", "revert:" or "test:" (case-insensitive)
if: startsWith(toLower(github.event.pull_request.title), 'chore:') ||
startsWith(toLower(github.event.pull_request.title), 'docs:') ||
startsWith(toLower(github.event.pull_request.title), 'revert:') ||
startsWith(toLower(github.event.pull_request.title), 'test:')

Copilot uses AI. Check for mistakes.
uses: hmarr/auto-approve-action@v4
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 워크플로우는 PR 승인(리뷰) 권한이 필요합니다. 현재 permissions:가 없어 리포지토리 설정에 따라 GITHUB_TOKEN이 read-only일 때 자동 승인 단계가 실패할 수 있으니, job/workflow에 permissions: pull-requests: write(필요 시 contents: read)를 명시해 주세요.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmarr/auto-approve-action@v4는 태그로만 고정되어 있어 공급망 리스크가 있습니다. 워크플로우 보안 관점에서 action을 커밋 SHA로 pin(주석으로 버전 병기)하는 방식으로 변경해 주세요.

Suggested change
uses: hmarr/auto-approve-action@v4
uses: hmarr/auto-approve-action@a29f8bd391979575ad1a9e1669325153e9a43f74 # v4

Copilot uses AI. Check for mistakes.
Loading