@kood/claude-code 0.1.9 → 0.1.11
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/dist/index.js +54 -35
- package/package.json +1 -1
- package/templates/hono/docs/commands/docs-creator.md +239 -0
- package/templates/hono/docs/commands/docs-refactor.md +168 -0
- package/templates/hono/docs/commands/git-all.md +83 -0
- package/templates/hono/docs/commands/git-session.md +91 -0
- package/templates/hono/docs/commands/git.md +86 -0
- package/templates/hono/docs/commands/lint-fix.md +170 -0
- package/templates/hono/docs/commands/lint-init.md +300 -0
- package/templates/hono/docs/commands/ts-fix.md +176 -0
- package/templates/hono/docs/skills/command-creator/LICENSE.txt +202 -0
- package/templates/hono/docs/skills/command-creator/SKILL.md +245 -0
- package/templates/hono/docs/skills/command-creator/scripts/init_command.py +244 -0
- package/templates/hono/docs/skills/command-creator/scripts/package_command.py +125 -0
- package/templates/hono/docs/skills/command-creator/scripts/quick_validate.py +143 -0
- package/templates/hono/docs/skills/skill-creator/LICENSE.txt +202 -0
- package/templates/hono/docs/skills/skill-creator/SKILL.md +184 -0
- package/templates/hono/docs/skills/skill-creator/scripts/init_skill.py +303 -0
- package/templates/hono/docs/skills/skill-creator/scripts/package_skill.py +110 -0
- package/templates/hono/docs/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/templates/npx/docs/commands/docs-creator.md +239 -0
- package/templates/npx/docs/commands/docs-refactor.md +168 -0
- package/templates/npx/docs/commands/git-all.md +83 -0
- package/templates/npx/docs/commands/git-session.md +91 -0
- package/templates/npx/docs/commands/git.md +86 -0
- package/templates/npx/docs/commands/lint-fix.md +170 -0
- package/templates/npx/docs/commands/lint-init.md +300 -0
- package/templates/npx/docs/commands/ts-fix.md +176 -0
- package/templates/npx/docs/skills/command-creator/LICENSE.txt +202 -0
- package/templates/npx/docs/skills/command-creator/SKILL.md +245 -0
- package/templates/npx/docs/skills/command-creator/scripts/init_command.py +244 -0
- package/templates/npx/docs/skills/command-creator/scripts/package_command.py +125 -0
- package/templates/npx/docs/skills/command-creator/scripts/quick_validate.py +143 -0
- package/templates/npx/docs/skills/skill-creator/LICENSE.txt +202 -0
- package/templates/npx/docs/skills/skill-creator/SKILL.md +184 -0
- package/templates/npx/docs/skills/skill-creator/scripts/init_skill.py +303 -0
- package/templates/npx/docs/skills/skill-creator/scripts/package_skill.py +110 -0
- package/templates/npx/docs/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/templates/tanstack-start/docs/commands/docs-creator.md +239 -0
- package/templates/tanstack-start/docs/commands/docs-refactor.md +168 -0
- package/templates/tanstack-start/docs/commands/git-all.md +83 -0
- package/templates/tanstack-start/docs/commands/git-session.md +91 -0
- package/templates/tanstack-start/docs/commands/git.md +86 -0
- package/templates/tanstack-start/docs/commands/lint-fix.md +170 -0
- package/templates/tanstack-start/docs/commands/lint-init.md +300 -0
- package/templates/tanstack-start/docs/commands/ts-fix.md +176 -0
- package/templates/tanstack-start/docs/skills/command-creator/LICENSE.txt +202 -0
- package/templates/tanstack-start/docs/skills/command-creator/SKILL.md +245 -0
- package/templates/tanstack-start/docs/skills/command-creator/scripts/init_command.py +244 -0
- package/templates/tanstack-start/docs/skills/command-creator/scripts/package_command.py +125 -0
- package/templates/tanstack-start/docs/skills/command-creator/scripts/quick_validate.py +143 -0
- package/templates/tanstack-start/docs/skills/skill-creator/LICENSE.txt +202 -0
- package/templates/tanstack-start/docs/skills/skill-creator/SKILL.md +184 -0
- package/templates/tanstack-start/docs/skills/skill-creator/scripts/init_skill.py +303 -0
- package/templates/tanstack-start/docs/skills/skill-creator/scripts/package_skill.py +110 -0
- package/templates/tanstack-start/docs/skills/skill-creator/scripts/quick_validate.py +65 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-creator
|
|
3
|
+
description: 스킬 생성 가이드. 새로운 스킬을 만들거나 기존 스킬을 수정할 때 사용. (project)
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Creator
|
|
8
|
+
|
|
9
|
+
Claude 기능 확장을 위한 스킬 생성 가이드.
|
|
10
|
+
|
|
11
|
+
## 스킬 개요
|
|
12
|
+
|
|
13
|
+
스킬은 특화된 지식, 워크플로우, 도구를 제공하는 모듈. Claude를 범용 에이전트에서 전문 에이전트로 변환.
|
|
14
|
+
|
|
15
|
+
### 스킬 제공 요소
|
|
16
|
+
|
|
17
|
+
| 요소 | 설명 |
|
|
18
|
+
|------|------|
|
|
19
|
+
| 워크플로우 | 특정 도메인의 다단계 절차 |
|
|
20
|
+
| 도구 통합 | 파일 형식, API 작업 지침 |
|
|
21
|
+
| 도메인 전문성 | 회사별 지식, 스키마, 비즈니스 로직 |
|
|
22
|
+
| 번들 리소스 | 스크립트, 참조 문서, 에셋 |
|
|
23
|
+
|
|
24
|
+
### 스킬 구조
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
skill-name/
|
|
28
|
+
├── SKILL.md (필수)
|
|
29
|
+
│ ├── YAML frontmatter (name, description 필수)
|
|
30
|
+
│ └── Markdown 지침
|
|
31
|
+
└── 번들 리소스 (선택)
|
|
32
|
+
├── scripts/ - 실행 가능 코드
|
|
33
|
+
├── references/ - 참조 문서
|
|
34
|
+
└── assets/ - 출력용 파일 (템플릿, 이미지 등)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 번들 리소스
|
|
38
|
+
|
|
39
|
+
| 디렉토리 | 용도 | 예시 |
|
|
40
|
+
|----------|------|------|
|
|
41
|
+
| `scripts/` | 반복 작업용 결정론적 코드 | `rotate_pdf.py` |
|
|
42
|
+
| `references/` | 컨텍스트에 로드될 문서 | `schema.md`, `api_docs.md` |
|
|
43
|
+
| `assets/` | 출력에 사용될 파일 | `logo.png`, `template.pptx` |
|
|
44
|
+
|
|
45
|
+
**references 원칙**: SKILL.md는 간결하게, 상세 정보는 references로 분리. 대용량 파일(>10k 단어)은 grep 패턴 포함.
|
|
46
|
+
|
|
47
|
+
### 점진적 로딩
|
|
48
|
+
|
|
49
|
+
| 레벨 | 내용 | 크기 |
|
|
50
|
+
|------|------|------|
|
|
51
|
+
| 메타데이터 | name + description | ~100 단어 |
|
|
52
|
+
| SKILL.md 본문 | 스킬 트리거 시 | <5k 단어 |
|
|
53
|
+
| 번들 리소스 | 필요 시 로드 | 무제한 |
|
|
54
|
+
|
|
55
|
+
### Description 작성
|
|
56
|
+
|
|
57
|
+
description은 스킬 발견의 핵심. 100+ 스킬 중에서 선택됨.
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
# Good - 구체적 + 트리거 포함
|
|
61
|
+
description: PDF 텍스트/표 추출, 폼 작성. PDF 작업 시 사용. (project)
|
|
62
|
+
|
|
63
|
+
# Bad - 모호함
|
|
64
|
+
description: 문서 처리
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**규칙:**
|
|
68
|
+
- 3인칭 작성 (시스템 프롬프트에 주입됨)
|
|
69
|
+
- 무엇을 하는지 + 언제 사용하는지
|
|
70
|
+
- 구체적 키워드 포함
|
|
71
|
+
- scope 명시: `(project)`, `(user)`, `(managed)`
|
|
72
|
+
|
|
73
|
+
## 생성 프로세스
|
|
74
|
+
|
|
75
|
+
### 1단계: 사용 사례 파악
|
|
76
|
+
|
|
77
|
+
스킬 사용 패턴 이해. 질문 예시:
|
|
78
|
+
- "어떤 기능을 지원해야 하나?"
|
|
79
|
+
- "사용 예시를 보여줄 수 있나?"
|
|
80
|
+
- "스킬을 트리거할 사용자 요청은?"
|
|
81
|
+
|
|
82
|
+
### 2단계: 재사용 콘텐츠 계획
|
|
83
|
+
|
|
84
|
+
각 사용 사례 분석:
|
|
85
|
+
1. 처음부터 실행하는 방법 고려
|
|
86
|
+
2. 반복 실행 시 유용한 스크립트/참조/에셋 식별
|
|
87
|
+
|
|
88
|
+
**예시**:
|
|
89
|
+
- `pdf-editor`: PDF 회전 코드 반복 → `scripts/rotate_pdf.py`
|
|
90
|
+
- `frontend-builder`: 보일러플레이트 반복 → `assets/hello-world/`
|
|
91
|
+
- `big-query`: 스키마 재탐색 반복 → `references/schema.md`
|
|
92
|
+
|
|
93
|
+
### 3단계: 스킬 초기화
|
|
94
|
+
|
|
95
|
+
새 스킬 생성 시 init 스크립트 실행:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
scripts/init_skill.py <skill-name> --path <output-directory>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
생성 내용: SKILL.md 템플릿, scripts/, references/, assets/ 예제
|
|
102
|
+
|
|
103
|
+
### 4단계: 스킬 편집
|
|
104
|
+
|
|
105
|
+
**작성 스타일**: 명령형/부정형 사용 ("X를 수행" ← "X를 수행해야 합니다" ❌)
|
|
106
|
+
|
|
107
|
+
편집 순서:
|
|
108
|
+
1. `scripts/`, `references/`, `assets/` 구현 (사용자 입력 필요 시 요청)
|
|
109
|
+
2. 불필요한 예제 파일 삭제
|
|
110
|
+
3. SKILL.md 완성:
|
|
111
|
+
- 스킬 목적 (2-3문장)
|
|
112
|
+
- 사용 시점
|
|
113
|
+
- 사용 방법 (모든 번들 리소스 참조)
|
|
114
|
+
|
|
115
|
+
### 5단계: 패키징
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
scripts/package_skill.py <path/to/skill-folder> [output-directory]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
자동 검증 후 zip 생성. 오류 시 수정 후 재실행.
|
|
122
|
+
|
|
123
|
+
### 6단계: 반복
|
|
124
|
+
|
|
125
|
+
사용 → 문제 발견 → 수정 → 재테스트
|
|
126
|
+
|
|
127
|
+
## Subagent 활용
|
|
128
|
+
|
|
129
|
+
스킬 생성 시 subagent를 활용하여 메인 컨텍스트 보호.
|
|
130
|
+
|
|
131
|
+
### 활용 시점
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
1. Explore agent → 기존 스킬 패턴 분석
|
|
135
|
+
2. Explore agent → 관련 코드/워크플로우 파악
|
|
136
|
+
3. Plan agent → 스킬 구조 설계
|
|
137
|
+
4. 메인 에이전트 → 설계 기반 작성
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 프롬프트 예시
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Explore agent에게:
|
|
144
|
+
"프로젝트의 스킬 구조와 패턴을 분석하고 보고해줘:
|
|
145
|
+
- 기존 스킬 목록 및 용도
|
|
146
|
+
- 공통 구조 (섹션, 참조 방식)
|
|
147
|
+
- 번들 리소스 활용 패턴"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
Plan agent에게:
|
|
152
|
+
"새 스킬 구조 설계:
|
|
153
|
+
- 목적 및 사용 시나리오
|
|
154
|
+
- SKILL.md 섹션 구성
|
|
155
|
+
- 참조 파일 분리 계획
|
|
156
|
+
- 번들 리소스 (scripts/references/assets)"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## 체크리스트
|
|
160
|
+
|
|
161
|
+
### 계획 단계
|
|
162
|
+
|
|
163
|
+
- [ ] 사용 사례 파악
|
|
164
|
+
- [ ] 재사용 콘텐츠 식별
|
|
165
|
+
- [ ] 번들 리소스 계획
|
|
166
|
+
|
|
167
|
+
### 작성 단계
|
|
168
|
+
|
|
169
|
+
- [ ] description 구체적 작성 (3인칭, 트리거)
|
|
170
|
+
- [ ] SKILL.md 500줄 이하
|
|
171
|
+
- [ ] 명령형 작성
|
|
172
|
+
- [ ] 참조 1단계 깊이
|
|
173
|
+
- [ ] 100줄+ 파일 목차 포함
|
|
174
|
+
|
|
175
|
+
### 검증 단계
|
|
176
|
+
|
|
177
|
+
- [ ] 스킬 트리거 테스트
|
|
178
|
+
- [ ] 번들 리소스 접근 확인
|
|
179
|
+
- [ ] 다양한 시나리오 테스트
|
|
180
|
+
|
|
181
|
+
## 참조
|
|
182
|
+
|
|
183
|
+
- [Skill Best Practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
|
|
184
|
+
- [Claude Code Best Practices](https://www.anthropic.com/engineering/claude-code-best-practices)
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Skill Initializer - Creates a new skill from template
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
init_skill.py <skill-name> --path <path>
|
|
7
|
+
|
|
8
|
+
Examples:
|
|
9
|
+
init_skill.py my-new-skill --path skills/public
|
|
10
|
+
init_skill.py my-api-helper --path skills/private
|
|
11
|
+
init_skill.py custom-skill --path /custom/location
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import sys
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
SKILL_TEMPLATE = """---
|
|
19
|
+
name: {skill_name}
|
|
20
|
+
description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# {skill_title}
|
|
24
|
+
|
|
25
|
+
## Overview
|
|
26
|
+
|
|
27
|
+
[TODO: 1-2 sentences explaining what this skill enables]
|
|
28
|
+
|
|
29
|
+
## Structuring This Skill
|
|
30
|
+
|
|
31
|
+
[TODO: Choose the structure that best fits this skill's purpose. Common patterns:
|
|
32
|
+
|
|
33
|
+
**1. Workflow-Based** (best for sequential processes)
|
|
34
|
+
- Works well when there are clear step-by-step procedures
|
|
35
|
+
- Example: DOCX skill with "Workflow Decision Tree" → "Reading" → "Creating" → "Editing"
|
|
36
|
+
- Structure: ## Overview → ## Workflow Decision Tree → ## Step 1 → ## Step 2...
|
|
37
|
+
|
|
38
|
+
**2. Task-Based** (best for tool collections)
|
|
39
|
+
- Works well when the skill offers different operations/capabilities
|
|
40
|
+
- Example: PDF skill with "Quick Start" → "Merge PDFs" → "Split PDFs" → "Extract Text"
|
|
41
|
+
- Structure: ## Overview → ## Quick Start → ## Task Category 1 → ## Task Category 2...
|
|
42
|
+
|
|
43
|
+
**3. Reference/Guidelines** (best for standards or specifications)
|
|
44
|
+
- Works well for brand guidelines, coding standards, or requirements
|
|
45
|
+
- Example: Brand styling with "Brand Guidelines" → "Colors" → "Typography" → "Features"
|
|
46
|
+
- Structure: ## Overview → ## Guidelines → ## Specifications → ## Usage...
|
|
47
|
+
|
|
48
|
+
**4. Capabilities-Based** (best for integrated systems)
|
|
49
|
+
- Works well when the skill provides multiple interrelated features
|
|
50
|
+
- Example: Product Management with "Core Capabilities" → numbered capability list
|
|
51
|
+
- Structure: ## Overview → ## Core Capabilities → ### 1. Feature → ### 2. Feature...
|
|
52
|
+
|
|
53
|
+
Patterns can be mixed and matched as needed. Most skills combine patterns (e.g., start with task-based, add workflow for complex operations).
|
|
54
|
+
|
|
55
|
+
Delete this entire "Structuring This Skill" section when done - it's just guidance.]
|
|
56
|
+
|
|
57
|
+
## [TODO: Replace with the first main section based on chosen structure]
|
|
58
|
+
|
|
59
|
+
[TODO: Add content here. See examples in existing skills:
|
|
60
|
+
- Code samples for technical skills
|
|
61
|
+
- Decision trees for complex workflows
|
|
62
|
+
- Concrete examples with realistic user requests
|
|
63
|
+
- References to scripts/templates/references as needed]
|
|
64
|
+
|
|
65
|
+
## Resources
|
|
66
|
+
|
|
67
|
+
This skill includes example resource directories that demonstrate how to organize different types of bundled resources:
|
|
68
|
+
|
|
69
|
+
### scripts/
|
|
70
|
+
Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
|
|
71
|
+
|
|
72
|
+
**Examples from other skills:**
|
|
73
|
+
- PDF skill: `fill_fillable_fields.py`, `extract_form_field_info.py` - utilities for PDF manipulation
|
|
74
|
+
- DOCX skill: `document.py`, `utilities.py` - Python modules for document processing
|
|
75
|
+
|
|
76
|
+
**Appropriate for:** Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
|
|
77
|
+
|
|
78
|
+
**Note:** Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
|
|
79
|
+
|
|
80
|
+
### references/
|
|
81
|
+
Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.
|
|
82
|
+
|
|
83
|
+
**Examples from other skills:**
|
|
84
|
+
- Product management: `communication.md`, `context_building.md` - detailed workflow guides
|
|
85
|
+
- BigQuery: API reference documentation and query examples
|
|
86
|
+
- Finance: Schema documentation, company policies
|
|
87
|
+
|
|
88
|
+
**Appropriate for:** In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
|
|
89
|
+
|
|
90
|
+
### assets/
|
|
91
|
+
Files not intended to be loaded into context, but rather used within the output Claude produces.
|
|
92
|
+
|
|
93
|
+
**Examples from other skills:**
|
|
94
|
+
- Brand styling: PowerPoint template files (.pptx), logo files
|
|
95
|
+
- Frontend builder: HTML/React boilerplate project directories
|
|
96
|
+
- Typography: Font files (.ttf, .woff2)
|
|
97
|
+
|
|
98
|
+
**Appropriate for:** Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
**Any unneeded directories can be deleted.** Not every skill requires all three types of resources.
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
EXAMPLE_SCRIPT = '''#!/usr/bin/env python3
|
|
106
|
+
"""
|
|
107
|
+
Example helper script for {skill_name}
|
|
108
|
+
|
|
109
|
+
This is a placeholder script that can be executed directly.
|
|
110
|
+
Replace with actual implementation or delete if not needed.
|
|
111
|
+
|
|
112
|
+
Example real scripts from other skills:
|
|
113
|
+
- pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
|
|
114
|
+
- pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
|
|
115
|
+
"""
|
|
116
|
+
|
|
117
|
+
def main():
|
|
118
|
+
print("This is an example script for {skill_name}")
|
|
119
|
+
# TODO: Add actual script logic here
|
|
120
|
+
# This could be data processing, file conversion, API calls, etc.
|
|
121
|
+
|
|
122
|
+
if __name__ == "__main__":
|
|
123
|
+
main()
|
|
124
|
+
'''
|
|
125
|
+
|
|
126
|
+
EXAMPLE_REFERENCE = """# Reference Documentation for {skill_title}
|
|
127
|
+
|
|
128
|
+
This is a placeholder for detailed reference documentation.
|
|
129
|
+
Replace with actual reference content or delete if not needed.
|
|
130
|
+
|
|
131
|
+
Example real reference docs from other skills:
|
|
132
|
+
- product-management/references/communication.md - Comprehensive guide for status updates
|
|
133
|
+
- product-management/references/context_building.md - Deep-dive on gathering context
|
|
134
|
+
- bigquery/references/ - API references and query examples
|
|
135
|
+
|
|
136
|
+
## When Reference Docs Are Useful
|
|
137
|
+
|
|
138
|
+
Reference docs are ideal for:
|
|
139
|
+
- Comprehensive API documentation
|
|
140
|
+
- Detailed workflow guides
|
|
141
|
+
- Complex multi-step processes
|
|
142
|
+
- Information too lengthy for main SKILL.md
|
|
143
|
+
- Content that's only needed for specific use cases
|
|
144
|
+
|
|
145
|
+
## Structure Suggestions
|
|
146
|
+
|
|
147
|
+
### API Reference Example
|
|
148
|
+
- Overview
|
|
149
|
+
- Authentication
|
|
150
|
+
- Endpoints with examples
|
|
151
|
+
- Error codes
|
|
152
|
+
- Rate limits
|
|
153
|
+
|
|
154
|
+
### Workflow Guide Example
|
|
155
|
+
- Prerequisites
|
|
156
|
+
- Step-by-step instructions
|
|
157
|
+
- Common patterns
|
|
158
|
+
- Troubleshooting
|
|
159
|
+
- Best practices
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
EXAMPLE_ASSET = """# Example Asset File
|
|
163
|
+
|
|
164
|
+
This placeholder represents where asset files would be stored.
|
|
165
|
+
Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
|
|
166
|
+
|
|
167
|
+
Asset files are NOT intended to be loaded into context, but rather used within
|
|
168
|
+
the output Claude produces.
|
|
169
|
+
|
|
170
|
+
Example asset files from other skills:
|
|
171
|
+
- Brand guidelines: logo.png, slides_template.pptx
|
|
172
|
+
- Frontend builder: hello-world/ directory with HTML/React boilerplate
|
|
173
|
+
- Typography: custom-font.ttf, font-family.woff2
|
|
174
|
+
- Data: sample_data.csv, test_dataset.json
|
|
175
|
+
|
|
176
|
+
## Common Asset Types
|
|
177
|
+
|
|
178
|
+
- Templates: .pptx, .docx, boilerplate directories
|
|
179
|
+
- Images: .png, .jpg, .svg, .gif
|
|
180
|
+
- Fonts: .ttf, .otf, .woff, .woff2
|
|
181
|
+
- Boilerplate code: Project directories, starter files
|
|
182
|
+
- Icons: .ico, .svg
|
|
183
|
+
- Data files: .csv, .json, .xml, .yaml
|
|
184
|
+
|
|
185
|
+
Note: This is a text placeholder. Actual assets can be any file type.
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
def title_case_skill_name(skill_name):
|
|
190
|
+
"""Convert hyphenated skill name to Title Case for display."""
|
|
191
|
+
return ' '.join(word.capitalize() for word in skill_name.split('-'))
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
def init_skill(skill_name, path):
|
|
195
|
+
"""
|
|
196
|
+
Initialize a new skill directory with template SKILL.md.
|
|
197
|
+
|
|
198
|
+
Args:
|
|
199
|
+
skill_name: Name of the skill
|
|
200
|
+
path: Path where the skill directory should be created
|
|
201
|
+
|
|
202
|
+
Returns:
|
|
203
|
+
Path to created skill directory, or None if error
|
|
204
|
+
"""
|
|
205
|
+
# Determine skill directory path
|
|
206
|
+
skill_dir = Path(path).resolve() / skill_name
|
|
207
|
+
|
|
208
|
+
# Check if directory already exists
|
|
209
|
+
if skill_dir.exists():
|
|
210
|
+
print(f"❌ Error: Skill directory already exists: {skill_dir}")
|
|
211
|
+
return None
|
|
212
|
+
|
|
213
|
+
# Create skill directory
|
|
214
|
+
try:
|
|
215
|
+
skill_dir.mkdir(parents=True, exist_ok=False)
|
|
216
|
+
print(f"✅ Created skill directory: {skill_dir}")
|
|
217
|
+
except Exception as e:
|
|
218
|
+
print(f"❌ Error creating directory: {e}")
|
|
219
|
+
return None
|
|
220
|
+
|
|
221
|
+
# Create SKILL.md from template
|
|
222
|
+
skill_title = title_case_skill_name(skill_name)
|
|
223
|
+
skill_content = SKILL_TEMPLATE.format(
|
|
224
|
+
skill_name=skill_name,
|
|
225
|
+
skill_title=skill_title
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
skill_md_path = skill_dir / 'SKILL.md'
|
|
229
|
+
try:
|
|
230
|
+
skill_md_path.write_text(skill_content)
|
|
231
|
+
print("✅ Created SKILL.md")
|
|
232
|
+
except Exception as e:
|
|
233
|
+
print(f"❌ Error creating SKILL.md: {e}")
|
|
234
|
+
return None
|
|
235
|
+
|
|
236
|
+
# Create resource directories with example files
|
|
237
|
+
try:
|
|
238
|
+
# Create scripts/ directory with example script
|
|
239
|
+
scripts_dir = skill_dir / 'scripts'
|
|
240
|
+
scripts_dir.mkdir(exist_ok=True)
|
|
241
|
+
example_script = scripts_dir / 'example.py'
|
|
242
|
+
example_script.write_text(EXAMPLE_SCRIPT.format(skill_name=skill_name))
|
|
243
|
+
example_script.chmod(0o755)
|
|
244
|
+
print("✅ Created scripts/example.py")
|
|
245
|
+
|
|
246
|
+
# Create references/ directory with example reference doc
|
|
247
|
+
references_dir = skill_dir / 'references'
|
|
248
|
+
references_dir.mkdir(exist_ok=True)
|
|
249
|
+
example_reference = references_dir / 'api_reference.md'
|
|
250
|
+
example_reference.write_text(EXAMPLE_REFERENCE.format(skill_title=skill_title))
|
|
251
|
+
print("✅ Created references/api_reference.md")
|
|
252
|
+
|
|
253
|
+
# Create assets/ directory with example asset placeholder
|
|
254
|
+
assets_dir = skill_dir / 'assets'
|
|
255
|
+
assets_dir.mkdir(exist_ok=True)
|
|
256
|
+
example_asset = assets_dir / 'example_asset.txt'
|
|
257
|
+
example_asset.write_text(EXAMPLE_ASSET)
|
|
258
|
+
print("✅ Created assets/example_asset.txt")
|
|
259
|
+
except Exception as e:
|
|
260
|
+
print(f"❌ Error creating resource directories: {e}")
|
|
261
|
+
return None
|
|
262
|
+
|
|
263
|
+
# Print next steps
|
|
264
|
+
print(f"\n✅ Skill '{skill_name}' initialized successfully at {skill_dir}")
|
|
265
|
+
print("\nNext steps:")
|
|
266
|
+
print("1. Edit SKILL.md to complete the TODO items and update the description")
|
|
267
|
+
print("2. Customize or delete the example files in scripts/, references/, and assets/")
|
|
268
|
+
print("3. Run the validator when ready to check the skill structure")
|
|
269
|
+
|
|
270
|
+
return skill_dir
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
def main():
|
|
274
|
+
if len(sys.argv) < 4 or sys.argv[2] != '--path':
|
|
275
|
+
print("Usage: init_skill.py <skill-name> --path <path>")
|
|
276
|
+
print("\nSkill name requirements:")
|
|
277
|
+
print(" - Hyphen-case identifier (e.g., 'data-analyzer')")
|
|
278
|
+
print(" - Lowercase letters, digits, and hyphens only")
|
|
279
|
+
print(" - Max 40 characters")
|
|
280
|
+
print(" - Must match directory name exactly")
|
|
281
|
+
print("\nExamples:")
|
|
282
|
+
print(" init_skill.py my-new-skill --path skills/public")
|
|
283
|
+
print(" init_skill.py my-api-helper --path skills/private")
|
|
284
|
+
print(" init_skill.py custom-skill --path /custom/location")
|
|
285
|
+
sys.exit(1)
|
|
286
|
+
|
|
287
|
+
skill_name = sys.argv[1]
|
|
288
|
+
path = sys.argv[3]
|
|
289
|
+
|
|
290
|
+
print(f"🚀 Initializing skill: {skill_name}")
|
|
291
|
+
print(f" Location: {path}")
|
|
292
|
+
print()
|
|
293
|
+
|
|
294
|
+
result = init_skill(skill_name, path)
|
|
295
|
+
|
|
296
|
+
if result:
|
|
297
|
+
sys.exit(0)
|
|
298
|
+
else:
|
|
299
|
+
sys.exit(1)
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
if __name__ == "__main__":
|
|
303
|
+
main()
|