@kood/claude-code 0.1.10 → 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 +1 -1
- 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,125 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
커맨드 패키저 - 커맨드 파일을 배포용 zip 파일로 생성
|
|
4
|
+
|
|
5
|
+
사용법:
|
|
6
|
+
python package_command.py <commands-폴더-경로> [출력-디렉토리]
|
|
7
|
+
python package_command.py <command.md-경로> [출력-디렉토리]
|
|
8
|
+
|
|
9
|
+
예시:
|
|
10
|
+
python package_command.py .claude/commands
|
|
11
|
+
python package_command.py .claude/commands ./dist
|
|
12
|
+
python package_command.py .claude/commands/review-security.md
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import sys
|
|
16
|
+
import zipfile
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from quick_validate import validate_command, validate_commands_folder
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def package_commands(source_path, output_dir=None):
|
|
22
|
+
"""
|
|
23
|
+
커맨드 파일(들)을 zip 파일로 패키징.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
source_path: 커맨드 파일 또는 커맨드 폴더 경로
|
|
27
|
+
output_dir: zip 파일 출력 디렉토리 (선택)
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
생성된 zip 파일 경로, 오류 시 None
|
|
31
|
+
"""
|
|
32
|
+
source_path = Path(source_path).resolve()
|
|
33
|
+
|
|
34
|
+
# 소스 존재 확인
|
|
35
|
+
if not source_path.exists():
|
|
36
|
+
print(f"❌ 오류: 경로를 찾을 수 없음: {source_path}")
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
# 단일 파일인지 폴더인지 확인
|
|
40
|
+
is_folder = source_path.is_dir()
|
|
41
|
+
|
|
42
|
+
# 패키징 전 검증
|
|
43
|
+
print("🔍 커맨드 검증 중...")
|
|
44
|
+
|
|
45
|
+
if is_folder:
|
|
46
|
+
valid, results = validate_commands_folder(source_path)
|
|
47
|
+
for name, v, message in results:
|
|
48
|
+
status = "✅" if v else "❌"
|
|
49
|
+
print(f" [{status}] {name}: {message}")
|
|
50
|
+
if not valid:
|
|
51
|
+
print("\n❌ 검증 실패. 패키징 전에 오류를 수정해주세요.")
|
|
52
|
+
return None
|
|
53
|
+
print(f"\n✅ 모든 {len(results)}개 커맨드 검증 완료.\n")
|
|
54
|
+
else:
|
|
55
|
+
valid, message = validate_command(source_path)
|
|
56
|
+
if not valid:
|
|
57
|
+
print(f" ❌ 검증 실패: {message}")
|
|
58
|
+
print("\n패키징 전에 검증 오류를 수정해주세요.")
|
|
59
|
+
return None
|
|
60
|
+
print(f" ✅ {message}\n")
|
|
61
|
+
|
|
62
|
+
# 출력 위치 결정
|
|
63
|
+
if is_folder:
|
|
64
|
+
zip_name = source_path.name
|
|
65
|
+
else:
|
|
66
|
+
zip_name = source_path.stem
|
|
67
|
+
|
|
68
|
+
if output_dir:
|
|
69
|
+
output_path = Path(output_dir).resolve()
|
|
70
|
+
output_path.mkdir(parents=True, exist_ok=True)
|
|
71
|
+
else:
|
|
72
|
+
output_path = Path.cwd()
|
|
73
|
+
|
|
74
|
+
zip_filename = output_path / f"{zip_name}-commands.zip"
|
|
75
|
+
|
|
76
|
+
# zip 파일 생성
|
|
77
|
+
try:
|
|
78
|
+
with zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
|
79
|
+
if is_folder:
|
|
80
|
+
# 폴더의 모든 .md 파일 추가
|
|
81
|
+
for md_file in source_path.glob('**/*.md'):
|
|
82
|
+
arcname = md_file.relative_to(source_path.parent)
|
|
83
|
+
zipf.write(md_file, arcname)
|
|
84
|
+
print(f" 📦 추가: {arcname}")
|
|
85
|
+
else:
|
|
86
|
+
# 단일 파일 추가
|
|
87
|
+
arcname = source_path.name
|
|
88
|
+
zipf.write(source_path, arcname)
|
|
89
|
+
print(f" 📦 추가: {arcname}")
|
|
90
|
+
|
|
91
|
+
print(f"\n✅ 패키징 완료: {zip_filename}")
|
|
92
|
+
return zip_filename
|
|
93
|
+
|
|
94
|
+
except Exception as e:
|
|
95
|
+
print(f"❌ zip 파일 생성 오류: {e}")
|
|
96
|
+
return None
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def main():
|
|
100
|
+
if len(sys.argv) < 2:
|
|
101
|
+
print("사용법: python package_command.py <commands-경로> [출력-디렉토리]")
|
|
102
|
+
print("\n예시:")
|
|
103
|
+
print(" python package_command.py .claude/commands")
|
|
104
|
+
print(" python package_command.py .claude/commands ./dist")
|
|
105
|
+
print(" python package_command.py .claude/commands/review-security.md")
|
|
106
|
+
sys.exit(1)
|
|
107
|
+
|
|
108
|
+
source_path = sys.argv[1]
|
|
109
|
+
output_dir = sys.argv[2] if len(sys.argv) > 2 else None
|
|
110
|
+
|
|
111
|
+
print(f"📦 커맨드 패키징: {source_path}")
|
|
112
|
+
if output_dir:
|
|
113
|
+
print(f" 출력 디렉토리: {output_dir}")
|
|
114
|
+
print()
|
|
115
|
+
|
|
116
|
+
result = package_commands(source_path, output_dir)
|
|
117
|
+
|
|
118
|
+
if result:
|
|
119
|
+
sys.exit(0)
|
|
120
|
+
else:
|
|
121
|
+
sys.exit(1)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == "__main__":
|
|
125
|
+
main()
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
커맨드 검증 스크립트 - 최소 버전
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import sys
|
|
7
|
+
import re
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def validate_command(command_path):
|
|
12
|
+
"""
|
|
13
|
+
커맨드 파일 기본 검증.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
command_path: .md 커맨드 파일 경로
|
|
17
|
+
|
|
18
|
+
Returns:
|
|
19
|
+
(유효 여부, 메시지) 튜플
|
|
20
|
+
"""
|
|
21
|
+
command_path = Path(command_path)
|
|
22
|
+
|
|
23
|
+
# 파일 존재 확인
|
|
24
|
+
if not command_path.exists():
|
|
25
|
+
return False, f"커맨드 파일을 찾을 수 없음: {command_path}"
|
|
26
|
+
|
|
27
|
+
# 파일 확장자 확인
|
|
28
|
+
if command_path.suffix != '.md':
|
|
29
|
+
return False, "커맨드 파일은 .md 확장자여야 합니다"
|
|
30
|
+
|
|
31
|
+
# 파일명 규칙 확인
|
|
32
|
+
name = command_path.stem
|
|
33
|
+
if not re.match(r'^[a-z0-9-]+$', name):
|
|
34
|
+
return False, f"커맨드 이름 '{name}'은 하이픈-케이스여야 합니다 (소문자, 숫자, 하이픈만 허용)"
|
|
35
|
+
|
|
36
|
+
if name.startswith('-') or name.endswith('-') or '--' in name:
|
|
37
|
+
return False, f"커맨드 이름 '{name}'은 하이픈으로 시작/끝나거나 연속된 하이픈을 포함할 수 없습니다"
|
|
38
|
+
|
|
39
|
+
if len(name) > 40:
|
|
40
|
+
return False, f"커맨드 이름 '{name}'이 40자를 초과합니다"
|
|
41
|
+
|
|
42
|
+
# 내용 읽기
|
|
43
|
+
try:
|
|
44
|
+
content = command_path.read_text()
|
|
45
|
+
except Exception as e:
|
|
46
|
+
return False, f"파일 읽기 오류: {e}"
|
|
47
|
+
|
|
48
|
+
# 빈 파일 확인
|
|
49
|
+
if not content.strip():
|
|
50
|
+
return False, "커맨드 파일이 비어있습니다"
|
|
51
|
+
|
|
52
|
+
# frontmatter가 있으면 검증
|
|
53
|
+
if content.startswith('---'):
|
|
54
|
+
match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
|
|
55
|
+
if not match:
|
|
56
|
+
return False, "잘못된 frontmatter 형식 (닫는 --- 누락)"
|
|
57
|
+
|
|
58
|
+
frontmatter = match.group(1)
|
|
59
|
+
|
|
60
|
+
# 허용된 frontmatter 필드 검증
|
|
61
|
+
valid_fields = {'description', 'allowed-tools', 'argument-hint', 'model', 'disable-model-invocation'}
|
|
62
|
+
for line in frontmatter.split('\n'):
|
|
63
|
+
line = line.strip()
|
|
64
|
+
if not line or line.startswith('#'):
|
|
65
|
+
continue
|
|
66
|
+
if ':' in line:
|
|
67
|
+
field = line.split(':')[0].strip()
|
|
68
|
+
if field and field not in valid_fields:
|
|
69
|
+
return False, f"알 수 없는 frontmatter 필드: '{field}'"
|
|
70
|
+
|
|
71
|
+
# description 확인
|
|
72
|
+
desc_match = re.search(r'description:\s*(.+)', frontmatter)
|
|
73
|
+
if desc_match:
|
|
74
|
+
description = desc_match.group(1).strip()
|
|
75
|
+
if '<' in description or '>' in description:
|
|
76
|
+
return False, "description에 꺾쇠괄호(< 또는 >)를 포함할 수 없습니다"
|
|
77
|
+
if '[TODO' in description:
|
|
78
|
+
return False, "description에 TODO 플레이스홀더가 있습니다 - 완성해주세요"
|
|
79
|
+
|
|
80
|
+
# frontmatter 이후 내용 확인
|
|
81
|
+
body = content[match.end():].strip()
|
|
82
|
+
if not body:
|
|
83
|
+
return False, "커맨드에 frontmatter만 있고 지시사항이 없습니다"
|
|
84
|
+
|
|
85
|
+
return True, "커맨드가 유효합니다!"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def validate_commands_folder(folder_path):
|
|
89
|
+
"""
|
|
90
|
+
폴더 내 모든 커맨드 파일 검증.
|
|
91
|
+
|
|
92
|
+
Args:
|
|
93
|
+
folder_path: .md 파일이 포함된 폴더 경로
|
|
94
|
+
|
|
95
|
+
Returns:
|
|
96
|
+
(전체 유효 여부, 결과 리스트) 튜플
|
|
97
|
+
"""
|
|
98
|
+
folder_path = Path(folder_path)
|
|
99
|
+
|
|
100
|
+
if not folder_path.exists():
|
|
101
|
+
return False, [("folder", False, f"폴더를 찾을 수 없음: {folder_path}")]
|
|
102
|
+
|
|
103
|
+
if not folder_path.is_dir():
|
|
104
|
+
return False, [("path", False, f"경로가 디렉토리가 아님: {folder_path}")]
|
|
105
|
+
|
|
106
|
+
# 모든 .md 파일 찾기
|
|
107
|
+
md_files = list(folder_path.glob('**/*.md'))
|
|
108
|
+
|
|
109
|
+
if not md_files:
|
|
110
|
+
return False, [("folder", False, "폴더에 .md 파일이 없습니다")]
|
|
111
|
+
|
|
112
|
+
results = []
|
|
113
|
+
all_valid = True
|
|
114
|
+
|
|
115
|
+
for md_file in md_files:
|
|
116
|
+
valid, message = validate_command(md_file)
|
|
117
|
+
results.append((md_file.name, valid, message))
|
|
118
|
+
if not valid:
|
|
119
|
+
all_valid = False
|
|
120
|
+
|
|
121
|
+
return all_valid, results
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == "__main__":
|
|
125
|
+
if len(sys.argv) != 2:
|
|
126
|
+
print("사용법: python quick_validate.py <command.md 또는 commands-폴더>")
|
|
127
|
+
sys.exit(1)
|
|
128
|
+
|
|
129
|
+
path = Path(sys.argv[1])
|
|
130
|
+
|
|
131
|
+
if path.is_file():
|
|
132
|
+
valid, message = validate_command(path)
|
|
133
|
+
print(message)
|
|
134
|
+
sys.exit(0 if valid else 1)
|
|
135
|
+
elif path.is_dir():
|
|
136
|
+
all_valid, results = validate_commands_folder(path)
|
|
137
|
+
for name, valid, message in results:
|
|
138
|
+
status = "✅" if valid else "❌"
|
|
139
|
+
print(f"[{status}] {name}: {message}")
|
|
140
|
+
sys.exit(0 if all_valid else 1)
|
|
141
|
+
else:
|
|
142
|
+
print(f"경로를 찾을 수 없음: {path}")
|
|
143
|
+
sys.exit(1)
|
|
@@ -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)
|