@yeongjaeyou/claude-code-config 0.15.0 → 0.17.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/code-review-handler.md +203 -0
- package/.claude/agents/issue-resolver.md +123 -0
- package/.claude/agents/python-pro.md +7 -2
- package/.claude/agents/web-researcher.md +5 -1
- package/.claude/commands/ask-deepwiki.md +46 -11
- package/.claude/commands/council.md +144 -36
- package/.claude/commands/gh/auto-review-loop.md +201 -0
- package/.claude/commands/gh/create-issue-label.md +4 -0
- package/.claude/commands/gh/decompose-issue.md +24 -2
- package/.claude/commands/gh/post-merge.md +52 -10
- package/.claude/commands/gh/resolve-and-review.md +69 -0
- package/.claude/commands/gh/resolve-issue.md +3 -0
- package/.claude/commands/tm/convert-prd.md +4 -0
- package/.claude/commands/tm/post-merge.md +7 -1
- package/.claude/commands/tm/resolve-issue.md +4 -0
- package/.claude/commands/tm/sync-to-github.md +4 -0
- package/.claude/settings.json +15 -0
- package/.claude/skills/claude-md-generator/SKILL.md +130 -0
- package/.claude/skills/claude-md-generator/references/examples.md +261 -0
- package/.claude/skills/claude-md-generator/references/templates.md +156 -0
- package/.claude/skills/hook-creator/SKILL.md +88 -0
- package/.claude/skills/hook-creator/references/examples.md +339 -0
- package/.claude/skills/hook-creator/references/hook-events.md +193 -0
- package/.claude/skills/skill-creator/SKILL.md +160 -13
- package/.claude/skills/skill-creator/references/output-patterns.md +82 -0
- package/.claude/skills/skill-creator/references/workflows.md +28 -0
- package/.claude/skills/skill-creator/scripts/package_skill.py +10 -10
- package/.claude/skills/skill-creator/scripts/quick_validate.py +45 -15
- package/.claude/skills/slash-command-creator/SKILL.md +108 -0
- package/.claude/skills/slash-command-creator/references/examples.md +161 -0
- package/.claude/skills/slash-command-creator/references/frontmatter.md +74 -0
- package/.claude/skills/slash-command-creator/scripts/init_command.py +221 -0
- package/.claude/skills/subagent-creator/SKILL.md +127 -0
- package/.claude/skills/subagent-creator/assets/subagent-template.md +31 -0
- package/.claude/skills/subagent-creator/references/available-tools.md +63 -0
- package/.claude/skills/subagent-creator/references/examples.md +213 -0
- package/.claude/skills/youtube-collector/README.md +107 -0
- package/.claude/skills/youtube-collector/SKILL.md +158 -0
- package/.claude/skills/youtube-collector/references/data-schema.md +110 -0
- package/.claude/skills/youtube-collector/scripts/collect_videos.py +304 -0
- package/.claude/skills/youtube-collector/scripts/fetch_transcript.py +138 -0
- package/.claude/skills/youtube-collector/scripts/fetch_videos.py +229 -0
- package/.claude/skills/youtube-collector/scripts/register_channel.py +247 -0
- package/.claude/skills/youtube-collector/scripts/setup_api_key.py +151 -0
- package/package.json +1 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Sub-agent Examples
|
|
2
|
+
|
|
3
|
+
## Code Reviewer
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
---
|
|
7
|
+
name: code-reviewer
|
|
8
|
+
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
|
|
9
|
+
tools: Read, Grep, Glob, Bash
|
|
10
|
+
model: inherit
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
You are a senior code reviewer ensuring high standards of code quality and security.
|
|
14
|
+
|
|
15
|
+
When invoked:
|
|
16
|
+
|
|
17
|
+
1. Run git diff to see recent changes
|
|
18
|
+
2. Focus on modified files
|
|
19
|
+
3. Begin review immediately
|
|
20
|
+
|
|
21
|
+
Review checklist:
|
|
22
|
+
|
|
23
|
+
- Code is simple and readable
|
|
24
|
+
- Functions and variables are well-named
|
|
25
|
+
- No duplicated code
|
|
26
|
+
- Proper error handling
|
|
27
|
+
- No exposed secrets or API keys
|
|
28
|
+
- Input validation implemented
|
|
29
|
+
- Good test coverage
|
|
30
|
+
- Performance considerations addressed
|
|
31
|
+
|
|
32
|
+
Provide feedback organized by priority:
|
|
33
|
+
|
|
34
|
+
- Critical issues (must fix)
|
|
35
|
+
- Warnings (should fix)
|
|
36
|
+
- Suggestions (consider improving)
|
|
37
|
+
|
|
38
|
+
Include specific examples of how to fix issues.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Debugger
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
---
|
|
45
|
+
name: debugger
|
|
46
|
+
description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
|
|
47
|
+
tools: Read, Edit, Bash, Grep, Glob
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
You are an expert debugger specializing in root cause analysis.
|
|
51
|
+
|
|
52
|
+
When invoked:
|
|
53
|
+
|
|
54
|
+
1. Capture error message and stack trace
|
|
55
|
+
2. Identify reproduction steps
|
|
56
|
+
3. Isolate the failure location
|
|
57
|
+
4. Implement minimal fix
|
|
58
|
+
5. Verify solution works
|
|
59
|
+
|
|
60
|
+
Debugging process:
|
|
61
|
+
|
|
62
|
+
- Analyze error messages and logs
|
|
63
|
+
- Check recent code changes
|
|
64
|
+
- Form and test hypotheses
|
|
65
|
+
- Add strategic debug logging
|
|
66
|
+
- Inspect variable states
|
|
67
|
+
|
|
68
|
+
For each issue, provide:
|
|
69
|
+
|
|
70
|
+
- Root cause explanation
|
|
71
|
+
- Evidence supporting the diagnosis
|
|
72
|
+
- Specific code fix
|
|
73
|
+
- Testing approach
|
|
74
|
+
- Prevention recommendations
|
|
75
|
+
|
|
76
|
+
Focus on fixing the underlying issue, not just symptoms.
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Data Scientist
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
---
|
|
83
|
+
name: data-scientist
|
|
84
|
+
description: Data analysis expert for SQL queries, BigQuery operations, and data insights. Use proactively for data analysis tasks and queries.
|
|
85
|
+
tools: Bash, Read, Write
|
|
86
|
+
model: sonnet
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
You are a data scientist specializing in SQL and BigQuery analysis.
|
|
90
|
+
|
|
91
|
+
When invoked:
|
|
92
|
+
|
|
93
|
+
1. Understand the data analysis requirement
|
|
94
|
+
2. Write efficient SQL queries
|
|
95
|
+
3. Use BigQuery command line tools (bq) when appropriate
|
|
96
|
+
4. Analyze and summarize results
|
|
97
|
+
5. Present findings clearly
|
|
98
|
+
|
|
99
|
+
Key practices:
|
|
100
|
+
|
|
101
|
+
- Write optimized SQL queries with proper filters
|
|
102
|
+
- Use appropriate aggregations and joins
|
|
103
|
+
- Include comments explaining complex logic
|
|
104
|
+
- Format results for readability
|
|
105
|
+
- Provide data-driven recommendations
|
|
106
|
+
|
|
107
|
+
For each analysis:
|
|
108
|
+
|
|
109
|
+
- Explain the query approach
|
|
110
|
+
- Document any assumptions
|
|
111
|
+
- Highlight key findings
|
|
112
|
+
- Suggest next steps based on data
|
|
113
|
+
|
|
114
|
+
Always ensure queries are efficient and cost-effective.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Test Runner
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
---
|
|
121
|
+
name: test-runner
|
|
122
|
+
description: Use proactively to run tests and fix failures
|
|
123
|
+
tools: Bash, Read, Edit, Grep, Glob
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
You are a test automation expert. When you see code changes, proactively run the appropriate tests. If tests fail, analyze the failures and fix them while preserving the original test intent.
|
|
127
|
+
|
|
128
|
+
Key responsibilities:
|
|
129
|
+
|
|
130
|
+
1. Identify appropriate test suites for changed code
|
|
131
|
+
2. Run tests and capture output
|
|
132
|
+
3. Analyze failures to find root causes
|
|
133
|
+
4. Fix failing tests or code
|
|
134
|
+
5. Re-run to verify fixes
|
|
135
|
+
|
|
136
|
+
When fixing tests:
|
|
137
|
+
- Preserve original test intent
|
|
138
|
+
- Fix the code if the test is correct
|
|
139
|
+
- Update the test if requirements changed
|
|
140
|
+
- Add new tests for uncovered cases
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Documentation Writer
|
|
144
|
+
|
|
145
|
+
```markdown
|
|
146
|
+
---
|
|
147
|
+
name: doc-writer
|
|
148
|
+
description: Documentation specialist for creating and updating project documentation. Use when documentation needs to be written or improved.
|
|
149
|
+
tools: Read, Write, Edit, Glob, Grep
|
|
150
|
+
model: haiku
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
You are a technical writer specializing in clear, concise documentation.
|
|
154
|
+
|
|
155
|
+
When invoked:
|
|
156
|
+
|
|
157
|
+
1. Understand the codebase or feature to document
|
|
158
|
+
2. Identify the target audience
|
|
159
|
+
3. Write clear, structured documentation
|
|
160
|
+
|
|
161
|
+
Documentation guidelines:
|
|
162
|
+
|
|
163
|
+
- Use clear headings and structure
|
|
164
|
+
- Include code examples where helpful
|
|
165
|
+
- Keep explanations concise
|
|
166
|
+
- Use consistent terminology
|
|
167
|
+
- Add diagrams or tables when they clarify concepts
|
|
168
|
+
|
|
169
|
+
Types of documentation:
|
|
170
|
+
- API references
|
|
171
|
+
- User guides
|
|
172
|
+
- Developer setup guides
|
|
173
|
+
- Architecture documentation
|
|
174
|
+
- README files
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Security Auditor
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
---
|
|
181
|
+
name: security-auditor
|
|
182
|
+
description: Security specialist for reviewing code for vulnerabilities. Use proactively when reviewing authentication, authorization, or data handling code.
|
|
183
|
+
tools: Read, Grep, Glob, Bash
|
|
184
|
+
permissionMode: plan
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
You are a security expert specializing in code security audits.
|
|
188
|
+
|
|
189
|
+
When invoked:
|
|
190
|
+
|
|
191
|
+
1. Scan for common vulnerability patterns
|
|
192
|
+
2. Check authentication and authorization flows
|
|
193
|
+
3. Review data handling and validation
|
|
194
|
+
4. Identify potential attack vectors
|
|
195
|
+
|
|
196
|
+
Security checklist:
|
|
197
|
+
|
|
198
|
+
- SQL injection vulnerabilities
|
|
199
|
+
- XSS (Cross-Site Scripting)
|
|
200
|
+
- CSRF (Cross-Site Request Forgery)
|
|
201
|
+
- Authentication bypasses
|
|
202
|
+
- Insecure direct object references
|
|
203
|
+
- Sensitive data exposure
|
|
204
|
+
- Security misconfiguration
|
|
205
|
+
- Broken access control
|
|
206
|
+
|
|
207
|
+
Report format:
|
|
208
|
+
- Severity (Critical/High/Medium/Low)
|
|
209
|
+
- Location in code
|
|
210
|
+
- Description of vulnerability
|
|
211
|
+
- Recommended fix
|
|
212
|
+
- References (CWE, OWASP)
|
|
213
|
+
```
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# YouTube Collector Skill
|
|
2
|
+
|
|
3
|
+
유튜브 채널을 등록하고, 새 컨텐츠를 수집하여 자막 기반 요약을 생성하는 Claude Code skill입니다.
|
|
4
|
+
|
|
5
|
+
## 주요 기능
|
|
6
|
+
|
|
7
|
+
- **채널 등록/관리**: 유튜브 채널을 등록하고 관리
|
|
8
|
+
- **컨텐츠 수집**: 등록된 채널의 최신 영상 정보 수집
|
|
9
|
+
- **자막 수집**: 영상의 자막(transcript) 자동 수집
|
|
10
|
+
- **요약 생성**: 자막 또는 설명 기반 요약 생성
|
|
11
|
+
- **중복 방지**: 이미 수집된 영상은 자동 스킵
|
|
12
|
+
|
|
13
|
+
## 초기 설정
|
|
14
|
+
|
|
15
|
+
### 1. 필수 패키지 설치
|
|
16
|
+
```bash
|
|
17
|
+
pip install google-api-python-client youtube-transcript-api pyyaml
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 2. API 키 설정
|
|
21
|
+
```bash
|
|
22
|
+
python3 .claude/skills/youtube-collector/scripts/setup_api_key.py
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## 사용 프롬프트 예시
|
|
26
|
+
|
|
27
|
+
### 채널 등록
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
유튜브 채널 @channelname 등록해줘
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
이 유튜브 채널 등록해줘: https://youtube.com/@examplechannel
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
다음 채널들을 등록해줘:
|
|
39
|
+
- @channel1
|
|
40
|
+
- @channel2
|
|
41
|
+
- @channel3
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 컨텐츠 수집
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
등록된 유튜브 채널들의 새 영상 수집해줘
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
유튜브 채널 @channelname의 최신 영상 5개 수집해줘
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
모든 채널에서 새로운 컨텐츠 있는지 확인하고 수집해줘
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 수집된 데이터 조회
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
수집된 유튜브 컨텐츠 목록 보여줘
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
@channelname 채널에서 수집된 영상들 보여줘
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
최근 수집된 영상 요약 보여줘
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 채널 관리
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
등록된 유튜브 채널 목록 보여줘
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
@channelname 채널 등록 해제해줘
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### API 키 관리
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
유튜브 API 키 설정 상태 확인해줘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
유튜브 API 키 새로 설정해줘
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## 데이터 저장 위치
|
|
93
|
+
|
|
94
|
+
| 데이터 | 경로 |
|
|
95
|
+
|--------|------|
|
|
96
|
+
| API 키 | `~/.config/youtube-collector/config.yaml` |
|
|
97
|
+
| 프로젝트 설정 | `.reference/youtube-config.yaml` |
|
|
98
|
+
| 등록된 채널 | `.reference/channels.yaml` |
|
|
99
|
+
| 수집된 컨텐츠 | `.reference/contents/{channel}/` |
|
|
100
|
+
|
|
101
|
+
## 스크립트
|
|
102
|
+
|
|
103
|
+
| 스크립트 | 설명 |
|
|
104
|
+
|----------|------|
|
|
105
|
+
| `setup_api_key.py` | API 키 설정 |
|
|
106
|
+
| `fetch_videos.py` | 채널 영상 목록 조회 |
|
|
107
|
+
| `fetch_transcript.py` | 영상 자막 수집 |
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: youtube-collector
|
|
3
|
+
description: 유튜브 채널을 등록하고 새 컨텐츠를 수집하여 자막 기반 요약을 생성하는 skill. 사용자가 (1) 유튜브 채널 등록/관리를 요청하거나, (2) 등록된 채널의 새 영상 수집을 요청하거나, (3) 유튜브 영상 요약을 요청할 때 사용. 데이터는 .reference/ 폴더에 YAML 형식으로 저장됨.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# YouTube Collector
|
|
7
|
+
|
|
8
|
+
등록된 유튜브 채널의 새 컨텐츠를 수집하고 자막 기반 요약을 생성.
|
|
9
|
+
|
|
10
|
+
## 사전 요구사항
|
|
11
|
+
|
|
12
|
+
**필수 패키지:**
|
|
13
|
+
```bash
|
|
14
|
+
pip install google-api-python-client youtube-transcript-api pyyaml
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**API 키 설정:** 보안을 위해 API 키는 사용자 홈 디렉토리에 저장됨.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# API 키 설정 (대화형)
|
|
21
|
+
python3 scripts/setup_api_key.py
|
|
22
|
+
|
|
23
|
+
# 또는 직접 지정
|
|
24
|
+
python3 scripts/setup_api_key.py --api-key YOUR_API_KEY
|
|
25
|
+
|
|
26
|
+
# 현재 설정 확인
|
|
27
|
+
python3 scripts/setup_api_key.py --show
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**설정 파일 경로:**
|
|
31
|
+
- macOS/Linux: `~/.config/youtube-collector/config.yaml`
|
|
32
|
+
- Windows: `%APPDATA%\youtube-collector\config.yaml`
|
|
33
|
+
|
|
34
|
+
## 워크플로우
|
|
35
|
+
|
|
36
|
+
### 1. 채널 등록
|
|
37
|
+
|
|
38
|
+
채널 URL 또는 핸들로 등록:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# 핸들로 등록
|
|
42
|
+
python3 scripts/register_channel.py --channel-handle @channelname --output-dir .reference/
|
|
43
|
+
|
|
44
|
+
# URL로 등록
|
|
45
|
+
python3 scripts/register_channel.py --channel-url "https://youtube.com/@channelname" --output-dir .reference/
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**결과:** `.reference/channels.yaml`에 채널 정보가 추가됨.
|
|
49
|
+
|
|
50
|
+
### 2. 컨텐츠 수집
|
|
51
|
+
|
|
52
|
+
스크립트가 영상 목록 조회 + 자막 수집 + YAML 파일 저장을 자동으로 처리:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# 특정 채널 수집
|
|
56
|
+
python3 scripts/collect_videos.py --channel-handle @channelname --output-dir .reference/ --max-results 10
|
|
57
|
+
|
|
58
|
+
# 등록된 모든 채널 수집
|
|
59
|
+
python3 scripts/collect_videos.py --all --output-dir .reference/
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**결과:** `.reference/contents/{channel_handle}/{video_id}.yaml` 파일들이 생성됨.
|
|
63
|
+
|
|
64
|
+
### 3. 요약 생성
|
|
65
|
+
|
|
66
|
+
수집 결과 JSON에서 새로 추가된 영상 확인 후, 각 영상의 YAML 파일에 summary 필드 추가:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
summary:
|
|
70
|
+
source: "transcript" # 또는 "description" (자막 없을 때)
|
|
71
|
+
content: |
|
|
72
|
+
## 서론
|
|
73
|
+
- 문제 제기 또는 주제 소개
|
|
74
|
+
- 영상의 목적/배경
|
|
75
|
+
|
|
76
|
+
## 본론
|
|
77
|
+
- 핵심 내용 상세 설명
|
|
78
|
+
- 해결책, 방법론, 예시 등
|
|
79
|
+
- 주요 포인트별 정리
|
|
80
|
+
|
|
81
|
+
## 결론
|
|
82
|
+
- 핵심 요약
|
|
83
|
+
- 시사점 또는 다음 단계
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**요약 생성 기준:**
|
|
87
|
+
- `transcript.available: true` → 자막 기반 요약, `summary.source: "transcript"`
|
|
88
|
+
- `transcript.available: false` → 설명 기반 요약, `summary.source: "description"`
|
|
89
|
+
|
|
90
|
+
### 4. 데이터 조회
|
|
91
|
+
|
|
92
|
+
수집된 컨텐츠 확인:
|
|
93
|
+
- `.reference/contents/` 폴더 구조 확인
|
|
94
|
+
- 특정 채널/영상의 YAML 파일 읽어서 정보 제공
|
|
95
|
+
|
|
96
|
+
## 스크립트 옵션
|
|
97
|
+
|
|
98
|
+
### register_channel.py
|
|
99
|
+
|
|
100
|
+
| 옵션 | 설명 |
|
|
101
|
+
|------|------|
|
|
102
|
+
| `--channel-handle` | 채널 핸들 (@username) |
|
|
103
|
+
| `--channel-url` | 채널 URL |
|
|
104
|
+
| `--channel-id` | 채널 ID (UC...) |
|
|
105
|
+
| `--output-dir` | 저장 디렉토리 (기본: .reference) |
|
|
106
|
+
|
|
107
|
+
### collect_videos.py
|
|
108
|
+
|
|
109
|
+
| 옵션 | 설명 |
|
|
110
|
+
|------|------|
|
|
111
|
+
| `--channel-handle` | 특정 채널 핸들 |
|
|
112
|
+
| `--channel-id` | 특정 채널 ID |
|
|
113
|
+
| `--all` | channels.yaml의 모든 채널 처리 |
|
|
114
|
+
| `--output-dir` | 저장 디렉토리 (기본: .reference) |
|
|
115
|
+
| `--max-results` | 채널당 최대 수집 개수 (기본: 10) |
|
|
116
|
+
| `--language` | 자막 우선 언어 (기본: ko) |
|
|
117
|
+
| `--no-skip-existing` | 기존 파일 덮어쓰기 |
|
|
118
|
+
|
|
119
|
+
## 데이터 구조
|
|
120
|
+
|
|
121
|
+
상세 스키마: [references/data-schema.md](references/data-schema.md)
|
|
122
|
+
|
|
123
|
+
### 영상 데이터 예시
|
|
124
|
+
```yaml
|
|
125
|
+
video_id: "abc123"
|
|
126
|
+
title: "영상 제목"
|
|
127
|
+
published_at: "2025-12-10T10:00:00Z"
|
|
128
|
+
url: "https://youtube.com/watch?v=abc123"
|
|
129
|
+
thumbnail: "https://..."
|
|
130
|
+
description: "영상 설명..."
|
|
131
|
+
duration: "PT10M30S"
|
|
132
|
+
collected_at: "2025-12-13T15:00:00Z"
|
|
133
|
+
transcript:
|
|
134
|
+
available: true
|
|
135
|
+
language: "ko"
|
|
136
|
+
text: "자막 전체..."
|
|
137
|
+
summary:
|
|
138
|
+
source: "transcript"
|
|
139
|
+
content: |
|
|
140
|
+
## 서론
|
|
141
|
+
- 영상의 배경 및 목적
|
|
142
|
+
|
|
143
|
+
## 본론
|
|
144
|
+
- 핵심 내용 1
|
|
145
|
+
- 핵심 내용 2
|
|
146
|
+
|
|
147
|
+
## 결론
|
|
148
|
+
- 핵심 요약
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## 에러 처리
|
|
152
|
+
|
|
153
|
+
| 상황 | 안내 메시지 |
|
|
154
|
+
|------|------------|
|
|
155
|
+
| API 키 미설정 | "YouTube Data API 키가 필요합니다. `python3 scripts/setup_api_key.py`로 설정해주세요." |
|
|
156
|
+
| 채널 미등록 | "등록된 채널이 없습니다. 먼저 채널을 등록해주세요." |
|
|
157
|
+
| 패키지 미설치 | "필요한 패키지를 설치해주세요: `pip install google-api-python-client youtube-transcript-api pyyaml`" |
|
|
158
|
+
| API 할당량 초과 | "YouTube API 할당량이 초과되었습니다. 내일 다시 시도해주세요." |
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# YouTube Collector 데이터 스키마
|
|
2
|
+
|
|
3
|
+
## 설정 파일 구조
|
|
4
|
+
|
|
5
|
+
### API 키 (사용자 홈 디렉토리)
|
|
6
|
+
|
|
7
|
+
보안을 위해 API 키는 코드베이스 외부에 저장됨.
|
|
8
|
+
|
|
9
|
+
**경로:**
|
|
10
|
+
- macOS/Linux: `~/.config/youtube-collector/config.yaml`
|
|
11
|
+
- Windows: `%APPDATA%\youtube-collector\config.yaml`
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
api_key: "YOUR_YOUTUBE_DATA_API_KEY"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**설정 명령:**
|
|
18
|
+
```bash
|
|
19
|
+
python3 scripts/setup_api_key.py
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 프로젝트 설정 (.reference/)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
.reference/
|
|
26
|
+
├── youtube-config.yaml # 프로젝트 설정 (API 키 제외)
|
|
27
|
+
├── channels.yaml # 등록된 채널 목록
|
|
28
|
+
└── contents/
|
|
29
|
+
└── {channel_handle}/ # 채널별 폴더 (@ 제외)
|
|
30
|
+
└── {video_id}.yaml # 영상별 데이터
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## youtube-config.yaml
|
|
34
|
+
|
|
35
|
+
```yaml
|
|
36
|
+
# 자막 우선 언어 (기본: ko)
|
|
37
|
+
default_language: "ko"
|
|
38
|
+
|
|
39
|
+
# 채널당 최대 수집 개수 (기본: 10)
|
|
40
|
+
max_results: 10
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## channels.yaml
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
channels:
|
|
47
|
+
- id: "UCxxxxxxxxxxxxxxxxxxxxxx" # 채널 ID (UC로 시작)
|
|
48
|
+
handle: "@channelname" # 채널 핸들
|
|
49
|
+
name: "채널 표시 이름" # 사람이 읽기 쉬운 이름
|
|
50
|
+
added_at: "2025-12-13" # 등록일
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## contents/{channel_handle}/{video_id}.yaml
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
# 기본 정보
|
|
57
|
+
video_id: "abc123xyz"
|
|
58
|
+
title: "영상 제목"
|
|
59
|
+
published_at: "2025-12-10T10:00:00Z"
|
|
60
|
+
url: "https://youtube.com/watch?v=abc123xyz"
|
|
61
|
+
thumbnail: "https://i.ytimg.com/vi/abc123xyz/maxresdefault.jpg"
|
|
62
|
+
description: |
|
|
63
|
+
영상 설명 전체 텍스트
|
|
64
|
+
duration: "PT10M30S" # ISO 8601 형식
|
|
65
|
+
collected_at: "2025-12-13T15:00:00Z" # 수집 시점
|
|
66
|
+
|
|
67
|
+
# 자막 정보
|
|
68
|
+
transcript:
|
|
69
|
+
available: true # 자막 존재 여부
|
|
70
|
+
language: "ko" # 자막 언어
|
|
71
|
+
text: |
|
|
72
|
+
자막 전체 텍스트...
|
|
73
|
+
|
|
74
|
+
# 요약 정보 (초기값: null, AI가 생성하여 추가)
|
|
75
|
+
summary:
|
|
76
|
+
source: "transcript" # "transcript" 또는 "description"
|
|
77
|
+
content: |
|
|
78
|
+
## 서론
|
|
79
|
+
- 문제 제기 또는 주제 소개
|
|
80
|
+
- 영상의 목적/배경
|
|
81
|
+
|
|
82
|
+
## 본론
|
|
83
|
+
- 핵심 내용 상세 설명
|
|
84
|
+
- 해결책, 방법론, 예시 등
|
|
85
|
+
- 주요 포인트별 정리
|
|
86
|
+
|
|
87
|
+
## 결론
|
|
88
|
+
- 핵심 요약
|
|
89
|
+
- 시사점 또는 다음 단계
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 자막이 없는 경우
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
transcript:
|
|
96
|
+
available: false
|
|
97
|
+
language: null
|
|
98
|
+
text: null
|
|
99
|
+
|
|
100
|
+
summary:
|
|
101
|
+
source: "description"
|
|
102
|
+
content: |
|
|
103
|
+
(설명 기반 요약 내용)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 중복 방지 규칙
|
|
107
|
+
|
|
108
|
+
- 파일명이 `{video_id}.yaml` 형식
|
|
109
|
+
- 수집 전 해당 파일 존재 여부로 중복 체크
|
|
110
|
+
- 이미 존재하는 video_id는 스킵
|