oh-my-customcode 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +287 -0
- package/dist/cli/index.js +13299 -0
- package/dist/index.js +927 -0
- package/package.json +74 -0
- package/templates/.claude/contexts/dev.md +20 -0
- package/templates/.claude/contexts/ecomode.md +63 -0
- package/templates/.claude/contexts/index.yaml +41 -0
- package/templates/.claude/contexts/research.md +28 -0
- package/templates/.claude/contexts/review.md +23 -0
- package/templates/.claude/hooks/hooks.json +185 -0
- package/templates/.claude/hooks/hud/index.yaml +27 -0
- package/templates/.claude/hooks/hud/update-status.sh +32 -0
- package/templates/.claude/hooks/index.yaml +46 -0
- package/templates/.claude/hooks/memory-persistence/pre-compact.sh +37 -0
- package/templates/.claude/hooks/memory-persistence/session-end.sh +64 -0
- package/templates/.claude/hooks/memory-persistence/session-start.sh +41 -0
- package/templates/.claude/hooks/strategic-compact/suggest-compact.sh +50 -0
- package/templates/.claude/install-hooks.sh +100 -0
- package/templates/.claude/rules/MAY-optimization.md +93 -0
- package/templates/.claude/rules/MUST-agent-design.md +107 -0
- package/templates/.claude/rules/MUST-agent-identification.md +108 -0
- package/templates/.claude/rules/MUST-continuous-improvement.md +132 -0
- package/templates/.claude/rules/MUST-intent-transparency.md +199 -0
- package/templates/.claude/rules/MUST-language-policy.md +62 -0
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +266 -0
- package/templates/.claude/rules/MUST-parallel-execution.md +341 -0
- package/templates/.claude/rules/MUST-permissions.md +84 -0
- package/templates/.claude/rules/MUST-safety.md +69 -0
- package/templates/.claude/rules/MUST-sync-verification.md +219 -0
- package/templates/.claude/rules/MUST-tool-identification.md +112 -0
- package/templates/.claude/rules/SHOULD-ecomode.md +145 -0
- package/templates/.claude/rules/SHOULD-error-handling.md +102 -0
- package/templates/.claude/rules/SHOULD-hud-statusline.md +89 -0
- package/templates/.claude/rules/SHOULD-interaction.md +103 -0
- package/templates/.claude/rules/SHOULD-memory-integration.md +114 -0
- package/templates/.claude/rules/SHOULD-pipeline-mode.md +165 -0
- package/templates/.claude/rules/index.yaml +125 -0
- package/templates/.claude/uninstall-hooks.sh +52 -0
- package/templates/CLAUDE.md.en +259 -0
- package/templates/CLAUDE.md.ko +259 -0
- package/templates/agents/index.yaml +237 -0
- package/templates/agents/infra-engineer/aws-expert/AGENT.md +47 -0
- package/templates/agents/infra-engineer/aws-expert/index.yaml +27 -0
- package/templates/agents/infra-engineer/docker-expert/AGENT.md +47 -0
- package/templates/agents/infra-engineer/docker-expert/index.yaml +27 -0
- package/templates/agents/manager/creator/AGENT.md +274 -0
- package/templates/agents/manager/creator/index.yaml +66 -0
- package/templates/agents/manager/gitnerd/AGENT.md +91 -0
- package/templates/agents/manager/gitnerd/index.yaml +55 -0
- package/templates/agents/manager/sauron/AGENT.md +153 -0
- package/templates/agents/manager/sauron/index.yaml +52 -0
- package/templates/agents/manager/supplier/AGENT.md +142 -0
- package/templates/agents/manager/supplier/index.yaml +31 -0
- package/templates/agents/manager/sync-checker/AGENT.md +34 -0
- package/templates/agents/manager/sync-checker/index.yaml +32 -0
- package/templates/agents/manager/updater/AGENT.md +125 -0
- package/templates/agents/manager/updater/index.yaml +31 -0
- package/templates/agents/orchestrator/dev-lead/AGENT.md +116 -0
- package/templates/agents/orchestrator/dev-lead/index.yaml +73 -0
- package/templates/agents/orchestrator/planner/AGENT.md +102 -0
- package/templates/agents/orchestrator/planner/index.yaml +38 -0
- package/templates/agents/orchestrator/qa-lead/AGENT.md +92 -0
- package/templates/agents/orchestrator/qa-lead/index.yaml +40 -0
- package/templates/agents/orchestrator/secretary/AGENT.md +132 -0
- package/templates/agents/orchestrator/secretary/index.yaml +55 -0
- package/templates/agents/qa-team/qa-engineer/AGENT.md +98 -0
- package/templates/agents/qa-team/qa-engineer/index.yaml +59 -0
- package/templates/agents/qa-team/qa-planner/AGENT.md +75 -0
- package/templates/agents/qa-team/qa-planner/index.yaml +47 -0
- package/templates/agents/qa-team/qa-writer/AGENT.md +98 -0
- package/templates/agents/qa-team/qa-writer/index.yaml +44 -0
- package/templates/agents/sw-architect/documenter/AGENT.md +120 -0
- package/templates/agents/sw-architect/documenter/index.yaml +39 -0
- package/templates/agents/sw-architect/speckit-agent/AGENT.md +127 -0
- package/templates/agents/sw-architect/speckit-agent/index.yaml +78 -0
- package/templates/agents/sw-engineer/backend/express-expert/AGENT.md +132 -0
- package/templates/agents/sw-engineer/backend/express-expert/index.yaml +36 -0
- package/templates/agents/sw-engineer/backend/fastapi-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/backend/fastapi-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/backend/go-backend-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/backend/go-backend-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/backend/nestjs-expert/AGENT.md +107 -0
- package/templates/agents/sw-engineer/backend/nestjs-expert/index.yaml +43 -0
- package/templates/agents/sw-engineer/backend/springboot-expert/AGENT.md +103 -0
- package/templates/agents/sw-engineer/backend/springboot-expert/index.yaml +69 -0
- package/templates/agents/sw-engineer/frontend/svelte-agent/AGENT.md +71 -0
- package/templates/agents/sw-engineer/frontend/svelte-agent/index.yaml +41 -0
- package/templates/agents/sw-engineer/frontend/vercel-agent/AGENT.md +67 -0
- package/templates/agents/sw-engineer/frontend/vercel-agent/index.yaml +43 -0
- package/templates/agents/sw-engineer/frontend/vuejs-agent/AGENT.md +71 -0
- package/templates/agents/sw-engineer/frontend/vuejs-agent/index.yaml +48 -0
- package/templates/agents/sw-engineer/language/golang-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/golang-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/java21-expert/AGENT.md +122 -0
- package/templates/agents/sw-engineer/language/java21-expert/index.yaml +51 -0
- package/templates/agents/sw-engineer/language/kotlin-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/kotlin-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/python-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/python-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/rust-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/rust-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/language/typescript-expert/AGENT.md +47 -0
- package/templates/agents/sw-engineer/language/typescript-expert/index.yaml +27 -0
- package/templates/agents/sw-engineer/tooling/bun-expert/AGENT.md +73 -0
- package/templates/agents/sw-engineer/tooling/bun-expert/index.yaml +46 -0
- package/templates/agents/sw-engineer/tooling/npm-expert/AGENT.md +160 -0
- package/templates/agents/sw-engineer/tooling/npm-expert/index.yaml +45 -0
- package/templates/agents/sw-engineer/tooling/optimizer/AGENT.md +170 -0
- package/templates/agents/sw-engineer/tooling/optimizer/index.yaml +45 -0
- package/templates/agents/system/memory-keeper/AGENT.md +126 -0
- package/templates/agents/system/memory-keeper/index.yaml +45 -0
- package/templates/agents/system/naggy/AGENT.md +72 -0
- package/templates/agents/system/naggy/index.yaml +35 -0
- package/templates/commands/COMMANDS.md +136 -0
- package/templates/commands/creator/agent.md +121 -0
- package/templates/commands/dev/refactor.md +126 -0
- package/templates/commands/dev/review.md +82 -0
- package/templates/commands/git/branch.yaml +8 -0
- package/templates/commands/git/commit.yaml +4 -0
- package/templates/commands/git/pr.yaml +4 -0
- package/templates/commands/git/status.yaml +4 -0
- package/templates/commands/git/sync.yaml +4 -0
- package/templates/commands/index.yaml +225 -0
- package/templates/commands/intent/explain.md +144 -0
- package/templates/commands/memory/recall.md +164 -0
- package/templates/commands/memory/save.md +128 -0
- package/templates/commands/naggy/add.yaml +8 -0
- package/templates/commands/naggy/done.yaml +8 -0
- package/templates/commands/naggy/list.yaml +4 -0
- package/templates/commands/naggy/priority.yaml +11 -0
- package/templates/commands/naggy/remind.yaml +4 -0
- package/templates/commands/npm/audit.yaml +62 -0
- package/templates/commands/npm/publish.yaml +52 -0
- package/templates/commands/npm/version.yaml +62 -0
- package/templates/commands/optimize/analyze.yaml +34 -0
- package/templates/commands/optimize/bundle.yaml +50 -0
- package/templates/commands/optimize/report.yaml +56 -0
- package/templates/commands/pipeline/list.md +81 -0
- package/templates/commands/pipeline/run.md +127 -0
- package/templates/commands/sauron/quick.yaml +4 -0
- package/templates/commands/sauron/report.yaml +4 -0
- package/templates/commands/sauron/watch.yaml +4 -0
- package/templates/commands/supplier/audit.md +133 -0
- package/templates/commands/supplier/fix.md +121 -0
- package/templates/commands/sync/agents.yaml +4 -0
- package/templates/commands/sync/check.yaml +4 -0
- package/templates/commands/sync/commands.yaml +4 -0
- package/templates/commands/sync/docs.yaml +4 -0
- package/templates/commands/sync/fix.yaml +4 -0
- package/templates/commands/system/help.md +137 -0
- package/templates/commands/system/lists.md +86 -0
- package/templates/commands/system/status.md +163 -0
- package/templates/commands/updater/docs.md +165 -0
- package/templates/commands/updater/external.md +214 -0
- package/templates/guides/aws/common-patterns.md +169 -0
- package/templates/guides/aws/index.yaml +26 -0
- package/templates/guides/aws/well-architected.md +143 -0
- package/templates/guides/claude-code/01-overview.md +42 -0
- package/templates/guides/claude-code/03-tools.md +107 -0
- package/templates/guides/claude-code/04-agent-skills.md +90 -0
- package/templates/guides/claude-code/05-agent-sdk.md +129 -0
- package/templates/guides/claude-code/06-mcp.md +165 -0
- package/templates/guides/claude-code/07-prompt-engineering.md +100 -0
- package/templates/guides/claude-code/08-testing.md +58 -0
- package/templates/guides/claude-code/09-guardrails.md +80 -0
- package/templates/guides/claude-code/10-monitoring.md +89 -0
- package/templates/guides/claude-code/index.yaml +51 -0
- package/templates/guides/docker/compose-best-practices.md +284 -0
- package/templates/guides/docker/dockerfile-best-practices.md +262 -0
- package/templates/guides/docker/index.yaml +26 -0
- package/templates/guides/fastapi/best-practices.md +232 -0
- package/templates/guides/fastapi/index.yaml +21 -0
- package/templates/guides/go-backend/index.yaml +26 -0
- package/templates/guides/go-backend/project-layout.md +243 -0
- package/templates/guides/go-backend/uber-style.md +212 -0
- package/templates/guides/golang/concurrency.md +282 -0
- package/templates/guides/golang/effective-go.md +309 -0
- package/templates/guides/golang/error-handling.md +250 -0
- package/templates/guides/golang/index.yaml +27 -0
- package/templates/guides/index.yaml +101 -0
- package/templates/guides/kotlin/coding-conventions.md +247 -0
- package/templates/guides/kotlin/idioms.md +234 -0
- package/templates/guides/kotlin/index.yaml +26 -0
- package/templates/guides/python/index.yaml +26 -0
- package/templates/guides/python/pep8-style-guide.md +202 -0
- package/templates/guides/python/zen-of-python.md +79 -0
- package/templates/guides/rust/error-handling.md +262 -0
- package/templates/guides/rust/index.yaml +26 -0
- package/templates/guides/rust/ownership.md +180 -0
- package/templates/guides/springboot/best-practices.md +361 -0
- package/templates/guides/springboot/index.yaml +22 -0
- package/templates/guides/typescript/advanced-types.md +225 -0
- package/templates/guides/typescript/index.yaml +26 -0
- package/templates/guides/typescript/type-system.md +219 -0
- package/templates/guides/web-design/accessibility.md +66 -0
- package/templates/guides/web-design/index.yaml +20 -0
- package/templates/guides/web-design/performance.md +102 -0
- package/templates/pipelines/examples/code-review.yaml +66 -0
- package/templates/pipelines/index.yaml +18 -0
- package/templates/pipelines/templates/pipeline-template.yaml +50 -0
- package/templates/skills/backend/fastapi-best-practices/SKILL.md +269 -0
- package/templates/skills/backend/fastapi-best-practices/index.yaml +25 -0
- package/templates/skills/backend/go-backend-best-practices/SKILL.md +337 -0
- package/templates/skills/backend/go-backend-best-practices/index.yaml +26 -0
- package/templates/skills/backend/springboot-best-practices/SKILL.md +356 -0
- package/templates/skills/backend/springboot-best-practices/index.yaml +27 -0
- package/templates/skills/development/go-best-practices/SKILL.md +202 -0
- package/templates/skills/development/go-best-practices/index.yaml +25 -0
- package/templates/skills/development/kotlin-best-practices/SKILL.md +255 -0
- package/templates/skills/development/kotlin-best-practices/index.yaml +27 -0
- package/templates/skills/development/python-best-practices/SKILL.md +221 -0
- package/templates/skills/development/python-best-practices/index.yaml +25 -0
- package/templates/skills/development/react-best-practices/SKILL.md +100 -0
- package/templates/skills/development/react-best-practices/index.yaml +39 -0
- package/templates/skills/development/rust-best-practices/SKILL.md +266 -0
- package/templates/skills/development/rust-best-practices/index.yaml +26 -0
- package/templates/skills/development/typescript-best-practices/SKILL.md +320 -0
- package/templates/skills/development/typescript-best-practices/index.yaml +28 -0
- package/templates/skills/development/vercel-deploy/SKILL.md +73 -0
- package/templates/skills/development/vercel-deploy/index.yaml +30 -0
- package/templates/skills/development/web-design-guidelines/SKILL.md +117 -0
- package/templates/skills/development/web-design-guidelines/index.yaml +34 -0
- package/templates/skills/index.yaml +129 -0
- package/templates/skills/infrastructure/aws-best-practices/SKILL.md +279 -0
- package/templates/skills/infrastructure/aws-best-practices/index.yaml +27 -0
- package/templates/skills/infrastructure/docker-best-practices/SKILL.md +274 -0
- package/templates/skills/infrastructure/docker-best-practices/index.yaml +26 -0
- package/templates/skills/orchestration/intent-detection/SKILL.md +214 -0
- package/templates/skills/orchestration/intent-detection/index.yaml +30 -0
- package/templates/skills/orchestration/intent-detection/patterns/agent-triggers.yaml +333 -0
- package/templates/skills/orchestration/pipeline-execution/SKILL.md +188 -0
- package/templates/skills/orchestration/pipeline-execution/index.yaml +27 -0
- package/templates/skills/system/memory-management/SKILL.md +194 -0
- package/templates/skills/system/memory-management/index.yaml +30 -0
- package/templates/skills/system/result-aggregation/SKILL.md +163 -0
- package/templates/skills/system/result-aggregation/index.yaml +36 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# 도구 사용 (Tool Use)
|
|
2
|
+
|
|
3
|
+
Claude는 도구 및 함수와 상호작용할 수 있으므로 Claude의 기능을 확장하여 더 다양한 작업을 수행할 수 있습니다.
|
|
4
|
+
|
|
5
|
+
## 도구 유형
|
|
6
|
+
|
|
7
|
+
Claude는 두 가지 유형의 도구를 지원합니다:
|
|
8
|
+
|
|
9
|
+
### 1. 클라이언트 도구
|
|
10
|
+
사용자의 시스템에서 실행되는 도구:
|
|
11
|
+
- 사용자가 만들고 구현하는 사용자 정의 도구
|
|
12
|
+
- 컴퓨터 사용 및 텍스트 편집기와 같이 클라이언트 구현이 필요한 Anthropic 정의 도구
|
|
13
|
+
|
|
14
|
+
### 2. 서버 도구
|
|
15
|
+
Anthropic의 서버에서 실행되는 도구:
|
|
16
|
+
- 웹 검색 및 웹 가져오기 도구
|
|
17
|
+
- API 요청에서 지정해야 하지만 사용자 측에서 구현할 필요 없음
|
|
18
|
+
|
|
19
|
+
## 클라이언트 도구 통합 단계
|
|
20
|
+
|
|
21
|
+
1. **Claude에 도구 및 사용자 프롬프트 제공**
|
|
22
|
+
- API 요청에서 이름, 설명 및 입력 스키마를 사용하여 클라이언트 도구를 정의
|
|
23
|
+
- 이러한 도구가 필요할 수 있는 사용자 프롬프트를 포함
|
|
24
|
+
|
|
25
|
+
2. **Claude가 도구 사용을 결정**
|
|
26
|
+
- Claude는 사용자의 쿼리에 도움이 될 수 있는 도구가 있는지 평가
|
|
27
|
+
- 올바르게 형식화된 도구 사용 요청을 구성
|
|
28
|
+
|
|
29
|
+
3. **도구를 실행하고 결과 반환**
|
|
30
|
+
- Claude의 요청에서 도구 이름 및 입력을 추출
|
|
31
|
+
- 사용자의 시스템에서 도구 코드를 실행
|
|
32
|
+
- `tool_result` 콘텐츠 블록을 포함하는 새로운 `user` 메시지에서 결과를 반환
|
|
33
|
+
|
|
34
|
+
4. **Claude가 도구 결과를 사용하여 응답을 작성**
|
|
35
|
+
- Claude는 도구 결과를 분석하여 원래 사용자 프롬프트에 대한 최종 응답을 작성
|
|
36
|
+
|
|
37
|
+
## 기본 예제
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
import anthropic
|
|
41
|
+
|
|
42
|
+
client = anthropic.Anthropic()
|
|
43
|
+
|
|
44
|
+
response = client.messages.create(
|
|
45
|
+
model="claude-sonnet-4-5",
|
|
46
|
+
max_tokens=1024,
|
|
47
|
+
tools=[
|
|
48
|
+
{
|
|
49
|
+
"name": "get_weather",
|
|
50
|
+
"description": "Get the current weather in a given location",
|
|
51
|
+
"input_schema": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"location": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The city and state, e.g. San Francisco, CA",
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": ["location"],
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
messages=[{"role": "user", "content": "What's the weather like in San Francisco?"}],
|
|
64
|
+
)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## MCP 도구 사용
|
|
68
|
+
|
|
69
|
+
Model Context Protocol (MCP)을 사용하는 애플리케이션을 구축하는 경우 MCP 서버의 도구를 Claude의 Messages API와 함께 직접 사용할 수 있습니다.
|
|
70
|
+
|
|
71
|
+
### MCP 도구를 Claude 형식으로 변환
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
from mcp import ClientSession
|
|
75
|
+
|
|
76
|
+
async def get_claude_tools(mcp_session: ClientSession):
|
|
77
|
+
"""Convert MCP tools to Claude's tool format."""
|
|
78
|
+
mcp_tools = await mcp_session.list_tools()
|
|
79
|
+
|
|
80
|
+
claude_tools = []
|
|
81
|
+
for tool in mcp_tools.tools:
|
|
82
|
+
claude_tools.append({
|
|
83
|
+
"name": tool.name,
|
|
84
|
+
"description": tool.description or "",
|
|
85
|
+
"input_schema": tool.inputSchema # Rename inputSchema to input_schema
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
return claude_tools
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 도구 사용 패턴
|
|
92
|
+
|
|
93
|
+
### 병렬 도구 사용
|
|
94
|
+
Claude는 단일 응답 내에서 여러 도구를 병렬로 호출할 수 있습니다. 모든 `tool_use` 블록은 단일 어시스턴트 메시지에 포함되며, 모든 해당 `tool_result` 블록은 후속 사용자 메시지에서 제공되어야 합니다.
|
|
95
|
+
|
|
96
|
+
### 순차적 도구
|
|
97
|
+
일부 작업은 여러 도구를 순차적으로 호출해야 할 수 있으며, 한 도구의 출력을 다른 도구의 입력으로 사용합니다.
|
|
98
|
+
|
|
99
|
+
### 사고의 연쇄 도구 사용
|
|
100
|
+
Claude Opus는 도구 사용 쿼리에 답하기 전에 생각하도록 프롬프트되어 도구가 필요한지 여부, 어떤 도구를 사용할지, 적절한 매개변수를 최선으로 결정합니다.
|
|
101
|
+
|
|
102
|
+
## 가격 책정
|
|
103
|
+
|
|
104
|
+
도구 사용 요청은 다음을 기반으로 가격이 책정됩니다:
|
|
105
|
+
1. 모델에 보내는 총 입력 토큰 수 (`tools` 매개변수 포함)
|
|
106
|
+
2. 생성된 출력 토큰 수
|
|
107
|
+
3. 서버 측 도구의 경우, 추가 사용량 기반 가격 책정
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Agent Skills
|
|
2
|
+
|
|
3
|
+
Agent Skills는 Claude의 기능을 확장하는 모듈식 기능입니다. 각 Skill은 지침, 메타데이터 및 선택적 리소스(스크립트, 템플릿)를 패키징하며, Claude는 관련이 있을 때 자동으로 이를 사용합니다.
|
|
4
|
+
|
|
5
|
+
## Skills를 사용하는 이유
|
|
6
|
+
|
|
7
|
+
Skills는 Claude에 도메인 특화 전문성을 제공하는 재사용 가능한 파일시스템 기반 리소스입니다.
|
|
8
|
+
|
|
9
|
+
**주요 이점**:
|
|
10
|
+
- **Claude 전문화**: 도메인 특화 작업을 위한 기능 맞춤화
|
|
11
|
+
- **반복 감소**: 한 번 생성하고 자동으로 사용
|
|
12
|
+
- **기능 구성**: Skills를 결합하여 복잡한 워크플로우 구축
|
|
13
|
+
|
|
14
|
+
## Skills 작동 방식
|
|
15
|
+
|
|
16
|
+
Skills는 Claude의 VM 환경을 활용하여 프롬프트만으로는 불가능한 기능을 제공합니다. 파일시스템 기반 아키텍처는 **점진적 공개**를 가능하게 합니다.
|
|
17
|
+
|
|
18
|
+
### 세 가지 로딩 수준
|
|
19
|
+
|
|
20
|
+
| 수준 | 로드 시기 | 토큰 비용 | 콘텐츠 |
|
|
21
|
+
|------|-----------|-----------|--------|
|
|
22
|
+
| **메타데이터** | 항상 (시작 시) | Skill당 약 100 토큰 | YAML 프론트매터의 `name` 및 `description` |
|
|
23
|
+
| **지침** | Skill이 트리거될 때 | 5k 토큰 미만 | SKILL.md 본문 |
|
|
24
|
+
| **리소스** | 필요에 따라 | 사실상 무제한 | bash를 통해 실행되는 번들 파일 |
|
|
25
|
+
|
|
26
|
+
## Skill 구조
|
|
27
|
+
|
|
28
|
+
모든 Skill에는 YAML 프론트매터가 있는 `SKILL.md` 파일이 필요합니다:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
---
|
|
32
|
+
name: your-skill-name
|
|
33
|
+
description: Brief description of what this Skill does and when to use it
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# Your Skill Name
|
|
37
|
+
|
|
38
|
+
## Instructions
|
|
39
|
+
[Clear, step-by-step guidance for Claude to follow]
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
[Concrete examples of using this Skill]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 필드 요구 사항
|
|
46
|
+
|
|
47
|
+
**`name`**:
|
|
48
|
+
- 최대 64자
|
|
49
|
+
- 소문자, 숫자 및 하이픈만 포함해야 함
|
|
50
|
+
- "anthropic", "claude" 예약어를 포함할 수 없음
|
|
51
|
+
|
|
52
|
+
**`description`**:
|
|
53
|
+
- 비어 있지 않아야 함
|
|
54
|
+
- 최대 1024자
|
|
55
|
+
|
|
56
|
+
## 사용 가능한 Skills
|
|
57
|
+
|
|
58
|
+
### 사전 구축된 Agent Skills
|
|
59
|
+
|
|
60
|
+
- **PowerPoint (pptx)**: 프레젠테이션 만들기, 슬라이드 편집, 프레젠테이션 콘텐츠 분석
|
|
61
|
+
- **Excel (xlsx)**: 스프레드시트 만들기, 데이터 분석, 차트가 있는 보고서 생성
|
|
62
|
+
- **Word (docx)**: 문서 만들기, 콘텐츠 편집, 텍스트 서식 지정
|
|
63
|
+
- **PDF (pdf)**: 형식이 지정된 PDF 문서 및 보고서 생성
|
|
64
|
+
|
|
65
|
+
## Skills가 작동하는 위치
|
|
66
|
+
|
|
67
|
+
| 플랫폼 | 사전 구축된 Skills | 사용자 정의 Skills |
|
|
68
|
+
|--------|-------------------|-------------------|
|
|
69
|
+
| Claude API | ✓ | ✓ |
|
|
70
|
+
| Claude Code | - | ✓ |
|
|
71
|
+
| Claude Agent SDK | - | ✓ |
|
|
72
|
+
| Claude.ai | ✓ | ✓ |
|
|
73
|
+
|
|
74
|
+
## 보안 고려 사항
|
|
75
|
+
|
|
76
|
+
Skills는 신뢰할 수 있는 출처(자신이 만들었거나 Anthropic에서 얻은 것)에서만 사용할 것을 강력히 권장합니다.
|
|
77
|
+
|
|
78
|
+
**주요 보안 고려 사항**:
|
|
79
|
+
- **철저히 감사**: Skill에 번들된 모든 파일을 검토
|
|
80
|
+
- **외부 출처는 위험함**: 외부 URL에서 데이터를 가져오는 Skills는 특히 위험
|
|
81
|
+
- **도구 오용**: 악의적인 Skills는 도구를 해로운 방식으로 호출할 수 있음
|
|
82
|
+
- **데이터 노출**: 민감한 데이터에 액세스할 수 있는 Skills는 정보를 유출하도록 설계될 수 있음
|
|
83
|
+
|
|
84
|
+
## 제한 사항 및 제약
|
|
85
|
+
|
|
86
|
+
### 런타임 환경 제약
|
|
87
|
+
|
|
88
|
+
- **네트워크 액세스 없음**: Skills는 외부 API 호출을 하거나 인터넷에 액세스할 수 없음
|
|
89
|
+
- **런타임 패키지 설치 없음**: 미리 설치된 패키지만 사용 가능
|
|
90
|
+
- **사전 구성된 종속성만**: 사용 가능한 패키지 목록은 코드 실행 도구 문서 참조
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Agent SDK 개요
|
|
2
|
+
|
|
3
|
+
Claude Code를 라이브러리로 사용하여 프로덕션 AI 에이전트 구축
|
|
4
|
+
|
|
5
|
+
## 소개
|
|
6
|
+
|
|
7
|
+
파일을 자동으로 읽고, 명령을 실행하고, 웹을 검색하고, 코드를 편집하는 등의 작업을 수행하는 AI 에이전트를 구축하세요. Agent SDK는 Claude Code를 강화하는 동일한 도구, 에이전트 루프 및 컨텍스트 관리를 Python과 TypeScript로 프로그래밍할 수 있게 제공합니다.
|
|
8
|
+
|
|
9
|
+
## 빠른 시작 예제
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
import asyncio
|
|
13
|
+
from claude_agent_sdk import query, ClaudeAgentOptions
|
|
14
|
+
|
|
15
|
+
async def main():
|
|
16
|
+
async for message in query(
|
|
17
|
+
prompt="Find and fix the bug in auth.py",
|
|
18
|
+
options=ClaudeAgentOptions(allowed_tools=["Read", "Edit", "Bash"])
|
|
19
|
+
):
|
|
20
|
+
print(message)
|
|
21
|
+
|
|
22
|
+
asyncio.run(main())
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { query } from "@anthropic-ai/claude-agent-sdk";
|
|
27
|
+
|
|
28
|
+
for await (const message of query({
|
|
29
|
+
prompt: "Find and fix the bug in auth.py",
|
|
30
|
+
options: { allowedTools: ["Read", "Edit", "Bash"] }
|
|
31
|
+
})) {
|
|
32
|
+
console.log(message);
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 기능
|
|
37
|
+
|
|
38
|
+
### 기본 제공 도구
|
|
39
|
+
|
|
40
|
+
| 도구 | 기능 |
|
|
41
|
+
|------|------|
|
|
42
|
+
| **Read** | 작업 디렉토리의 모든 파일 읽기 |
|
|
43
|
+
| **Write** | 새 파일 생성 |
|
|
44
|
+
| **Edit** | 기존 파일에 정확한 편집 수행 |
|
|
45
|
+
| **Bash** | 터미널 명령, 스크립트, git 작업 실행 |
|
|
46
|
+
| **Glob** | 패턴으로 파일 찾기 |
|
|
47
|
+
| **Grep** | 정규식으로 파일 내용 검색 |
|
|
48
|
+
| **WebSearch** | 현재 정보를 위해 웹 검색 |
|
|
49
|
+
| **WebFetch** | 웹 페이지 내용 가져오기 및 파싱 |
|
|
50
|
+
|
|
51
|
+
### 훅 (Hooks)
|
|
52
|
+
|
|
53
|
+
에이전트 라이프사이클의 주요 지점에서 사용자 정의 코드를 실행합니다.
|
|
54
|
+
|
|
55
|
+
**사용 가능한 훅**: `PreToolUse`, `PostToolUse`, `Stop`, `SessionStart`, `SessionEnd`, `UserPromptSubmit` 등
|
|
56
|
+
|
|
57
|
+
### 서브에이전트
|
|
58
|
+
|
|
59
|
+
특화된 에이전트를 생성하여 집중된 부작업을 처리합니다. `Task` 도구를 활성화하여 Claude가 위임의 이점을 얻을 수 있을 정도로 복잡한 작업이라고 판단할 때 서브에이전트를 생성하도록 합니다.
|
|
60
|
+
|
|
61
|
+
### MCP (Model Context Protocol)
|
|
62
|
+
|
|
63
|
+
외부 시스템에 연결: 데이터베이스, 브라우저, API 등
|
|
64
|
+
|
|
65
|
+
### 권한
|
|
66
|
+
|
|
67
|
+
에이전트가 사용할 수 있는 도구를 정확히 제어합니다. 안전한 작업을 허용하고, 위험한 작업을 차단하거나, 민감한 작업에 대해 승인을 요구합니다.
|
|
68
|
+
|
|
69
|
+
### 세션
|
|
70
|
+
|
|
71
|
+
여러 교환 간에 컨텍스트를 유지합니다. Claude는 읽은 파일, 수행한 분석 및 대화 기록을 기억합니다.
|
|
72
|
+
|
|
73
|
+
## Claude Code 기능 지원
|
|
74
|
+
|
|
75
|
+
| 기능 | 설명 | 위치 |
|
|
76
|
+
|------|------|------|
|
|
77
|
+
| Skills | Markdown에 정의된 특화된 기능 | `.claude/skills/SKILL.md` |
|
|
78
|
+
| Slash commands | 일반적인 작업을 위한 사용자 정의 명령 | `.claude/commands/*.md` |
|
|
79
|
+
| Memory | 프로젝트 컨텍스트 및 지침 | `CLAUDE.md` 또는 `.claude/CLAUDE.md` |
|
|
80
|
+
| Plugins | 사용자 정의 명령, 에이전트 및 MCP 서버로 확장 | `plugins` 옵션을 통한 프로그래밍 방식 |
|
|
81
|
+
|
|
82
|
+
## 설치
|
|
83
|
+
|
|
84
|
+
### Claude Code 설치
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# macOS/Linux/WSL
|
|
88
|
+
curl -fsSL https://claude.ai/install.sh | bash
|
|
89
|
+
|
|
90
|
+
# Homebrew
|
|
91
|
+
brew install --cask claude-code
|
|
92
|
+
|
|
93
|
+
# npm
|
|
94
|
+
npm install -g @anthropic-ai/claude-code
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### SDK 설치
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# TypeScript
|
|
101
|
+
npm install @anthropic-ai/claude-agent-sdk
|
|
102
|
+
|
|
103
|
+
# Python
|
|
104
|
+
pip install claude-agent-sdk
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### API 키 설정
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
export ANTHROPIC_API_KEY=your-api-key
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Agent SDK vs Client SDK
|
|
114
|
+
|
|
115
|
+
| 구분 | Client SDK | Agent SDK |
|
|
116
|
+
|------|-----------|-----------|
|
|
117
|
+
| 도구 실행 | 직접 구현 | Claude가 처리 |
|
|
118
|
+
| 복잡도 | 도구 루프 구현 필요 | 자동화됨 |
|
|
119
|
+
| 유연성 | 완전한 제어 | 추상화된 편의성 |
|
|
120
|
+
|
|
121
|
+
## Agent SDK vs Claude Code CLI
|
|
122
|
+
|
|
123
|
+
| 사용 사례 | 최적의 선택 |
|
|
124
|
+
|----------|-----------|
|
|
125
|
+
| 대화형 개발 | CLI |
|
|
126
|
+
| CI/CD 파이프라인 | SDK |
|
|
127
|
+
| 사용자 정의 애플리케이션 | SDK |
|
|
128
|
+
| 일회성 작업 | CLI |
|
|
129
|
+
| 프로덕션 자동화 | SDK |
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# MCP 커넥터
|
|
2
|
+
|
|
3
|
+
Claude의 Model Context Protocol (MCP) 커넥터 기능을 사용하여 Messages API에서 별도의 MCP 클라이언트 없이 원격 MCP 서버에 직접 연결할 수 있습니다.
|
|
4
|
+
|
|
5
|
+
## 주요 기능
|
|
6
|
+
|
|
7
|
+
- **직접 API 통합**: MCP 클라이언트를 구현하지 않고도 MCP 서버에 연결
|
|
8
|
+
- **도구 호출 지원**: Messages API를 통해 MCP 도구에 액세스
|
|
9
|
+
- **유연한 도구 구성**: 모든 도구 활성화, 특정 도구 허용 목록 작성 또는 원하지 않는 도구 거부 목록 작성
|
|
10
|
+
- **도구별 구성**: 사용자 정의 설정으로 개별 도구 구성
|
|
11
|
+
- **OAuth 인증**: 인증된 서버를 위한 OAuth Bearer 토큰 지원
|
|
12
|
+
- **여러 서버**: 단일 요청에서 여러 MCP 서버에 연결
|
|
13
|
+
|
|
14
|
+
## 제한 사항
|
|
15
|
+
|
|
16
|
+
- MCP 사양의 기능 집합 중 도구 호출만 현재 지원
|
|
17
|
+
- 서버는 HTTP를 통해 공개적으로 노출되어야 함 (Streamable HTTP 및 SSE 전송 모두 지원)
|
|
18
|
+
- 로컬 STDIO 서버는 직접 연결할 수 없음
|
|
19
|
+
- Amazon Bedrock 및 Google Vertex에서 현재 지원되지 않음
|
|
20
|
+
|
|
21
|
+
## 기본 예제
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import anthropic
|
|
25
|
+
|
|
26
|
+
client = anthropic.Anthropic()
|
|
27
|
+
|
|
28
|
+
response = client.beta.messages.create(
|
|
29
|
+
model="claude-sonnet-4-5",
|
|
30
|
+
max_tokens=1000,
|
|
31
|
+
messages=[{
|
|
32
|
+
"role": "user",
|
|
33
|
+
"content": "What tools do you have available?"
|
|
34
|
+
}],
|
|
35
|
+
mcp_servers=[{
|
|
36
|
+
"type": "url",
|
|
37
|
+
"url": "https://mcp.example.com/sse",
|
|
38
|
+
"name": "example-mcp",
|
|
39
|
+
"authorization_token": "YOUR_TOKEN"
|
|
40
|
+
}],
|
|
41
|
+
tools=[{
|
|
42
|
+
"type": "mcp_toolset",
|
|
43
|
+
"mcp_server_name": "example-mcp"
|
|
44
|
+
}],
|
|
45
|
+
betas=["mcp-client-2025-11-20"]
|
|
46
|
+
)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## MCP 서버 구성
|
|
50
|
+
|
|
51
|
+
| 속성 | 유형 | 필수 | 설명 |
|
|
52
|
+
|------|------|------|------|
|
|
53
|
+
| `type` | string | 예 | 현재 "url"만 지원 |
|
|
54
|
+
| `url` | string | 예 | MCP 서버의 URL (https://로 시작) |
|
|
55
|
+
| `name` | string | 예 | 이 MCP 서버의 고유 식별자 |
|
|
56
|
+
| `authorization_token` | string | 아니오 | OAuth 인증 토큰 |
|
|
57
|
+
|
|
58
|
+
## MCP 도구 집합 구성
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"type": "mcp_toolset",
|
|
63
|
+
"mcp_server_name": "example-mcp",
|
|
64
|
+
"default_config": {
|
|
65
|
+
"enabled": true,
|
|
66
|
+
"defer_loading": false
|
|
67
|
+
},
|
|
68
|
+
"configs": {
|
|
69
|
+
"specific_tool_name": {
|
|
70
|
+
"enabled": true,
|
|
71
|
+
"defer_loading": true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 일반적인 구성 패턴
|
|
78
|
+
|
|
79
|
+
### 모든 도구 활성화
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"type": "mcp_toolset",
|
|
84
|
+
"mcp_server_name": "google-calendar-mcp"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 허용 목록 - 특정 도구만 활성화
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"type": "mcp_toolset",
|
|
93
|
+
"mcp_server_name": "google-calendar-mcp",
|
|
94
|
+
"default_config": {
|
|
95
|
+
"enabled": false
|
|
96
|
+
},
|
|
97
|
+
"configs": {
|
|
98
|
+
"search_events": { "enabled": true },
|
|
99
|
+
"create_event": { "enabled": true }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### 거부 목록 - 특정 도구 비활성화
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"type": "mcp_toolset",
|
|
109
|
+
"mcp_server_name": "google-calendar-mcp",
|
|
110
|
+
"configs": {
|
|
111
|
+
"delete_all_events": { "enabled": false },
|
|
112
|
+
"share_calendar_publicly": { "enabled": false }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 응답 콘텐츠 유형
|
|
118
|
+
|
|
119
|
+
### MCP 도구 사용 블록
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"type": "mcp_tool_use",
|
|
124
|
+
"id": "mcptoolu_014Q35RayjACSWkSj4X2yov1",
|
|
125
|
+
"name": "echo",
|
|
126
|
+
"server_name": "example-mcp",
|
|
127
|
+
"input": { "param1": "value1" }
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### MCP 도구 결과 블록
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"type": "mcp_tool_result",
|
|
136
|
+
"tool_use_id": "mcptoolu_014Q35RayjACSWkSj4X2yov1",
|
|
137
|
+
"is_error": false,
|
|
138
|
+
"content": [{ "type": "text", "text": "Hello" }]
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## 여러 MCP 서버 연결
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcp_servers": [
|
|
147
|
+
{
|
|
148
|
+
"type": "url",
|
|
149
|
+
"url": "https://mcp.example1.com/sse",
|
|
150
|
+
"name": "mcp-server-1",
|
|
151
|
+
"authorization_token": "TOKEN1"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "url",
|
|
155
|
+
"url": "https://mcp.example2.com/sse",
|
|
156
|
+
"name": "mcp-server-2",
|
|
157
|
+
"authorization_token": "TOKEN2"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"tools": [
|
|
161
|
+
{ "type": "mcp_toolset", "mcp_server_name": "mcp-server-1" },
|
|
162
|
+
{ "type": "mcp_toolset", "mcp_server_name": "mcp-server-2" }
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
```
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# 프롬프트 엔지니어링 개요
|
|
2
|
+
|
|
3
|
+
프롬프트 엔지니어링 기법을 사용하여 Claude의 성능을 최적화하는 방법을 알아봅니다.
|
|
4
|
+
|
|
5
|
+
## 프롬프트 엔지니어링 전에
|
|
6
|
+
|
|
7
|
+
이 가이드는 다음을 가정합니다:
|
|
8
|
+
1. 사용 사례에 대한 명확한 성공 기준 정의
|
|
9
|
+
2. 해당 기준에 대해 경험적으로 테스트할 수 있는 방법
|
|
10
|
+
3. 개선하고 싶은 첫 번째 초안 프롬프트
|
|
11
|
+
|
|
12
|
+
## 프롬프팅 vs. 파인튜닝
|
|
13
|
+
|
|
14
|
+
프롬프트 엔지니어링이 파인튜닝보다 나은 이유:
|
|
15
|
+
|
|
16
|
+
- **리소스 효율성**: 텍스트 입력만 필요
|
|
17
|
+
- **비용 효율성**: 기본 모델을 사용하므로 더 저렴
|
|
18
|
+
- **모델 업데이트 유지**: 프롬프트는 일반적으로 변경 없이 버전 간에 작동
|
|
19
|
+
- **시간 절약**: 거의 즉각적인 결과
|
|
20
|
+
- **최소한의 데이터 필요**: 소수 샷 또는 제로 샷 학습으로도 작동
|
|
21
|
+
- **유연성 및 빠른 반복**: 다양한 접근 방식을 빠르게 시도
|
|
22
|
+
- **도메인 적응**: 재학습 없이 프롬프트에 도메인별 컨텍스트 제공
|
|
23
|
+
- **이해도 개선**: 외부 콘텐츠를 모델이 더 잘 이해하도록 도움
|
|
24
|
+
- **일반 지식 보존**: 모델의 광범위한 기능을 유지
|
|
25
|
+
- **투명성**: 프롬프트는 인간이 읽을 수 있음
|
|
26
|
+
|
|
27
|
+
## 프롬프트 엔지니어링 기법
|
|
28
|
+
|
|
29
|
+
가장 광범위하게 효과적인 기법부터 더 전문화된 기법까지:
|
|
30
|
+
|
|
31
|
+
### 1. 프롬프트 생성기
|
|
32
|
+
첫 번째 초안 프롬프트가 없다면 Claude 콘솔에서 프롬프트 생성기를 사용하세요.
|
|
33
|
+
|
|
34
|
+
### 2. 명확하고 직접적으로
|
|
35
|
+
Claude에게 무엇을 원하는지 명확하게 전달하세요.
|
|
36
|
+
|
|
37
|
+
### 3. 예제 사용 (멀티샷)
|
|
38
|
+
구체적인 예제를 제공하여 원하는 출력 형식을 보여주세요.
|
|
39
|
+
|
|
40
|
+
### 4. Claude가 생각하도록 하기 (사고의 연쇄)
|
|
41
|
+
복잡한 문제의 경우 Claude에게 단계별로 생각하도록 요청하세요.
|
|
42
|
+
|
|
43
|
+
### 5. XML 태그 사용
|
|
44
|
+
구조화된 입력과 출력을 위해 XML 태그를 활용하세요.
|
|
45
|
+
|
|
46
|
+
### 6. Claude에게 역할 부여 (시스템 프롬프트)
|
|
47
|
+
특정 역할이나 페르소나를 부여하여 일관된 응답을 유도하세요.
|
|
48
|
+
|
|
49
|
+
### 7. Claude의 응답 미리 채우기
|
|
50
|
+
응답의 시작 부분을 미리 채워 원하는 형식으로 유도하세요.
|
|
51
|
+
|
|
52
|
+
### 8. 복잡한 프롬프트 연결
|
|
53
|
+
큰 작업을 여러 단계로 나누어 처리하세요.
|
|
54
|
+
|
|
55
|
+
### 9. 긴 컨텍스트 팁
|
|
56
|
+
긴 문서나 대화를 효과적으로 처리하는 방법을 익히세요.
|
|
57
|
+
|
|
58
|
+
## 프롬프트 엔지니어링 예제
|
|
59
|
+
|
|
60
|
+
### 기본 프롬프트 구조
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
[역할/컨텍스트]
|
|
64
|
+
당신은 코드 리뷰 전문가입니다.
|
|
65
|
+
|
|
66
|
+
[작업]
|
|
67
|
+
다음 코드를 검토하고 개선점을 제안해주세요.
|
|
68
|
+
|
|
69
|
+
[입력]
|
|
70
|
+
<code>
|
|
71
|
+
{사용자 코드}
|
|
72
|
+
</code>
|
|
73
|
+
|
|
74
|
+
[출력 형식]
|
|
75
|
+
1. 문제점 목록
|
|
76
|
+
2. 개선 제안
|
|
77
|
+
3. 수정된 코드
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### XML 태그 활용
|
|
81
|
+
|
|
82
|
+
```xml
|
|
83
|
+
<context>
|
|
84
|
+
프로젝트는 Python 기반의 웹 애플리케이션입니다.
|
|
85
|
+
</context>
|
|
86
|
+
|
|
87
|
+
<task>
|
|
88
|
+
보안 취약점을 분석해주세요.
|
|
89
|
+
</task>
|
|
90
|
+
|
|
91
|
+
<code>
|
|
92
|
+
{분석할 코드}
|
|
93
|
+
</code>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## 추가 리소스
|
|
97
|
+
|
|
98
|
+
- GitHub 프롬프팅 튜토리얼
|
|
99
|
+
- Google Sheets 프롬프팅 튜토리얼
|
|
100
|
+
- Claude API 문서
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 테스트 및 평가
|
|
2
|
+
|
|
3
|
+
> 이 문서는 Claude 공식 문서에서 해당 페이지가 아직 공개되지 않아 기본 구조만 제공합니다.
|
|
4
|
+
|
|
5
|
+
## 개요
|
|
6
|
+
|
|
7
|
+
Claude 기반 애플리케이션의 품질을 보장하기 위한 테스트 및 평가 방법론입니다.
|
|
8
|
+
|
|
9
|
+
## 핵심 개념
|
|
10
|
+
|
|
11
|
+
### 1. 성공 기준 정의
|
|
12
|
+
- 명확한 목표 설정
|
|
13
|
+
- 측정 가능한 지표 정의
|
|
14
|
+
- 기대 결과 문서화
|
|
15
|
+
|
|
16
|
+
### 2. 테스트 케이스 설계
|
|
17
|
+
- 경계 조건 테스트
|
|
18
|
+
- 다양한 입력 시나리오
|
|
19
|
+
- 에러 핸들링 검증
|
|
20
|
+
|
|
21
|
+
### 3. 평가 메트릭
|
|
22
|
+
- 정확도 (Accuracy)
|
|
23
|
+
- 관련성 (Relevance)
|
|
24
|
+
- 일관성 (Consistency)
|
|
25
|
+
- 안전성 (Safety)
|
|
26
|
+
|
|
27
|
+
## 테스트 유형
|
|
28
|
+
|
|
29
|
+
### 단위 테스트
|
|
30
|
+
개별 프롬프트나 도구의 동작 검증
|
|
31
|
+
|
|
32
|
+
### 통합 테스트
|
|
33
|
+
여러 컴포넌트가 함께 작동하는 시나리오 검증
|
|
34
|
+
|
|
35
|
+
### 회귀 테스트
|
|
36
|
+
변경 사항이 기존 기능에 영향을 미치지 않는지 확인
|
|
37
|
+
|
|
38
|
+
### A/B 테스트
|
|
39
|
+
다른 프롬프트나 설정의 효과 비교
|
|
40
|
+
|
|
41
|
+
## 평가 프레임워크
|
|
42
|
+
|
|
43
|
+
### 자동 평가
|
|
44
|
+
- 패턴 매칭
|
|
45
|
+
- 구조 검증
|
|
46
|
+
- 출력 형식 확인
|
|
47
|
+
|
|
48
|
+
### 인간 평가
|
|
49
|
+
- 품질 검토
|
|
50
|
+
- 유용성 평가
|
|
51
|
+
- 안전성 검토
|
|
52
|
+
|
|
53
|
+
## 모범 사례
|
|
54
|
+
|
|
55
|
+
1. **일찍, 자주 테스트**: 개발 초기부터 테스트 통합
|
|
56
|
+
2. **다양한 시나리오 커버**: 일반적인 케이스와 엣지 케이스 모두
|
|
57
|
+
3. **메트릭 추적**: 시간에 따른 성능 변화 모니터링
|
|
58
|
+
4. **피드백 루프**: 평가 결과를 개선에 반영
|