moai-adk 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl
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.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +1 -8
- moai_adk/cli/commands/init.py +10 -5
- moai_adk/cli/commands/update.py +274 -118
- moai_adk/cli/prompts/init_prompts.py +14 -18
- moai_adk/core/diagnostics/slash_commands.py +1 -1
- moai_adk/core/project/backup_utils.py +1 -0
- moai_adk/core/project/phase_executor.py +3 -1
- moai_adk/core/project/validator.py +3 -2
- moai_adk/core/template/backup.py +11 -3
- moai_adk/core/template/merger.py +16 -3
- moai_adk/core/template/processor.py +22 -3
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +443 -424
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +116 -103
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +130 -116
- moai_adk/templates/.claude/agents/alfred/git-manager.md +186 -174
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +227 -213
- moai_adk/templates/.claude/agents/alfred/project-manager.md +205 -125
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +224 -209
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +174 -160
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +151 -139
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +209 -196
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +247 -233
- moai_adk/templates/.claude/commands/alfred/0-project.md +673 -640
- moai_adk/templates/.claude/commands/alfred/1-plan.md +342 -333
- moai_adk/templates/.claude/commands/alfred/2-run.md +295 -285
- moai_adk/templates/.claude/commands/alfred/3-sync.md +366 -356
- moai_adk/templates/.claude/hooks/alfred/README.md +52 -52
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +44 -48
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +17 -17
- moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +59 -59
- moai_adk/templates/.claude/hooks/alfred/core/context.py +19 -19
- moai_adk/templates/.claude/hooks/alfred/core/project.py +52 -52
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +1 -1
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +4 -4
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +27 -27
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +16 -17
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +11 -11
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +308 -307
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +297 -296
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +191 -190
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +112 -0
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +95 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +105 -0
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +90 -0
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +87 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +62 -0
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +70 -43
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +141 -141
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +179 -165
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +78 -78
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +90 -90
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +39 -25
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +117 -74
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +131 -134
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +43 -11
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +51 -14
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +46 -10
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +62 -25
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +44 -17
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +44 -14
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +45 -13
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +46 -14
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +48 -8
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +44 -12
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +44 -43
- moai_adk/templates/.github/workflows/moai-gitflow.yml +36 -35
- moai_adk/templates/.moai/config.json +9 -6
- moai_adk/templates/.moai/memory/development-guide.md +220 -221
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +85 -85
- moai_adk/templates/.moai/memory/spec-metadata.md +149 -150
- moai_adk/templates/.moai/project/product.md +90 -90
- moai_adk/templates/.moai/project/structure.md +85 -85
- moai_adk/templates/.moai/project/tech.md +117 -117
- moai_adk/templates/CLAUDE.md +350 -722
- moai_adk-0.4.1.dist-info/METADATA +303 -0
- moai_adk-0.4.1.dist-info/RECORD +152 -0
- moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -31
- moai_adk/templates/.claude/commands/alfred/2-build.md +0 -30
- moai_adk/templates/.claude/skills/scripts/standardize_skills.py +0 -166
- moai_adk/templates/.claude/skills/scripts/verify_standardization.sh +0 -43
- moai_adk/templates/.moai/hooks/pre-push.sample +0 -88
- moai_adk-0.4.0.dist-info/METADATA +0 -1816
- moai_adk-0.4.0.dist-info/RECORD +0 -145
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,192 +1,191 @@
|
|
|
1
|
-
# Claude Code
|
|
1
|
+
# Claude Code component writing guide
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **A complete guide to writing 5 components**
|
|
4
4
|
>
|
|
5
5
|
> Agent, Command, Skill, Plugin, Settings
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## 📋
|
|
9
|
+
## 📋 Table of Contents
|
|
10
10
|
|
|
11
|
-
1. [Agent
|
|
12
|
-
2. [Command
|
|
13
|
-
3. [Skill
|
|
14
|
-
4. [Plugin
|
|
15
|
-
5. [Settings
|
|
11
|
+
1. [Agent writing guide](#1-agent-writing-guide)
|
|
12
|
+
2. [Command writing guide](#2-command-writing-guide)
|
|
13
|
+
3. [Skill writing guide](#3-skill-writing-guide)
|
|
14
|
+
4. [Plugin setting guide](#4-plugin-setting-guide)
|
|
15
|
+
5. [Settings settings guide](#5-settings-settings-guide)
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
## 1. Agent
|
|
19
|
+
## 1. Agent writing guide
|
|
20
20
|
|
|
21
|
-
### 📐
|
|
21
|
+
### 📐 File Structure
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
**Location**: `.claude/agents/{agent-name}.md`
|
|
24
24
|
|
|
25
|
-
**YAML Frontmatter** (
|
|
25
|
+
**YAML Frontmatter** (required):
|
|
26
26
|
```yaml
|
|
27
27
|
---
|
|
28
28
|
name: {agent-name} # kebab-case
|
|
29
|
-
description: "Use when: {trigger}"
|
|
30
|
-
tools: Read, Write, Edit
|
|
29
|
+
description: "Use when: {trigger}" # "Use when:" pattern required
|
|
30
|
+
tools: Read, Write, Edit # Only necessary tools
|
|
31
31
|
model: sonnet # sonnet|haiku
|
|
32
32
|
---
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
### 🎭
|
|
35
|
+
### 🎭 Agent Persona
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
37
|
+
**Required elements**:
|
|
38
|
+
- **Icon**: Visual identifier (emoji)
|
|
39
|
+
- **Duties**: IT professional duties (System Architect, QA Lead, etc.)
|
|
40
|
+
- **Area of expertise**: Specific area of expertise
|
|
41
|
+
- **Role**: Agent responsibilities
|
|
42
|
+
- **Goals**: what you want to achieve
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
**example**:
|
|
45
45
|
```markdown
|
|
46
|
-
## 🎭
|
|
46
|
+
## 🎭 Agent Persona
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
**Icon**: 🏗️
|
|
49
|
+
**Job**: System Architect
|
|
50
|
+
**Area of Expertise**: SPEC writing, EARS specification, requirements analysis
|
|
51
|
+
**Role**: Convert business requirements into systematic SPEC
|
|
52
|
+
**Goal**: Clear and testable SPEC Write a document
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
### ⚙️
|
|
55
|
+
### ⚙️ Model selection guide
|
|
56
56
|
|
|
57
|
-
|
|
|
57
|
+
| model | When to use | Example |
|
|
58
58
|
|------|----------|------|
|
|
59
|
-
| **sonnet** |
|
|
60
|
-
| **haiku** |
|
|
59
|
+
| **sonnet** | Complex judgment, design, creativity | SPEC writing, TDD strategy, debugging |
|
|
60
|
+
| **haiku** | Fast processing, pattern-based operation | Document synchronization, TAG scanning, linting |
|
|
61
61
|
|
|
62
|
-
### 🛠️
|
|
62
|
+
### 🛠️ Tool Selection Guide
|
|
63
63
|
|
|
64
|
-
|
|
|
64
|
+
| Job type | Essential Tools |
|
|
65
65
|
|----------|----------|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
| **Git
|
|
70
|
-
|
|
|
66
|
+
| **Analysis** | Read, Grep, Glob |
|
|
67
|
+
| **Create Document** | Read, Write, Edit |
|
|
68
|
+
| **Code Implementation** | Read, Write, Edit, MultiEdit |
|
|
69
|
+
| **Git Operations** | Read, Bash(git:*) |
|
|
70
|
+
| **Verification** | Read, Grep, Bash |
|
|
71
71
|
|
|
72
|
-
### ✅
|
|
72
|
+
### ✅ Verification Checklist
|
|
73
73
|
|
|
74
|
-
- [ ] YAML frontmatter
|
|
74
|
+
- [ ] YAML frontmatter exists
|
|
75
75
|
- [ ] `name`: kebab-case
|
|
76
|
-
- [ ] `description`:
|
|
77
|
-
- [ ] `tools`:
|
|
78
|
-
- [ ] `model`: sonnet
|
|
79
|
-
- [ ]
|
|
80
|
-
- [ ]
|
|
76
|
+
- [ ] `description`: Contains the “Use when:” pattern
|
|
77
|
+
- [ ] `tools`: Only the tools you need
|
|
78
|
+
- [ ] `model`: sonnet or haiku
|
|
79
|
+
- [ ] Contains the agent persona section
|
|
80
|
+
- [ ] Contains workflow specific steps
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
84
|
-
## 2. Command
|
|
84
|
+
## 2. Command writing guide
|
|
85
85
|
|
|
86
|
-
### 📐
|
|
86
|
+
### 📐 File Structure
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
**Location**: `.claude/commands/{command-name}.md`
|
|
89
89
|
|
|
90
|
-
**YAML Frontmatter** (
|
|
90
|
+
**YAML Frontmatter** (required):
|
|
91
91
|
```yaml
|
|
92
92
|
---
|
|
93
93
|
name: {command-name} # kebab-case
|
|
94
|
-
description: {
|
|
95
|
-
argument-hint: [{param}]
|
|
96
|
-
allowed-tools:
|
|
94
|
+
description: {one-line description} # Clear purpose
|
|
95
|
+
argument-hint: [{param}] # Optional
|
|
96
|
+
allowed-tools: # Only the tools you need
|
|
97
97
|
- Read
|
|
98
98
|
- Write
|
|
99
99
|
- Task
|
|
100
100
|
---
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
### 🔧
|
|
103
|
+
### 🔧 Naming Conventions
|
|
104
104
|
|
|
105
|
-
- **kebab-case**
|
|
106
|
-
-
|
|
107
|
-
-
|
|
105
|
+
- Use **kebab-case**
|
|
106
|
+
- **Start with a verb** (run, check, deploy, create)
|
|
107
|
+
- **Clear and specific**
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
**Correct Example**:
|
|
110
110
|
- ✅ `deploy-production`
|
|
111
111
|
- ✅ `run-tests`
|
|
112
112
|
- ✅ `alfred:1-spec`
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
**Incorrect example**:
|
|
115
115
|
- ❌ `doSomething` (camelCase)
|
|
116
|
-
- ❌ `cmd1` (
|
|
116
|
+
- ❌ `cmd1` (unclear)
|
|
117
117
|
|
|
118
|
-
### 📋
|
|
118
|
+
### 📋 Standard section structure
|
|
119
119
|
|
|
120
120
|
```markdown
|
|
121
121
|
# {Command Title}
|
|
122
122
|
|
|
123
123
|
{Brief description}
|
|
124
124
|
|
|
125
|
-
## 🎯
|
|
125
|
+
## 🎯 Command Purpose
|
|
126
126
|
{Detailed purpose}
|
|
127
127
|
|
|
128
|
-
## 💡
|
|
128
|
+
## 💡 Example of use
|
|
129
129
|
\`\`\`bash
|
|
130
130
|
/{command-name} {example-args}
|
|
131
131
|
\`\`\`
|
|
132
132
|
|
|
133
|
-
## 📋
|
|
133
|
+
## 📋 Execution flow
|
|
134
134
|
1. **Phase 1**: {Planning}
|
|
135
135
|
2. **Phase 2**: {Execution}
|
|
136
136
|
|
|
137
|
-
## 🔗
|
|
137
|
+
## 🔗 Associated Agent
|
|
138
138
|
- **Primary**: {agent-name} - {role}
|
|
139
139
|
|
|
140
|
-
## ⚠️
|
|
140
|
+
## ⚠️ Precautions
|
|
141
141
|
- {Warning 1}
|
|
142
142
|
|
|
143
|
-
## 📋
|
|
143
|
+
## 📋 Next steps
|
|
144
144
|
- {Next step}
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
### ✅
|
|
147
|
+
### ✅ Verification Checklist
|
|
148
148
|
|
|
149
|
-
- [ ] YAML frontmatter
|
|
149
|
+
- [ ] YAML frontmatter exists
|
|
150
150
|
- [ ] `name`: kebab-case
|
|
151
|
-
- [ ] `description`:
|
|
152
|
-
- [ ] `allowed-tools`:
|
|
153
|
-
- [ ]
|
|
154
|
-
- [ ]
|
|
155
|
-
- [ ]
|
|
151
|
+
- [ ] `description`: One-line description
|
|
152
|
+
- [ ] `allowed-tools`: Array format
|
|
153
|
+
- [ ] Specific patterns when using Bash tools (`Bash(git:*)`)
|
|
154
|
+
- [ ] Include usage examples
|
|
155
|
+
- [ ] Specify execution flow
|
|
156
156
|
|
|
157
157
|
---
|
|
158
158
|
|
|
159
|
-
## 3. Skill
|
|
159
|
+
## 3. Skill creation guide
|
|
160
160
|
|
|
161
|
-
### 📐
|
|
161
|
+
### 📐 File Structure
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
**Location**: `.claude/skills/{skill-name}/SKILL.md`
|
|
164
164
|
|
|
165
|
-
**YAML Frontmatter** (
|
|
165
|
+
**YAML Frontmatter** (required fields + optional `allowed-tools`):
|
|
166
166
|
```yaml
|
|
167
167
|
---
|
|
168
|
-
name: {skill-name} # kebab-case
|
|
169
|
-
description: {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
- Write
|
|
168
|
+
name: {skill-name} # kebab-case, ≤64 chars
|
|
169
|
+
description: {What it does + when to use (≤1024 chars)}
|
|
170
|
+
allowed-tools:
|
|
171
|
+
- Read # optional, enforce least privilege
|
|
172
|
+
- Bash
|
|
174
173
|
---
|
|
175
174
|
```
|
|
176
175
|
|
|
177
|
-
### 🎯 description
|
|
176
|
+
### 🎯 How to write a description
|
|
178
177
|
|
|
179
|
-
|
|
178
|
+
**Important**: Key field that determines when Claude will call the skill (<=1024 chars; aim for ≤200 for clarity)
|
|
180
179
|
|
|
181
|
-
|
|
182
|
-
- ✅ "
|
|
183
|
-
- ✅ "
|
|
180
|
+
**Good example**:
|
|
181
|
+
- ✅ "Directly scan TAG markers and create inventory (CODE-FIRST principle)"
|
|
182
|
+
- ✅ "Select optimal features by project type (37 skills → automatically filter 3-5)"
|
|
184
183
|
|
|
185
|
-
|
|
186
|
-
- ❌
|
|
187
|
-
- ❌
|
|
184
|
+
**Bad example**:
|
|
185
|
+
- ❌ “This skill does something” (too vague)
|
|
186
|
+
- ❌ “This skill does something” (non-specific)
|
|
188
187
|
|
|
189
|
-
### 📁
|
|
188
|
+
### 📁 Optional file structure
|
|
190
189
|
|
|
191
190
|
```
|
|
192
191
|
.claude/skills/{skill-name}/
|
|
@@ -199,25 +198,40 @@ allowed-tools: # 최소 권한
|
|
|
199
198
|
└── template.txt
|
|
200
199
|
```
|
|
201
200
|
|
|
202
|
-
### ✅
|
|
201
|
+
### ✅ Verification Checklist
|
|
203
202
|
|
|
204
|
-
- [ ] YAML frontmatter
|
|
205
|
-
- [ ] `name`: kebab-case
|
|
206
|
-
- [ ] `description`:
|
|
207
|
-
- [ ] `
|
|
208
|
-
- [ ]
|
|
209
|
-
- [ ]
|
|
210
|
-
|
|
203
|
+
- [ ] YAML frontmatter exists
|
|
204
|
+
- [ ] `name`: kebab-case, ≤64 chars, gerund style preferred
|
|
205
|
+
- [ ] `description`: Explains capability + trigger keywords
|
|
206
|
+
- [ ] `allowed-tools`: Lists only tools required by the workflow
|
|
207
|
+
- [ ] Title (# {Skill Title}) exists
|
|
208
|
+
- [ ] Include purpose section
|
|
209
|
+
|
|
210
|
+
### ✨ Anthropic best practices (2024-12)
|
|
211
|
+
|
|
212
|
+
- **Stay concise**: Keep SKILL.md lean so Claude reads only what it needs. Move lengthy procedures into referenced files and keep body <500 lines.
|
|
213
|
+
Source: [Skill authoring best practices](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/best-practices)
|
|
214
|
+
- **Progressive disclosure**: Link reference files (reference.md, examples.md, scripts/) directly from SKILL.md and avoid multi-hop chains. Claude loads each file on demand.
|
|
215
|
+
- **Right-sized guidance**: Match specificity to risk—high-level checklists for flexible tasks, prescriptive scripts for fragile flows.
|
|
216
|
+
- **Consistent naming**: Use gerund or action-oriented names (“Processing PDFs”) and include trigger phrases in descriptions to improve discovery.
|
|
217
|
+
- **Test across models**: Validate behavior with the models you plan to run (Haiku, Sonnet, Opus) to ensure instructions are neither too sparse nor verbose.
|
|
218
|
+
- **Security posture**: Audit bundled scripts, restrict `allowed-tools`, and document any prerequisites or packages.
|
|
219
|
+
|
|
220
|
+
### 📂 Discovery rules
|
|
221
|
+
|
|
222
|
+
- Personal skills live in `~/.claude/skills/{skill-name}/SKILL.md`
|
|
223
|
+
- Project skills live in `.claude/skills/{skill-name}/SKILL.md` and should be committed to git
|
|
224
|
+
- Claude expects each skill as a first-level directory under `skills/`; nested categories like `.claude/skills/domain/backend/SKILL.md` are **not** auto-discovered (per [Agent Skills - Claude Docs](https://docs.claude.com/en/docs/claude-code/skills))
|
|
211
225
|
|
|
212
226
|
---
|
|
213
227
|
|
|
214
|
-
## 4. Plugin
|
|
228
|
+
## 4. Plugin setup guide
|
|
215
229
|
|
|
216
|
-
### 📐
|
|
230
|
+
### 📐 File Structure
|
|
217
231
|
|
|
218
|
-
|
|
232
|
+
**Location**: `.claude/settings.json` (mcpServers section)
|
|
219
233
|
|
|
220
|
-
|
|
234
|
+
**Basic structure**:
|
|
221
235
|
```json
|
|
222
236
|
{
|
|
223
237
|
"mcpServers": {
|
|
@@ -232,37 +246,37 @@ allowed-tools: # 최소 권한
|
|
|
232
246
|
}
|
|
233
247
|
```
|
|
234
248
|
|
|
235
|
-
### 🌟
|
|
249
|
+
### 🌟 Recommended Plugin
|
|
236
250
|
|
|
237
|
-
| Plugin |
|
|
251
|
+
| Plugin | Use | Utilizing MoAI-ADK |
|
|
238
252
|
|--------|------|--------------|
|
|
239
|
-
| **@modelcontextprotocol/server-github** | GitHub API | PR/Issue
|
|
240
|
-
| **@modelcontextprotocol/server-filesystem** |
|
|
241
|
-
| **@modelcontextprotocol/server-brave-search** |
|
|
253
|
+
| **@modelcontextprotocol/server-github** | GitHub API | Automatically generate PR/Issue |
|
|
254
|
+
| **@modelcontextprotocol/server-filesystem** | file system | `.moai/` safe access |
|
|
255
|
+
| **@modelcontextprotocol/server-brave-search** | web search | See technical documentation |
|
|
242
256
|
|
|
243
|
-
### 🔒
|
|
257
|
+
### 🔒 Security Principles
|
|
244
258
|
|
|
245
|
-
####
|
|
246
|
-
- [ ]
|
|
247
|
-
- [ ]
|
|
248
|
-
- [ ]
|
|
249
|
-
- [ ]
|
|
250
|
-
- [ ]
|
|
259
|
+
#### Essential checklist
|
|
260
|
+
- [ ] Use of environment variables (no hardcoding)
|
|
261
|
+
- [ ] Restrict paths (Filesystem MCP)
|
|
262
|
+
- [ ] Minimum privileges
|
|
263
|
+
- [ ] Block sensitive information (`.env`, `secrets/`)
|
|
264
|
+
- [ ] Source reliability (official or verified plugin)
|
|
251
265
|
|
|
252
|
-
####
|
|
266
|
+
#### Secure settings
|
|
253
267
|
```json
|
|
254
268
|
{
|
|
255
269
|
"mcpServers": {
|
|
256
270
|
"github": {
|
|
257
271
|
"env": {
|
|
258
|
-
|
|
272
|
+
"GITHUB_TOKEN": "${GITHUB_TOKEN}" // ✅ Environment variable
|
|
259
273
|
}
|
|
260
274
|
},
|
|
261
275
|
"filesystem": {
|
|
262
276
|
"args": [
|
|
263
277
|
"-y",
|
|
264
278
|
"@modelcontextprotocol/server-filesystem",
|
|
265
|
-
|
|
279
|
+
"${CLAUDE_PROJECT_DIR}/.moai", // ✅ Restricted path
|
|
266
280
|
"${CLAUDE_PROJECT_DIR}/src"
|
|
267
281
|
]
|
|
268
282
|
}
|
|
@@ -270,22 +284,22 @@ allowed-tools: # 최소 권한
|
|
|
270
284
|
}
|
|
271
285
|
```
|
|
272
286
|
|
|
273
|
-
### ✅
|
|
287
|
+
### ✅ Verification Checklist
|
|
274
288
|
|
|
275
|
-
- [ ] JSON
|
|
276
|
-
- [ ]
|
|
277
|
-
- [ ]
|
|
278
|
-
- [ ]
|
|
289
|
+
- [ ] No JSON syntax errors
|
|
290
|
+
- [ ] Use of environment variables (no hard coding)
|
|
291
|
+
- [ ] Restrictions on file system path
|
|
292
|
+
- [ ] Completed setting of necessary environment variables
|
|
279
293
|
|
|
280
294
|
---
|
|
281
295
|
|
|
282
|
-
## 5. Settings
|
|
296
|
+
## 5. Settings Setting Guide
|
|
283
297
|
|
|
284
|
-
### 📐
|
|
298
|
+
### 📐 File Structure
|
|
285
299
|
|
|
286
|
-
|
|
300
|
+
**Location**: `.claude/settings.json`
|
|
287
301
|
|
|
288
|
-
|
|
302
|
+
**Main sections**:
|
|
289
303
|
```json
|
|
290
304
|
{
|
|
291
305
|
"permissions": {
|
|
@@ -302,10 +316,10 @@ allowed-tools: # 최소 권한
|
|
|
302
316
|
}
|
|
303
317
|
```
|
|
304
318
|
|
|
305
|
-
### 🔒 3
|
|
319
|
+
### 🔒 3-level permission management
|
|
306
320
|
|
|
307
|
-
#### 1. `allow` -
|
|
308
|
-
|
|
321
|
+
#### 1. `allow` - Automatic approval
|
|
322
|
+
Allow only safe and essential tools:
|
|
309
323
|
```json
|
|
310
324
|
"allow": [
|
|
311
325
|
"Read",
|
|
@@ -318,8 +332,8 @@ allowed-tools: # 최소 권한
|
|
|
318
332
|
]
|
|
319
333
|
```
|
|
320
334
|
|
|
321
|
-
#### 2. `ask` -
|
|
322
|
-
|
|
335
|
+
#### 2. `ask` - User confirmation
|
|
336
|
+
Important or potentially changeable actions:
|
|
323
337
|
```json
|
|
324
338
|
"ask": [
|
|
325
339
|
"Bash(git push:*)",
|
|
@@ -328,8 +342,8 @@ allowed-tools: # 최소 권한
|
|
|
328
342
|
]
|
|
329
343
|
```
|
|
330
344
|
|
|
331
|
-
#### 3. `deny` -
|
|
332
|
-
|
|
345
|
+
#### 3. `deny` - Absolutely prohibited
|
|
346
|
+
Block dangerous or sensitive operations:
|
|
333
347
|
```json
|
|
334
348
|
"deny": [
|
|
335
349
|
"Read(./.env)",
|
|
@@ -339,10 +353,10 @@ allowed-tools: # 최소 권한
|
|
|
339
353
|
]
|
|
340
354
|
```
|
|
341
355
|
|
|
342
|
-
### 🪝
|
|
356
|
+
### 🪝 Hook system
|
|
343
357
|
|
|
344
|
-
#### SessionStart
|
|
345
|
-
|
|
358
|
+
#### SessionStart hook
|
|
359
|
+
Display project information when session starts:
|
|
346
360
|
```json
|
|
347
361
|
{
|
|
348
362
|
"hooks": {
|
|
@@ -361,8 +375,8 @@ allowed-tools: # 최소 권한
|
|
|
361
375
|
}
|
|
362
376
|
```
|
|
363
377
|
|
|
364
|
-
#### PreToolUse
|
|
365
|
-
|
|
378
|
+
#### PreToolUse hook
|
|
379
|
+
Verify and block before executing the tool:
|
|
366
380
|
```json
|
|
367
381
|
{
|
|
368
382
|
"hooks": {
|
|
@@ -381,39 +395,39 @@ allowed-tools: # 최소 권한
|
|
|
381
395
|
}
|
|
382
396
|
```
|
|
383
397
|
|
|
384
|
-
### ✅
|
|
398
|
+
### ✅ Verification Checklist
|
|
385
399
|
|
|
386
|
-
- [ ] JSON
|
|
387
|
-
- [ ] `allow`:
|
|
388
|
-
- [ ] `ask`:
|
|
389
|
-
- [ ] `deny`:
|
|
390
|
-
- [ ] Bash
|
|
391
|
-
- [ ]
|
|
400
|
+
- [ ] No JSON syntax errors
|
|
401
|
+
- [ ] `allow`: Only essential tools
|
|
402
|
+
- [ ] `ask`: Critical tasks
|
|
403
|
+
- [ ] `deny`: Sensitive files/commands
|
|
404
|
+
- [ ] Bash pattern refinement (`Bash(git:*)`)
|
|
405
|
+
- [ ] Hook file existence and execution permissions
|
|
392
406
|
|
|
393
407
|
---
|
|
394
408
|
|
|
395
|
-
## 📊
|
|
409
|
+
## 📊 Best Practices
|
|
396
410
|
|
|
397
|
-
###
|
|
411
|
+
### Common principles
|
|
398
412
|
|
|
399
|
-
1.
|
|
400
|
-
|
|
401
|
-
|
|
413
|
+
1. **Principle of least privilege**
|
|
414
|
+
- Specify only necessary tools
|
|
415
|
+
- Specific patterns when using Bash
|
|
402
416
|
|
|
403
|
-
2.
|
|
404
|
-
|
|
405
|
-
|
|
417
|
+
2. **Compliant with official standards**
|
|
418
|
+
- YAML frontmatter required fields
|
|
419
|
+
- Filename convention (kebab-case)
|
|
406
420
|
|
|
407
|
-
3.
|
|
408
|
-
|
|
409
|
-
|
|
421
|
+
3. **Security priority**
|
|
422
|
+
- Manage sensitive information as environmental variable
|
|
423
|
+
- Block dangerous operations
|
|
410
424
|
|
|
411
|
-
4.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
425
|
+
4. **Documentation**
|
|
426
|
+
- Clear explanation
|
|
427
|
+
- Concrete examples
|
|
428
|
+
- Verification methods
|
|
415
429
|
|
|
416
430
|
---
|
|
417
431
|
|
|
418
|
-
|
|
419
|
-
|
|
432
|
+
**Last update**: 2025-10-19
|
|
433
|
+
**Author**: @Alfred
|