@yeongjaeyou/claude-code-config 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/generate-llmstxt.md +165 -0
- package/.claude/agents/langconnect-rag-expert.md +98 -0
- package/.claude/agents/python-pro.md +33 -0
- package/.claude/agents/web-researcher.md +292 -0
- package/.claude/commands/ask-deepwiki.md +26 -0
- package/.claude/commands/code-review.md +75 -0
- package/.claude/commands/commit-and-push.md +52 -0
- package/.claude/commands/edit-notebook.md +42 -0
- package/.claude/commands/gh/create-issue-label.md +29 -0
- package/.claude/commands/gh/decompose-issue.md +60 -0
- package/.claude/commands/gh/post-merge.md +71 -0
- package/.claude/commands/gh/resolve-issue.md +54 -0
- package/.claude/commands/plan.md +25 -0
- package/.claude/skills/code-explorer/SKILL.md +186 -0
- package/.claude/skills/code-explorer/references/github_api.md +174 -0
- package/.claude/skills/code-explorer/references/huggingface_api.md +240 -0
- package/.claude/skills/code-explorer/scripts/search_github.py +208 -0
- package/.claude/skills/code-explorer/scripts/search_huggingface.py +306 -0
- package/LICENSE +21 -0
- package/README.md +159 -0
- package/bin/cli.js +133 -0
- package/package.json +29 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Git 변경사항 분석 후 적절한 커밋 메시지로 커밋 및 푸시
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 커밋 & 푸시
|
|
6
|
+
|
|
7
|
+
아규먼트로 받은 파일들만을 분석하여 적절한 커밋 메시지를 작성하고 커밋 후 푸시합니다.
|
|
8
|
+
|
|
9
|
+
## 작업 순서
|
|
10
|
+
|
|
11
|
+
1. **변경 분석**: 아규먼트로 받은 파일들만의 변경 내용이 어떤 목적인지 분석
|
|
12
|
+
- 새로운 기능 추가
|
|
13
|
+
- 버그 수정
|
|
14
|
+
- 리팩토링
|
|
15
|
+
- 문서 업데이트
|
|
16
|
+
- 스타일/포맷팅
|
|
17
|
+
2. **커밋 메시지 작성**: Conventional Commits 형식으로 명확하게 작성
|
|
18
|
+
4. **커밋 & 푸시**: `git add` → `git commit` → `git push`
|
|
19
|
+
|
|
20
|
+
## 커밋 메시지 형식
|
|
21
|
+
|
|
22
|
+
Conventional Commits 규칙 준수:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
<type>: <subject>
|
|
26
|
+
|
|
27
|
+
[optional body]
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Type 종류
|
|
31
|
+
- `feat`: 새로운 기능 추가
|
|
32
|
+
- `fix`: 버그 수정
|
|
33
|
+
- `refactor`: 코드 리팩토링
|
|
34
|
+
- `docs`: 문서 변경
|
|
35
|
+
- `style`: 코드 포맷팅, 세미콜론 누락 등
|
|
36
|
+
- `test`: 테스트 코드 추가/수정
|
|
37
|
+
- `chore`: 빌드, 설정 파일 변경
|
|
38
|
+
|
|
39
|
+
### Subject 작성 원칙
|
|
40
|
+
- 명령형, 현재 시제 사용
|
|
41
|
+
- 첫 글자 소문자
|
|
42
|
+
- 마침표 없음
|
|
43
|
+
- 50자 이내로 간결하게
|
|
44
|
+
|
|
45
|
+
## 작성 원칙
|
|
46
|
+
- **한글로 작성 및 답변**
|
|
47
|
+
- **아규먼트로 전달된 파일 외의 파일은 분석하지 않음**
|
|
48
|
+
- **명확성**: 무엇을, 왜 변경했는지 명확히 전달
|
|
49
|
+
- **CLAUDE.md 준수**: `@CLAUDE.md`의 프로젝트 지침 확인
|
|
50
|
+
- **단일 목적**: 하나의 커밋은 하나의 논리적 변경만 포함
|
|
51
|
+
|
|
52
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Jupyter Notebook(.ipynb) 파일 안전 편집
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Notebook 편집
|
|
6
|
+
|
|
7
|
+
Jupyter Notebook 파일을 올바른 도구로 안전하게 편집합니다.
|
|
8
|
+
|
|
9
|
+
## 필수 규칙
|
|
10
|
+
|
|
11
|
+
1. **도구 사용**: `NotebookEdit` 도구만 사용
|
|
12
|
+
- `Edit`, `Write`, `search_replace` 등 텍스트 편집 도구 사용 금지
|
|
13
|
+
- .ipynb는 JSON 구조이므로 전용 도구 필수
|
|
14
|
+
|
|
15
|
+
2. **셀 삽입 순서**: 새 노트북 작성 시 순서 보장 필수
|
|
16
|
+
- **중요**: `cell_id` 미지정 시 항상 맨 앞에 삽입됨
|
|
17
|
+
- **방법 1 (권장)**: 이전 셀의 cell_id를 추적하여 순차 삽입
|
|
18
|
+
```
|
|
19
|
+
첫 셀 삽입 → cell_id='abc123' 반환
|
|
20
|
+
두 번째 셀 삽입 시 cell_id='abc123' 지정 → 첫 셀 다음에 삽입
|
|
21
|
+
세 번째 셀 삽입 시 cell_id='def456' 지정 → 두 번째 셀 다음에 삽입
|
|
22
|
+
```
|
|
23
|
+
- **방법 2**: 역순 삽입 (마지막 셀부터 첫 셀까지)
|
|
24
|
+
- **절대 금지**: cell_id 없이 순차 삽입 (역순 결과 발생)
|
|
25
|
+
|
|
26
|
+
3. **source 형식**: NotebookEdit 사용 시 source가 string으로 저장될 수 있음
|
|
27
|
+
- **문제**: `"line1\\nline2"` (string) → Jupyter에서 `\n`이 그대로 표시됨
|
|
28
|
+
- **정상**: `["line1\n", "line2\n"]` (list of strings)
|
|
29
|
+
- **해결**: 새 노트북 생성 시 Python으로 직접 JSON 작성 권장
|
|
30
|
+
|
|
31
|
+
4. **편집 후 검증**: 수정 후 반드시 확인
|
|
32
|
+
- JSON 구문 유효성 검증
|
|
33
|
+
- 셀 실행 순서 보존 확인 (Read로 첫 30줄 확인)
|
|
34
|
+
- 함수/임포트/의존성 누락 확인
|
|
35
|
+
- 명시적 지시가 없으면 셀 출력 보존
|
|
36
|
+
|
|
37
|
+
## 처리 원칙
|
|
38
|
+
|
|
39
|
+
- **전용 도구만 사용**: NotebookEdit 외 다른 편집 도구 절대 금지
|
|
40
|
+
- **구조 보존**: 기존 셀 순서 및 출력 유지
|
|
41
|
+
- **검증 필수**: 편집 후 즉시 변경사항 확인
|
|
42
|
+
- **CLAUDE.md 준수**: 프로젝트 지침 엄수
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## 이슈 라벨 생성하기
|
|
2
|
+
|
|
3
|
+
프로젝트 구조를 분석하여 적절한 GitHub 이슈 라벨을 생성합니다. `@CLAUDE.md`의 프로젝트 지침을 준수할 것.
|
|
4
|
+
|
|
5
|
+
## 작업 순서
|
|
6
|
+
1. 프로젝트 분석: `package.json`, `README.md`, 코드 구조 파악
|
|
7
|
+
2. 기술 스택 확인: 사용된 프레임워크, 라이브러리, 도구 식별
|
|
8
|
+
3. 프로젝트 영역 분류: 프론트엔드, 백엔드, API, 인프라 등
|
|
9
|
+
4. 라벨 생성: 타입, 영역, 난이도 기반으로 핵심 라벨만 생성
|
|
10
|
+
|
|
11
|
+
## 라벨 생성 기준
|
|
12
|
+
|
|
13
|
+
**아래는 예시이며, 프로젝트에 맞게 조정해서 생성해주세요.**
|
|
14
|
+
|
|
15
|
+
### 타입 (Type)
|
|
16
|
+
- `type: feature`, `type: bug`, `type: enhancement`, `type: documentation`, `type: refactor`
|
|
17
|
+
|
|
18
|
+
### 영역 (Area)
|
|
19
|
+
- `frontend` `backend` `api` `devops`, `crawling` `ai` `database` `infrastructure`
|
|
20
|
+
|
|
21
|
+
### 난이도 (Complexity)
|
|
22
|
+
- `complexity: easy` `complexity: medium` `complexity: hard`
|
|
23
|
+
|
|
24
|
+
## 생성 명령어 예시
|
|
25
|
+
```bash
|
|
26
|
+
gh label create "type: feature" --color "0e8a16" --description "새로운 기능 추가"
|
|
27
|
+
gh label create "frontend" --color "1d76db" --description "프론트엔드 관련 작업"
|
|
28
|
+
gh label create "complexity: easy" --color "7057ff" --description "간단한 작업"
|
|
29
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
## 작업 세분화하기
|
|
2
|
+
|
|
3
|
+
큰 작업을 관리 가능한 독립적인 이슈들로 분해합니다. `@CLAUDE.md`의 프로젝트 지침을 준수할 것.
|
|
4
|
+
|
|
5
|
+
## 작업 순서
|
|
6
|
+
1. 이슈 번호 확인: `gh issue list`로 현재 이슈 번호 확인하기.
|
|
7
|
+
2. 작업 분석: 작업의 핵심 요구사항과 목표를 이해하기.
|
|
8
|
+
3. 작업 분해: 주요 작업을 더 작고 관리하기 쉬운 하위 작업 또는 이슈로 나누기. **너무 많은 이슈보다 최적의 개수로 분해 (관리 가능한 수준)**할 것.
|
|
9
|
+
4. 의존성 분석: 다른 작업이 선행돼야 하는 의존성 파악하기
|
|
10
|
+
5. 마일스톤 이름 제안: 분해된 작업들을 묶을 마일스톤명 제안하기
|
|
11
|
+
6. 관련 PR 확인 (선택): `gh pr list --state closed --limit 20`로 참고할 만한 유사 작업 찾기 (없으면 생략)
|
|
12
|
+
7. 분해된 이슈 출력: 분해된 이슈들을 마일스톤명과 함께 출력하기.
|
|
13
|
+
8. 깃허브에 마일스톤과 이슈를 생성할지 묻기: AskUserQuestion 도구로 사용자가 결정하도록 요청하기.
|
|
14
|
+
- 마일스톤 생성: `gh api repos/:owner/:repo/milestones -f title="마일스톤명" -f description="설명"`
|
|
15
|
+
- 이슈 생성 시 `--milestone` 옵션으로 할당
|
|
16
|
+
|
|
17
|
+
## 마일스톤 description 작성 가이드
|
|
18
|
+
|
|
19
|
+
마일스톤 description에 반드시 포함할 내용:
|
|
20
|
+
- 전체 작업의 목표와 범위
|
|
21
|
+
- 이슈 처리 순서 (의존성 그래프)
|
|
22
|
+
- 예: "이슈 순서: #1 -> #2 -> #3 -> #4"
|
|
23
|
+
|
|
24
|
+
## 이슈 템플릿
|
|
25
|
+
|
|
26
|
+
### 제목
|
|
27
|
+
`[타입] 간결한 작업 설명`
|
|
28
|
+
|
|
29
|
+
### 라벨 (실제 저장소 라벨 사용)
|
|
30
|
+
**주의**: 라벨을 지정하기 전에 `gh label list` 명령어로 저장소의 실제 라벨을 확인하세요.
|
|
31
|
+
|
|
32
|
+
예시 (프로젝트에 따라 다름, 참고용으로만 이해하고 사용하지 말 것):
|
|
33
|
+
- **타입**: `type: feature`, `type: documentation`, `type: enhancement`, `type: bug`
|
|
34
|
+
- **영역**: `area: model/inference`, `area: model/training`, `area: dataset`, `area: detection`
|
|
35
|
+
- **난이도**: `complexity: easy`, `complexity: medium`, `complexity: hard`
|
|
36
|
+
- **우선순위**: `priority: high`, `priority: medium`, `priority: low`
|
|
37
|
+
|
|
38
|
+
### 설명
|
|
39
|
+
**목적**: [왜 필요한지]
|
|
40
|
+
|
|
41
|
+
**작업 내용**:
|
|
42
|
+
- [ ] 구체적 요구사항 1
|
|
43
|
+
- [ ] 구체적 요구사항 2
|
|
44
|
+
|
|
45
|
+
**수정할 파일**:
|
|
46
|
+
- `경로/파일명` - 변경 내용
|
|
47
|
+
|
|
48
|
+
**완료 조건**:
|
|
49
|
+
- [ ] 기능 구현 완료
|
|
50
|
+
- [ ] 데모 페이지에 추가 (UI 컴포넌트인 경우)
|
|
51
|
+
|
|
52
|
+
**의존성**:
|
|
53
|
+
- [ ] 없음 또는 선행 이슈 #번호
|
|
54
|
+
|
|
55
|
+
**권장 에이전트** (해당되는 경우):
|
|
56
|
+
- 아규먼트에 에이전트 사용이 명시된 경우 여기에 포함
|
|
57
|
+
|
|
58
|
+
**참고 자료** (선택사항):
|
|
59
|
+
- 관련 PR이 있으면 추가 (예: PR #36 - 간단한 설명)
|
|
60
|
+
- 없으면 이 섹션 생략 가능
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: PR 머지 후 브랜치 정리 및 CLAUDE.md 업데이트
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# PR 머지 후 정리
|
|
6
|
+
|
|
7
|
+
PR이 머지된 후 브랜치 정리와 CLAUDE.md 업데이트를 수행합니다. `@CLAUDE.md`의 프로젝트 지침을 준수할 것.
|
|
8
|
+
|
|
9
|
+
## 아규먼트
|
|
10
|
+
|
|
11
|
+
- PR 번호 (선택): 없으면 대화 맥락에서 파악하거나 최근 머지된 PR 목록에서 선택 요청
|
|
12
|
+
|
|
13
|
+
## 작업 순서
|
|
14
|
+
|
|
15
|
+
1. **PR 정보 확인**
|
|
16
|
+
- 아규먼트로 PR 번호가 주어지면 해당 PR 사용
|
|
17
|
+
- 없으면 대화 맥락에서 관련 PR/이슈 번호 파악 시도
|
|
18
|
+
- 파악 불가하면 `gh pr list --state merged --limit 5`로 최근 머지 PR 목록 보여주고 AskUserQuestion으로 선택 요청
|
|
19
|
+
- `gh pr view <PR번호> --json number,title,baseRefName,headRefName,body,state`로 PR 정보 확인
|
|
20
|
+
- `state`가 MERGED인지 확인
|
|
21
|
+
|
|
22
|
+
2. **베이스 브랜치로 이동**
|
|
23
|
+
- `git fetch origin`
|
|
24
|
+
- `git checkout <baseRefName>`
|
|
25
|
+
- `git pull origin <baseRefName>`
|
|
26
|
+
|
|
27
|
+
3. **이슈 브랜치 정리 (선택)**
|
|
28
|
+
- AskUserQuestion으로 로컬 브랜치 삭제 여부 질문
|
|
29
|
+
- 삭제 원하면: `git branch -d <headRefName>`
|
|
30
|
+
|
|
31
|
+
4. **CLAUDE.md 분석 및 업데이트**
|
|
32
|
+
- CLAUDE.md 존재 여부 확인
|
|
33
|
+
- 없으면: AskUserQuestion으로 생성 여부 또는 스킵 여부 질문
|
|
34
|
+
- 기존 내용 분석:
|
|
35
|
+
- 해결된 이슈 관련 임시 지침 찾기 (예: `#<이슈번호>`, `issue-<번호>` 언급)
|
|
36
|
+
- 오래되거나 부정확한 정보 식별
|
|
37
|
+
- 중복되거나 불필요한 내용 식별
|
|
38
|
+
- 업데이트 제안 작성:
|
|
39
|
+
- **삭제 대상**: 해결된 이슈 관련 임시 메모/지침
|
|
40
|
+
- **추가 대상**: 이슈 해결 과정에서 발견한 새로운 패턴/컨벤션
|
|
41
|
+
- **수정 대상**: 오래되거나 부정확한 정보
|
|
42
|
+
- AskUserQuestion으로 제안 내용 확인 후 적용
|
|
43
|
+
|
|
44
|
+
5. **변경사항 커밋 (선택)**
|
|
45
|
+
- CLAUDE.md가 변경되었으면 AskUserQuestion으로 커밋 여부 질문
|
|
46
|
+
- 커밋 원하면: Conventional Commits 형식으로 커밋
|
|
47
|
+
|
|
48
|
+
## 작업 지침
|
|
49
|
+
|
|
50
|
+
- 한글로 답변
|
|
51
|
+
- 코드나 문서 작성 시 이모지 사용 금지
|
|
52
|
+
- 불명확한 사항은 추측하지 말고 AskUserQuestion 도구로 질문
|
|
53
|
+
- CLAUDE.md 변경은 반드시 사용자 확인 후 진행
|
|
54
|
+
- 브랜치 삭제, 커밋 등 되돌리기 어려운 작업은 항상 사용자 확인 필요
|
|
55
|
+
|
|
56
|
+
## CLAUDE.md 업데이트 가이드
|
|
57
|
+
|
|
58
|
+
### 삭제 대상 예시
|
|
59
|
+
- `TODO: #123 해결 후 제거` 형태의 임시 메모
|
|
60
|
+
- 특정 이슈 해결을 위한 임시 워크어라운드 설명
|
|
61
|
+
- 이미 해결된 알려진 이슈 목록
|
|
62
|
+
|
|
63
|
+
### 추가 대상 예시
|
|
64
|
+
- 이슈 해결 중 발견한 코드 컨벤션
|
|
65
|
+
- 자주 발생하는 실수 방지 가이드
|
|
66
|
+
- 새로 도입된 패턴이나 아키텍처 결정
|
|
67
|
+
|
|
68
|
+
### 수정 대상 예시
|
|
69
|
+
- 변경된 디렉토리 구조 설명
|
|
70
|
+
- 업데이트된 의존성 정보
|
|
71
|
+
- 더 이상 유효하지 않은 명령어나 설정
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
# 깃허브 이슈 해결하기
|
|
3
|
+
|
|
4
|
+
깃허브 이슈를 체계적으로 분석하고 해결하는 전문 개발자 역할을 수행합니다. 아규먼트로 깃허브 이슈 번호를 받아 해당 이슈를 해결합니다. `@CLAUDE.md`의 프로젝트 지침을 준수할 것.
|
|
5
|
+
|
|
6
|
+
## 작업 순서
|
|
7
|
+
|
|
8
|
+
1. **이슈 분석**:
|
|
9
|
+
- `gh issue view $ISSUE_NUMBER --json title,body,comments,milestone`로 이슈의 제목, 본문, 레이블, 마일스톤을 확인
|
|
10
|
+
- 마일스톤이 있다면 `gh issue list --milestone "<milestone-name>" --json number,title,state`로 관련 이슈들을 확인하여 전체 맥락 파악
|
|
11
|
+
- 요구사항을 정확히 파악
|
|
12
|
+
|
|
13
|
+
2. **브랜치 생성**: `main` 또는 `master` 브랜치에서 `issue-$ISSUE_NUMBER` 형태로 새 브랜치를 생성하고 체크아웃합니다.
|
|
14
|
+
- **서브모듈 초기화**: Worktree 사용 시 `git submodule update --init --recursive` 실행 필요
|
|
15
|
+
|
|
16
|
+
3. **코드베이스 분석**: 이슈 해결에 필요한 관련 파일과 구조를 파악하기 위해 서브에이전트를 활용하여 코드베이스를 병렬로 분석합니다.
|
|
17
|
+
|
|
18
|
+
4. **해결 계획 수립**: 분석 결과를 바탕으로 구체적인 해결 방안을 계획하고 작업 단계를 정의합니다.
|
|
19
|
+
|
|
20
|
+
5. **이슈 해결**: 서브에이전트를 생성하여 계획에 따라 코드를 수정하고 기능을 구현합니다.
|
|
21
|
+
- **실행 검증 필수**: Python 스크립트, 실행 파일, 또는 동작 가능한 코드의 경우 반드시 실제 실행하여 정상 동작을 확인합니다. 단순히 파일 존재나 이전 결과만으로 판단하지 않습니다.
|
|
22
|
+
|
|
23
|
+
6. **테스트 작성**: 파일별로 독립적인 서브에이전트를 생성하여 병렬로 단위 테스트를 작성하고 80% 이상의 커버리지를 확보합니다.
|
|
24
|
+
|
|
25
|
+
7. **검증**: 테스트 실행, 린트 검사, 빌드 확인을 각각 독립적인 서브에이전트로 병렬 실행하여 코드 품질을 검증합니다.
|
|
26
|
+
|
|
27
|
+
8. **PR 생성**: 해결된 이슈에 대한 풀 리퀘스트를 생성합니다.
|
|
28
|
+
|
|
29
|
+
9. **이슈 체크박스 업데이트**: 해당 이슈의 체크박스 항목들을 완료된 것으로 체크하여 업데이트합니다.
|
|
30
|
+
|
|
31
|
+
## 작업 지침
|
|
32
|
+
- 불명확한 요구사항이나 구현 방향이 여러 가지일 경우 AskUserQuestion 도구로 사용자에게 확인
|
|
33
|
+
- 마일스톤이 있다면 마일스톤 description을 읽어 전체 맥락과 이슈 순서를 파악
|
|
34
|
+
- 한글로 답할 것, 주석 및 마크다운도 한글로 작성할 것
|
|
35
|
+
- 코드나 문서 작성 시 이모지 사용 금지
|
|
36
|
+
- PR 설명은 한글로 작성
|
|
37
|
+
- 컴포넌트가 데모 페이지에 추가되는 경우, Playwright MCP를 사용해 해당 컴포넌트를 E2E 테스트로 검증합니다.
|
|
38
|
+
- 일회성 테스트 스크립트나 임시 헬퍼 파일은 작업 완료 후 반드시 삭제합니다.
|
|
39
|
+
- 커밋, PR, 이슈에 'Generated with Claude', 'Co-Authored-By: Claude' 등 Claude attribution 금지
|
|
40
|
+
|
|
41
|
+
## 검증 및 완료 기준
|
|
42
|
+
|
|
43
|
+
**중요**: 체크박스를 완료로 표시하기 전에 반드시 실제 동작을 확인해야 합니다.
|
|
44
|
+
|
|
45
|
+
### 검증 원칙
|
|
46
|
+
1. **실제 실행 필수**: 코드/설정이 실제로 동작하는지 직접 실행하여 확인
|
|
47
|
+
2. **증거 제시**: 완료를 증명할 수 있는 실제 출력이나 결과를 보여줄 것
|
|
48
|
+
3. **추측 금지**: 확인하지 않은 것은 "미확인" 또는 "추정됨"으로 명시
|
|
49
|
+
4. **부분 완료 구분**: 코드는 작성했지만 테스트하지 않은 경우 명확히 구분
|
|
50
|
+
|
|
51
|
+
### 금지 사항
|
|
52
|
+
- 실행하지 않고 "동작할 것으로 예상됩니다"라고 보고
|
|
53
|
+
- 로그를 보지 않고 "로그에 나타날 것입니다"라고 단언
|
|
54
|
+
- 추측을 사실처럼 보고
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 요구사항 분석 후 구현 계획만 수립
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 구현 계획 수립
|
|
6
|
+
|
|
7
|
+
아규먼트로 받은 요구사항을 신중히 분석하고, 코드베이스를 이해한 후, **실제 구현 없이** 실행 계획만 제시합니다.
|
|
8
|
+
|
|
9
|
+
## IMPORTANT
|
|
10
|
+
- When you need clarification or there are multiple options, please ask me interactive questions (USE interactive question tool `AskUserQuestion`) before proceeding.
|
|
11
|
+
|
|
12
|
+
## 수행 작업
|
|
13
|
+
|
|
14
|
+
1. 요구사항의 의도 파악 (불명확하면 질문)
|
|
15
|
+
2. 관련 코드베이스 조사 및 이해
|
|
16
|
+
3. 단계별 실행 계획 작성
|
|
17
|
+
4. 주의사항 및 결정 필요 사항 제시
|
|
18
|
+
|
|
19
|
+
## 처리 원칙
|
|
20
|
+
|
|
21
|
+
- **구현 금지**: 바로 코드 작성하지 말고 계획만 수립
|
|
22
|
+
- **충분한 조사**: 코드베이스를 먼저 이해한 후 계획
|
|
23
|
+
- **질문 우선**: 모르는 것이나 헷갈리는 것은 추측하지 말고 반드시 질문
|
|
24
|
+
- **CLAUDE.md 준수**: `@CLAUDE.md`의 프로젝트 지침을 준수할 것
|
|
25
|
+
- **투명한 소통**: 불명확한 부분, 위험 요소, 대안 등 명시
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-explorer
|
|
3
|
+
description: Search and analyze code repositories on GitHub and Hugging Face (Models, Datasets, Spaces). This skill should be used when exploring open-source projects, finding implementation references, discovering ML models/datasets, or analyzing how others have solved similar problems.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Explorer
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
To search and analyze code repositories across GitHub and Hugging Face platforms, use this skill. It enables discovering implementation patterns, finding relevant ML models/datasets, and exploring demo applications (Spaces) for learning and reference.
|
|
11
|
+
|
|
12
|
+
## Supported Platforms
|
|
13
|
+
|
|
14
|
+
| Platform | Search Targets | Tool |
|
|
15
|
+
|----------|---------------|------|
|
|
16
|
+
| **GitHub** | Repositories, Code | `gh` CLI |
|
|
17
|
+
| **Hugging Face** | Models, Datasets, Spaces | `uvx hf` CLI + `huggingface_hub` API |
|
|
18
|
+
|
|
19
|
+
## Workflow Decision Tree
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
User wants to explore code/resources
|
|
23
|
+
|
|
|
24
|
+
+-- Looking for code implementations?
|
|
25
|
+
| +-- Use GitHub search
|
|
26
|
+
| +-- scripts/search_github.py (or gh CLI directly)
|
|
27
|
+
| +-- Analyze repo structure, README, key files
|
|
28
|
+
|
|
|
29
|
+
+-- Looking for ML resources?
|
|
30
|
+
+-- Use Hugging Face search
|
|
31
|
+
+-- scripts/search_huggingface.py (search via API)
|
|
32
|
+
+-- uvx hf download (download files)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Scripts
|
|
36
|
+
|
|
37
|
+
**Always run scripts with `--help` first** to see usage. These scripts handle common search workflows reliably.
|
|
38
|
+
|
|
39
|
+
### Available Scripts
|
|
40
|
+
|
|
41
|
+
- `scripts/search_github.py` - GitHub repository search using gh CLI
|
|
42
|
+
- `scripts/search_huggingface.py` - Hugging Face search (models, datasets, spaces)
|
|
43
|
+
|
|
44
|
+
### Quick Examples
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# GitHub search
|
|
48
|
+
python scripts/search_github.py "object detection" --limit 10 --help
|
|
49
|
+
|
|
50
|
+
# Hugging Face search
|
|
51
|
+
python scripts/search_huggingface.py "qwen vl" --type models --help
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## GitHub Search
|
|
55
|
+
|
|
56
|
+
### Using gh CLI Directly
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Search repositories by keyword
|
|
60
|
+
gh search repos "open vocabulary detection" --sort stars --limit 10
|
|
61
|
+
|
|
62
|
+
# Filter by language
|
|
63
|
+
gh search repos "gradio app" --language python --limit 5
|
|
64
|
+
|
|
65
|
+
# View repository details
|
|
66
|
+
gh repo view owner/repo
|
|
67
|
+
|
|
68
|
+
# Search code within repositories
|
|
69
|
+
gh search code "Qwen2VL" --extension py
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Repository Analysis
|
|
73
|
+
|
|
74
|
+
To analyze a found repository:
|
|
75
|
+
|
|
76
|
+
1. Review README.md for usage instructions
|
|
77
|
+
2. Identify main entry points (app.py, main.py, inference.py)
|
|
78
|
+
3. Check dependencies (requirements.txt, pyproject.toml)
|
|
79
|
+
4. Study implementation patterns in source files
|
|
80
|
+
|
|
81
|
+
## Hugging Face Search
|
|
82
|
+
|
|
83
|
+
### Search (via script or Python API)
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Search models
|
|
87
|
+
python scripts/search_huggingface.py "object detection" --type models --limit 10
|
|
88
|
+
|
|
89
|
+
# Search datasets
|
|
90
|
+
python scripts/search_huggingface.py "coco" --type datasets --limit 5
|
|
91
|
+
|
|
92
|
+
# Search spaces (demos)
|
|
93
|
+
python scripts/search_huggingface.py "gradio demo" --type spaces --limit 10
|
|
94
|
+
|
|
95
|
+
# Search all types
|
|
96
|
+
python scripts/search_huggingface.py "qwen vl" --type all
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Download (via uvx hf)
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Download space source code (use /tmp/ for temporary analysis)
|
|
103
|
+
uvx hf download <space_id> --repo-type space --include "*.py" --local-dir /tmp/<space_name>
|
|
104
|
+
|
|
105
|
+
# Download model files
|
|
106
|
+
uvx hf download <repo_id> --include "*.json" --local-dir /tmp/<model_name>
|
|
107
|
+
|
|
108
|
+
# Download to project directory (when needed permanently)
|
|
109
|
+
uvx hf download <repo_id> --local-dir ./my-model
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Note**: Always use `--local-dir /tmp/` for temporary code analysis to avoid cluttering the project.
|
|
113
|
+
|
|
114
|
+
### Common Search Patterns
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Find models for specific task
|
|
118
|
+
python scripts/search_huggingface.py "open vocabulary detection" --type models
|
|
119
|
+
python scripts/search_huggingface.py "qwen2 vl" --type models
|
|
120
|
+
python scripts/search_huggingface.py "grounding dino" --type models
|
|
121
|
+
|
|
122
|
+
# Find demo applications
|
|
123
|
+
python scripts/search_huggingface.py "object detection demo" --type spaces
|
|
124
|
+
python scripts/search_huggingface.py "gradio image" --type spaces
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Analyzing a Space
|
|
128
|
+
|
|
129
|
+
To understand how a Space is implemented:
|
|
130
|
+
|
|
131
|
+
1. Find the space: `python scripts/search_huggingface.py "keyword" --type spaces`
|
|
132
|
+
2. Download source: `uvx hf download <space_id> --repo-type space --include "*.py" --include "requirements.txt" --local-dir /tmp/<space_name>`
|
|
133
|
+
3. Or view online: `https://huggingface.co/spaces/{space_id}/tree/main`
|
|
134
|
+
4. Focus on `app.py` for main logic
|
|
135
|
+
5. Check `requirements.txt` for dependencies
|
|
136
|
+
|
|
137
|
+
## Example Use Cases
|
|
138
|
+
|
|
139
|
+
### Find Qwen3-VL Open Vocab Detection Code
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Search GitHub
|
|
143
|
+
gh search repos "qwen vl object detection" --sort stars
|
|
144
|
+
gh search code "Qwen2VL" --extension py
|
|
145
|
+
|
|
146
|
+
# Search Hugging Face
|
|
147
|
+
python scripts/search_huggingface.py "qwen2-vl" --type models
|
|
148
|
+
python scripts/search_huggingface.py "qwen vl" --type spaces
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Find Gradio Demo Patterns
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Search spaces using Gradio
|
|
155
|
+
python scripts/search_huggingface.py "gradio object detection" --type spaces
|
|
156
|
+
|
|
157
|
+
# Download a space to study
|
|
158
|
+
uvx hf download username/space-name --repo-type space --include "*.py" --local-dir /tmp/space-name
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Find Pre-trained Detection Models
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
python scripts/search_huggingface.py "object-detection" --type models --limit 20
|
|
165
|
+
python scripts/search_huggingface.py "grounding-dino" --type models
|
|
166
|
+
python scripts/search_huggingface.py "yolo-world" --type models
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Resources
|
|
170
|
+
|
|
171
|
+
### scripts/
|
|
172
|
+
- `search_github.py` - GitHub repository search wrapper
|
|
173
|
+
- `search_huggingface.py` - Hugging Face Hub search wrapper
|
|
174
|
+
|
|
175
|
+
### references/
|
|
176
|
+
- `github_api.md` - GitHub CLI detailed reference
|
|
177
|
+
- `huggingface_api.md` - Hugging Face Hub API and CLI reference
|
|
178
|
+
|
|
179
|
+
## Tips
|
|
180
|
+
|
|
181
|
+
1. **Start broad, then narrow**: Begin with general keywords, then add filters
|
|
182
|
+
2. **Check stars/likes**: Higher counts often indicate quality
|
|
183
|
+
3. **Review recent activity**: Recently updated repos are better maintained
|
|
184
|
+
4. **Use --help first**: Scripts have detailed usage information
|
|
185
|
+
5. **Download selectively**: Use `uvx hf download --include` to download only needed files
|
|
186
|
+
6. **Always cite sources**: Include repository URLs, Space links, or model IDs you referenced
|