@p.e.c/boaz-skills 1.3.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/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # boaz-skills
2
+
3
+ AI 코딩 도구용 스킬 모음. Claude Code에서 바로 사용 가능합니다.
4
+
5
+ ## 설치
6
+
7
+ ```bash
8
+ npx boaz-skills
9
+ ```
10
+
11
+ 대화형 선택 화면에서 원하는 스킬을 골라 설치합니다.
12
+
13
+ ### 전체 설치
14
+
15
+ ```bash
16
+ npx boaz-skills --all
17
+ ```
18
+
19
+ ### 스킬 목록 확인
20
+
21
+ ```bash
22
+ npx boaz-skills --list
23
+ ```
24
+
25
+ ## 포함된 스킬
26
+
27
+ | 스킬 | 설명 |
28
+ |------|------|
29
+ | **visualize-notion** | 노션 문서 작성 시 Mermaid, Callout, Table 등 시각화 도구 활용 가이드 |
30
+ | **debug** | Kernighan/Pike/Feathers/Gregg 방법론 기반 체계적 디버깅 워크플로우 |
31
+ | **read-hwp** | HWP(한글) 파일을 hwp5html로 텍스트 변환하는 파이프라인 |
32
+
33
+ ## 지원 도구
34
+
35
+ - Claude Code (`~/.claude/skills/`)
36
+ - Codex (예정)
37
+ - Gemini (예정)
38
+
39
+ ## 라이선스
40
+
41
+ MIT
package/bin/cli.mjs ADDED
@@ -0,0 +1,194 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ import os from 'os';
6
+ import { fileURLToPath } from 'url';
7
+ import prompts from 'prompts';
8
+
9
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
+ const SKILLS_DIR = path.join(__dirname, '..', 'skills');
11
+
12
+ const SKILL_META = {
13
+ 'visualize-notion': {
14
+ name: 'visualize-notion',
15
+ description: '노션 문서 작성 시 Mermaid, Callout, Table 등 시각화 도구 활용 가이드',
16
+ },
17
+ 'debug': {
18
+ name: 'debug',
19
+ description: 'Kernighan/Pike/Feathers/Gregg 방법론 기반 체계적 디버깅 워크플로우',
20
+ },
21
+ 'read-hwp': {
22
+ name: 'read-hwp',
23
+ description: 'HWP(한글) 파일을 hwp5html로 텍스트 변환하는 파이프라인',
24
+ },
25
+ 'modify-hwpx': {
26
+ name: 'modify-hwpx',
27
+ description: 'HWPX(한글) 파일 수정 — @p.e.c/hwpx-mcp MCP 서버 기반 편집',
28
+ },
29
+ };
30
+
31
+ const TARGETS = {
32
+ 'claude-code': {
33
+ label: 'Claude Code',
34
+ dir: path.join(os.homedir(), '.claude', 'skills'),
35
+ detect: () => fs.existsSync(path.join(os.homedir(), '.claude')),
36
+ },
37
+ 'codex': {
38
+ label: 'Codex CLI',
39
+ dir: path.join(process.env.CODEX_HOME || path.join(os.homedir(), '.codex'), 'skills'),
40
+ detect: () => fs.existsSync(process.env.CODEX_HOME || path.join(os.homedir(), '.codex')),
41
+ },
42
+ 'gemini': {
43
+ label: 'Gemini CLI',
44
+ dir: path.join(os.homedir(), '.gemini', 'skills'),
45
+ detect: () => fs.existsSync(path.join(os.homedir(), '.gemini')),
46
+ },
47
+ };
48
+
49
+ function getAvailableSkills() {
50
+ return fs.readdirSync(SKILLS_DIR).filter(name => {
51
+ const skillPath = path.join(SKILLS_DIR, name, 'SKILL.md');
52
+ return fs.existsSync(skillPath);
53
+ });
54
+ }
55
+
56
+ function copySkill(skillName, targetDir) {
57
+ const src = path.join(SKILLS_DIR, skillName);
58
+ const dest = path.join(targetDir, skillName);
59
+ fs.cpSync(src, dest, { recursive: true });
60
+ }
61
+
62
+ async function main() {
63
+ const args = process.argv.slice(2);
64
+
65
+ console.log('');
66
+ console.log(' ⚡ @boaz/skills');
67
+ console.log(' AI 코딩 도구용 스킬 설치기');
68
+ console.log('');
69
+
70
+ const availableSkills = getAvailableSkills();
71
+
72
+ // --list: 스킬 목록 출력
73
+ if (args.includes('--list')) {
74
+ console.log(' 사용 가능한 스킬:');
75
+ for (const skill of availableSkills) {
76
+ const meta = SKILL_META[skill];
77
+ console.log(` - ${skill}: ${meta?.description || ''}`);
78
+ }
79
+ console.log('');
80
+ process.exit(0);
81
+ }
82
+
83
+ // 설치 대상 감지
84
+ const detectedTargets = Object.entries(TARGETS)
85
+ .filter(([, t]) => t.detect())
86
+ .map(([key, t]) => ({ key, ...t }));
87
+
88
+ if (detectedTargets.length === 0) {
89
+ console.log(' ⚠ 지원되는 AI 코딩 도구를 찾을 수 없습니다.');
90
+ console.log(' 지원 도구: Claude Code (~/.claude/), Codex CLI (~/.codex/), Gemini CLI (~/.gemini/)');
91
+ process.exit(1);
92
+ }
93
+
94
+ console.log(` 감지된 도구: ${detectedTargets.map(t => t.label).join(', ')}`);
95
+ console.log('');
96
+
97
+ // --all: 전체 설치 (대화형 건너뛰기)
98
+ const installAll = args.includes('--all');
99
+
100
+ // 설치 대상 도구 선택
101
+ let selectedTargets;
102
+
103
+ if (installAll || detectedTargets.length === 1) {
104
+ selectedTargets = detectedTargets;
105
+ } else {
106
+ const targetChoices = detectedTargets.map(t => ({
107
+ title: t.label,
108
+ value: t,
109
+ selected: true,
110
+ }));
111
+
112
+ const targetResponse = await prompts({
113
+ type: 'multiselect',
114
+ name: 'targets',
115
+ message: '설치할 도구를 선택하세요 (Space로 토글, Enter로 확인)',
116
+ choices: targetChoices,
117
+ hint: '- 방향키로 이동, Space로 선택/해제',
118
+ instructions: false,
119
+ });
120
+
121
+ if (!targetResponse.targets || targetResponse.targets.length === 0) {
122
+ console.log(' 선택된 도구가 없습니다. 종료합니다.');
123
+ process.exit(0);
124
+ }
125
+
126
+ selectedTargets = targetResponse.targets;
127
+ }
128
+
129
+ let selectedSkills;
130
+
131
+ if (installAll) {
132
+ selectedSkills = availableSkills;
133
+ } else {
134
+ const choices = availableSkills.map(skill => ({
135
+ title: skill,
136
+ description: SKILL_META[skill]?.description || '',
137
+ value: skill,
138
+ selected: true,
139
+ }));
140
+
141
+ const response = await prompts({
142
+ type: 'multiselect',
143
+ name: 'skills',
144
+ message: '설치할 스킬을 선택하세요 (Space로 토글, Enter로 확인)',
145
+ choices,
146
+ hint: '- 방향키로 이동, Space로 선택/해제',
147
+ instructions: false,
148
+ });
149
+
150
+ if (!response.skills || response.skills.length === 0) {
151
+ console.log(' 선택된 스킬이 없습니다. 종료합니다.');
152
+ process.exit(0);
153
+ }
154
+
155
+ selectedSkills = response.skills;
156
+ }
157
+
158
+ // 설치 실행
159
+ for (const target of selectedTargets) {
160
+ // 디렉토리 생성
161
+ fs.mkdirSync(target.dir, { recursive: true });
162
+
163
+ for (const skill of selectedSkills) {
164
+ const destPath = path.join(target.dir, skill);
165
+ const exists = fs.existsSync(destPath);
166
+
167
+ if (exists && !installAll) {
168
+ const { overwrite } = await prompts({
169
+ type: 'confirm',
170
+ name: 'overwrite',
171
+ message: `${skill}이(가) 이미 설치되어 있습니다. 덮어쓸까요?`,
172
+ initial: true,
173
+ });
174
+
175
+ if (!overwrite) {
176
+ console.log(` ⏭ ${skill} 건너뜀`);
177
+ continue;
178
+ }
179
+ }
180
+
181
+ copySkill(skill, target.dir);
182
+ console.log(` ✓ ${skill} → ${target.label}`);
183
+ }
184
+ }
185
+
186
+ console.log('');
187
+ console.log(' 설치 완료!');
188
+ console.log('');
189
+ }
190
+
191
+ main().catch(err => {
192
+ console.error('오류:', err.message);
193
+ process.exit(1);
194
+ });
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@p.e.c/boaz-skills",
3
+ "version": "1.3.0",
4
+ "description": "AI 코딩 도구용 스킬 모음 (Claude Code, Codex, Gemini)",
5
+ "type": "module",
6
+ "bin": {
7
+ "boaz-skills": "bin/cli.mjs"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "skills",
12
+ "README.md"
13
+ ],
14
+ "keywords": [
15
+ "claude-code",
16
+ "codex",
17
+ "gemini-cli",
18
+ "skills",
19
+ "ai-coding",
20
+ "notion",
21
+ "debugging",
22
+ "hwp",
23
+ "hwpx",
24
+ "hwpx-mcp"
25
+ ],
26
+ "author": "Boaz",
27
+ "license": "MIT",
28
+ "dependencies": {
29
+ "prompts": "^2.4.2"
30
+ }
31
+ }
@@ -0,0 +1,233 @@
1
+ ---
2
+ name: debug
3
+ description: 'Systematic debugging workflow based on Kernighan, Pike, Feathers, and Gregg methodologies. Activates on keywords: debug, bug, error, issue, troubleshoot, crash, fix, broken'
4
+ ---
5
+
6
+ # Systematic Debugging
7
+
8
+ > "Debugging is twice as hard as writing the code in the first place." — Brian Kernighan
9
+
10
+ ## The Two Schools of Debugging
11
+
12
+ | School | Core Question | Method | Masters |
13
+ |--------|--------------|--------|---------|
14
+ | **Symptom Tracing** | What is broken? | Logs, tracing, observability | Pike / Gregg |
15
+ | **Root Cause Elimination** | Why did it break? | Minimal reproduction, hypothesis, experiment | Kernighan / Feathers |
16
+
17
+ **Key Insight**: Master debuggers combine both approaches.
18
+
19
+ ---
20
+
21
+ ## Universal Debugging Protocol (UDP)
22
+
23
+ ```
24
+ 1. STOP → Define the problem clearly (expected vs actual)
25
+ 2. REPRODUCE → Create minimal, reliable reproduction
26
+ 3. OBSERVE → Collect evidence (logs, state, traces)
27
+ 4. HYPOTHESIZE → Form testable hypothesis (max 3)
28
+ 5. TEST → Change ONE thing, observe result
29
+ 6. FIX → Apply minimal fix
30
+ 7. VERIFY → Confirm fix, run regression tests
31
+ 8. DOCUMENT → Record cause, solution, lessons learned
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Kernighan's 9 Indispensable Rules
37
+
38
+ 1. **Understand the system** — Read before debug
39
+ 2. **Make it fail** — Reproducibility is everything
40
+ 3. **Quit thinking and look** — Observe, don't assume
41
+ 4. **Divide and conquer** — Binary search the problem space
42
+ 5. **Change one thing at a time** — Isolate variables
43
+ 6. **Keep an audit trail** — Log everything you try
44
+ 7. **Check the plug** — Verify the obvious first
45
+ 8. **Get a fresh view** — Rubber duck, colleague, or sleep on it
46
+ 9. **If you didn't fix it, it isn't fixed** — Verify ruthlessly
47
+
48
+ ---
49
+
50
+ ## Gregg's Observability Principles
51
+
52
+ ### USE Method (for resources)
53
+ - **U**tilization: How busy is the resource?
54
+ - **S**aturation: How much work is queued?
55
+ - **E**rrors: Are there error events?
56
+
57
+ ### RED Method (for services)
58
+ - **R**ate: Requests per second
59
+ - **E**rrors: Failed requests
60
+ - **D**uration: Latency distribution
61
+
62
+ ### Flame Graphs
63
+ Visualize CPU/memory hotspots. Stack depth = call chain, width = time spent.
64
+
65
+ ---
66
+
67
+ ## Feathers' Legacy Code Approach
68
+
69
+ When debugging unfamiliar or legacy code:
70
+
71
+ 1. **Seam** — Find a point to insert observation/tests
72
+ 2. **Cover** — Add characterization test (capture current behavior)
73
+ 3. **Change** — Modify with safety net
74
+ 4. **Refactor** — Clean up after fixing
75
+
76
+ ---
77
+
78
+ ## Anti-Patterns to Avoid
79
+
80
+ | Don't | Do Instead |
81
+ |-------|------------|
82
+ | Change multiple things at once | Change ONE thing, observe |
83
+ | Fix without understanding | Understand root cause first |
84
+ | Skip reproduction step | Build reliable repro case |
85
+ | Debug in production | Reproduce locally if possible |
86
+ | Trust "works on my machine" | Check environment differences |
87
+ | Guess without data | Observe and measure first |
88
+
89
+ ---
90
+
91
+ ## Claude Interaction Protocol
92
+
93
+ When helping with debugging, follow this workflow:
94
+
95
+ ### Phase 1: Problem Definition
96
+
97
+ ```
98
+ 1. ASK: "What is the expected behavior vs actual behavior?"
99
+ 2. ASK: "When did this start? Any recent changes?"
100
+ 3. ASK: "Is it reproducible? Steps to reproduce?"
101
+ 4. CREATE: debug_notes.md to track investigation
102
+ ```
103
+
104
+ ### Phase 2: Reproduction
105
+
106
+ ```
107
+ 1. ATTEMPT: Reproduce the issue
108
+ 2. DOCUMENT: Steps to reproduce in debug_notes.md
109
+ 3. SIMPLIFY: Find minimal reproduction case
110
+ 4. IDENTIFY: Consistent vs intermittent failure
111
+ ```
112
+
113
+ ### Phase 3: Investigation
114
+
115
+ ```
116
+ 1. OBSERVE: Gather logs, errors, stack traces
117
+ 2. HYPOTHESIZE: Form at most 3 hypotheses
118
+ 3. TEST: Each hypothesis with ONE change at a time
119
+ 4. RECORD: Every attempt in debug_notes.md
120
+ 5. NARROW: Use divide-and-conquer to isolate
121
+ ```
122
+
123
+ ### Phase 4: Resolution
124
+
125
+ ```
126
+ 1. FIX: Apply minimal fix
127
+ 2. VERIFY: Confirm fix works
128
+ 3. REGRESS: Check for side effects
129
+ 4. PREVENT: Add test if appropriate
130
+ 5. SUMMARIZE: Root cause and solution in debug_notes.md
131
+ ```
132
+
133
+ ---
134
+
135
+ ## debug_notes.md Template
136
+
137
+ Create this file to track debugging investigations:
138
+
139
+ ```markdown
140
+ # Debug Notes: [Issue Description]
141
+
142
+ ## Problem Statement
143
+ - **Expected**: [what should happen]
144
+ - **Actual**: [what happens]
145
+ - **Severity**: [critical/high/medium/low]
146
+ - **First observed**: [when]
147
+
148
+ ## Environment
149
+ - OS:
150
+ - Version:
151
+ - Dependencies:
152
+
153
+ ## Reproduction Steps
154
+ 1. [step]
155
+ 2. [step]
156
+ 3. [observe failure]
157
+
158
+ ## Hypotheses
159
+ - [ ] H1: [hypothesis] — [how to test]
160
+ - [ ] H2: [hypothesis] — [how to test]
161
+ - [ ] H3: [hypothesis] — [how to test]
162
+
163
+ ## Investigation Log
164
+
165
+ | Time | Action | Result | Next Step |
166
+ |------|--------|--------|-----------|
167
+ | | | | |
168
+
169
+ ## Root Cause
170
+ [Explanation of why the bug occurred]
171
+
172
+ ## Solution
173
+ [What was changed and why]
174
+
175
+ ## Prevention
176
+ [How to prevent similar issues: tests, guards, docs]
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Quick Decision Tree
182
+
183
+ ```
184
+ Problem reported
185
+
186
+
187
+ Can reproduce? ─No──▶ Get more info (logs, environment)
188
+
189
+ Yes
190
+
191
+
192
+ Recent change? ─Yes──▶ Check diff, rollback test
193
+
194
+ No
195
+
196
+
197
+ Obvious cause? ─Yes──▶ Verify with minimal test
198
+
199
+ No
200
+
201
+
202
+ Divide and conquer
203
+
204
+
205
+ Isolate component
206
+
207
+
208
+ Form hypothesis (max 3)
209
+
210
+
211
+ Test ONE change at a time
212
+
213
+
214
+ Fix → Verify → Document
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Domain-Specific Checklists
220
+
221
+ See [checklists.md](checklists.md) for:
222
+ - Streaming/Buffer Issues
223
+ - BLE/UART Communication
224
+ - AI Inference Bottlenecks
225
+ - System Observability
226
+ - Network/API Issues
227
+ - Memory/Crash Issues
228
+ - App Debugging
229
+ - Web Debugging
230
+
231
+ ## Tool Reference
232
+
233
+ See [reference.md](reference.md) for tool commands and recipes.