evizi-kit 1.0.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.
Files changed (201) hide show
  1. package/README.md +506 -0
  2. package/kits/agent/.agent/skills/claude-code-subagent-creator/SKILL.md +292 -0
  3. package/kits/agent/.agent/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  4. package/kits/agent/.agent/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
  5. package/kits/agent/.agent/skills/skill-creator/LICENSE.txt +202 -0
  6. package/kits/agent/.agent/skills/skill-creator/SKILL.md +485 -0
  7. package/kits/agent/.agent/skills/skill-creator/agents/analyzer.md +274 -0
  8. package/kits/agent/.agent/skills/skill-creator/agents/comparator.md +202 -0
  9. package/kits/agent/.agent/skills/skill-creator/agents/grader.md +223 -0
  10. package/kits/agent/.agent/skills/skill-creator/assets/eval_review.html +146 -0
  11. package/kits/agent/.agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  12. package/kits/agent/.agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  13. package/kits/agent/.agent/skills/skill-creator/references/schemas.md +430 -0
  14. package/kits/agent/.agent/skills/skill-creator/scripts/__init__.py +0 -0
  15. package/kits/agent/.agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  16. package/kits/agent/.agent/skills/skill-creator/scripts/generate_report.py +326 -0
  17. package/kits/agent/.agent/skills/skill-creator/scripts/improve_description.py +247 -0
  18. package/kits/agent/.agent/skills/skill-creator/scripts/package_skill.py +136 -0
  19. package/kits/agent/.agent/skills/skill-creator/scripts/quick_validate.py +103 -0
  20. package/kits/agent/.agent/skills/skill-creator/scripts/run_eval.py +310 -0
  21. package/kits/agent/.agent/skills/skill-creator/scripts/run_loop.py +328 -0
  22. package/kits/agent/.agent/skills/skill-creator/scripts/utils.py +47 -0
  23. package/kits/agent/manifest.json +10 -0
  24. package/kits/claude/.claude/agents/code-pusher.md +46 -0
  25. package/kits/claude/.claude/agents/feature-document-updater.md +37 -0
  26. package/kits/claude/.claude/agents/self-reviewer.md +32 -0
  27. package/kits/claude/.claude/agents/web-auto-agentic-workflow-initializer.md +42 -0
  28. package/kits/claude/.claude/agents/web-auto-assisted-fix-and-runner.md +36 -0
  29. package/kits/claude/.claude/agents/web-auto-chrome-devtools-selector-extractor.md +36 -0
  30. package/kits/claude/.claude/agents/web-auto-coder.md +33 -0
  31. package/kits/claude/.claude/agents/web-auto-fe-selector-extractor.md +31 -0
  32. package/kits/claude/.claude/agents/web-auto-fix-and-runner.md +35 -0
  33. package/kits/claude/.claude/agents/web-auto-lessons-learned-extractor.md +34 -0
  34. package/kits/claude/.claude/agents/web-auto-playwright-mcp-selector-extractor.md +37 -0
  35. package/kits/claude/.claude/agents/web-auto-source-instructions-updater.md +43 -0
  36. package/kits/claude/.claude/agents/web-auto-test-cases-generator.md +29 -0
  37. package/kits/claude/.claude/agents/web-auto-ticket-designer.md +35 -0
  38. package/kits/claude/.claude/agents/web-auto-ticket-playbook-planner.md +36 -0
  39. package/kits/claude/.claude/agents/web-auto.md +382 -0
  40. package/kits/claude/.claude/skills/claude-code-subagent-creator/SKILL.md +292 -0
  41. package/kits/claude/.claude/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  42. package/kits/claude/.claude/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
  43. package/kits/claude/.claude/skills/skill-creator/LICENSE.txt +202 -0
  44. package/kits/claude/.claude/skills/skill-creator/SKILL.md +485 -0
  45. package/kits/claude/.claude/skills/skill-creator/agents/analyzer.md +274 -0
  46. package/kits/claude/.claude/skills/skill-creator/agents/comparator.md +202 -0
  47. package/kits/claude/.claude/skills/skill-creator/agents/grader.md +223 -0
  48. package/kits/claude/.claude/skills/skill-creator/assets/eval_review.html +146 -0
  49. package/kits/claude/.claude/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  50. package/kits/claude/.claude/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  51. package/kits/claude/.claude/skills/skill-creator/references/schemas.md +430 -0
  52. package/kits/claude/.claude/skills/skill-creator/scripts/__init__.py +0 -0
  53. package/kits/claude/.claude/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  54. package/kits/claude/.claude/skills/skill-creator/scripts/generate_report.py +326 -0
  55. package/kits/claude/.claude/skills/skill-creator/scripts/improve_description.py +247 -0
  56. package/kits/claude/.claude/skills/skill-creator/scripts/package_skill.py +136 -0
  57. package/kits/claude/.claude/skills/skill-creator/scripts/quick_validate.py +103 -0
  58. package/kits/claude/.claude/skills/skill-creator/scripts/run_eval.py +310 -0
  59. package/kits/claude/.claude/skills/skill-creator/scripts/run_loop.py +328 -0
  60. package/kits/claude/.claude/skills/skill-creator/scripts/utils.py +47 -0
  61. package/kits/claude/manifest.json +10 -0
  62. package/kits/cursor/.cursor/agents/code-pusher.agent.md +43 -0
  63. package/kits/cursor/.cursor/agents/feature-document-updater.agent.md +34 -0
  64. package/kits/cursor/.cursor/agents/self-reviewer.agent.md +29 -0
  65. package/kits/cursor/.cursor/agents/web-auto-agentic-workflow-initializer.agent.md +37 -0
  66. package/kits/cursor/.cursor/agents/web-auto-assisted-fix-and-runner.agent.md +33 -0
  67. package/kits/cursor/.cursor/agents/web-auto-chrome-devtools-selector-extractor.agent.md +31 -0
  68. package/kits/cursor/.cursor/agents/web-auto-coder.agent.md +30 -0
  69. package/kits/cursor/.cursor/agents/web-auto-fe-selector-extractor.agent.md +28 -0
  70. package/kits/cursor/.cursor/agents/web-auto-fix-and-runner.agent.md +32 -0
  71. package/kits/cursor/.cursor/agents/web-auto-lessons-learned-extractor.agent.md +31 -0
  72. package/kits/cursor/.cursor/agents/web-auto-playwright-mcp-selector-extractor.agent.md +32 -0
  73. package/kits/cursor/.cursor/agents/web-auto-source-instructions-updater.agent.md +40 -0
  74. package/kits/cursor/.cursor/agents/web-auto-test-cases-generator.agent.md +26 -0
  75. package/kits/cursor/.cursor/agents/web-auto-ticket-designer.agent.md +32 -0
  76. package/kits/cursor/.cursor/agents/web-auto-ticket-playbook-planner.agent.md +33 -0
  77. package/kits/cursor/.cursor/agents/web-auto.agent.md +379 -0
  78. package/kits/cursor/.cursor/skills/claude-code-subagent-creator/SKILL.md +292 -0
  79. package/kits/cursor/.cursor/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  80. package/kits/cursor/.cursor/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +26 -0
  81. package/kits/cursor/.cursor/skills/skill-creator/LICENSE.txt +202 -0
  82. package/kits/cursor/.cursor/skills/skill-creator/SKILL.md +485 -0
  83. package/kits/cursor/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
  84. package/kits/cursor/.cursor/skills/skill-creator/agents/comparator.md +202 -0
  85. package/kits/cursor/.cursor/skills/skill-creator/agents/grader.md +223 -0
  86. package/kits/cursor/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
  87. package/kits/cursor/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  88. package/kits/cursor/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  89. package/kits/cursor/.cursor/skills/skill-creator/references/schemas.md +430 -0
  90. package/kits/cursor/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
  91. package/kits/cursor/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  92. package/kits/cursor/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
  93. package/kits/cursor/.cursor/skills/skill-creator/scripts/improve_description.py +247 -0
  94. package/kits/cursor/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
  95. package/kits/cursor/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
  96. package/kits/cursor/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
  97. package/kits/cursor/.cursor/skills/skill-creator/scripts/run_loop.py +328 -0
  98. package/kits/cursor/.cursor/skills/skill-creator/scripts/utils.py +47 -0
  99. package/kits/cursor/manifest.json +10 -0
  100. package/kits/github/.github/agents/code-pusher.agent.md +45 -0
  101. package/kits/github/.github/agents/feature-document-updater.agent.md +36 -0
  102. package/kits/github/.github/agents/self-reviewer.agent.md +31 -0
  103. package/kits/github/.github/agents/web-auto-agentic-workflow-initializer.agent.md +39 -0
  104. package/kits/github/.github/agents/web-auto-assisted-fix-and-runner.agent.md +35 -0
  105. package/kits/github/.github/agents/web-auto-chrome-devtools-selector-extractor.agent.md +33 -0
  106. package/kits/github/.github/agents/web-auto-coder.agent.md +32 -0
  107. package/kits/github/.github/agents/web-auto-fe-selector-extractor.agent.md +30 -0
  108. package/kits/github/.github/agents/web-auto-fix-and-runner.agent.md +34 -0
  109. package/kits/github/.github/agents/web-auto-lessons-learned-extractor.agent.md +33 -0
  110. package/kits/github/.github/agents/web-auto-playwright-mcp-selector-extractor.agent.md +34 -0
  111. package/kits/github/.github/agents/web-auto-source-instructions-updater.agent.md +42 -0
  112. package/kits/github/.github/agents/web-auto-test-cases-generator.agent.md +28 -0
  113. package/kits/github/.github/agents/web-auto-ticket-designer.agent.md +34 -0
  114. package/kits/github/.github/agents/web-auto-ticket-playbook-creator.agent.md +35 -0
  115. package/kits/github/.github/agents/web-auto.agent.md +382 -0
  116. package/kits/github/.github/skills/claude-code-subagent-creator/SKILL.md +310 -0
  117. package/kits/github/.github/skills/claude-code-subagent-creator/references/claude-code-subagent-configuration.md +158 -0
  118. package/kits/github/.github/skills/claude-code-subagent-creator/templates/subagent-profile.template.md +37 -0
  119. package/kits/github/.github/skills/skill-creator/LICENSE.txt +202 -0
  120. package/kits/github/.github/skills/skill-creator/SKILL.md +485 -0
  121. package/kits/github/.github/skills/skill-creator/agents/analyzer.md +274 -0
  122. package/kits/github/.github/skills/skill-creator/agents/comparator.md +202 -0
  123. package/kits/github/.github/skills/skill-creator/agents/grader.md +223 -0
  124. package/kits/github/.github/skills/skill-creator/assets/eval_review.html +146 -0
  125. package/kits/github/.github/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  126. package/kits/github/.github/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  127. package/kits/github/.github/skills/skill-creator/references/schemas.md +430 -0
  128. package/kits/github/.github/skills/skill-creator/scripts/__init__.py +0 -0
  129. package/kits/github/.github/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  130. package/kits/github/.github/skills/skill-creator/scripts/generate_report.py +326 -0
  131. package/kits/github/.github/skills/skill-creator/scripts/improve_description.py +247 -0
  132. package/kits/github/.github/skills/skill-creator/scripts/package_skill.py +136 -0
  133. package/kits/github/.github/skills/skill-creator/scripts/quick_validate.py +103 -0
  134. package/kits/github/.github/skills/skill-creator/scripts/run_eval.py +310 -0
  135. package/kits/github/.github/skills/skill-creator/scripts/run_loop.py +328 -0
  136. package/kits/github/.github/skills/skill-creator/scripts/utils.py +47 -0
  137. package/kits/github/manifest.json +10 -0
  138. package/kits/shared/docs/ai-code-review.md +440 -0
  139. package/kits/shared/docs/increase-unit-test-coverage.md +77 -0
  140. package/kits/shared/docs/pr-review-agent.md +501 -0
  141. package/kits/shared/docs/self-review-agent.md +246 -0
  142. package/kits/shared/docs/web-auto-agentic-workflow.md +506 -0
  143. package/kits/shared/manifest.json +11 -0
  144. package/kits/shared/skills/fix-automation-tests/SKILL.md +280 -0
  145. package/kits/shared/skills/fix-automation-tests/scripts/fetch_pr_changes.py +300 -0
  146. package/kits/shared/skills/fix-automation-tests/templates/impact-report.template.md +42 -0
  147. package/kits/shared/skills/increase-unit-test-coverage/SKILL.md +117 -0
  148. package/kits/shared/skills/increase-unit-test-coverage/scripts/filter_low_coverage.py +447 -0
  149. package/kits/shared/skills/pr-review/SKILL.md +200 -0
  150. package/kits/shared/skills/pr-review/references/automation.md +62 -0
  151. package/kits/shared/skills/pr-review/references/backend.md +95 -0
  152. package/kits/shared/skills/pr-review/references/frontend.md +103 -0
  153. package/kits/shared/skills/pr-review/references/mobile.md +108 -0
  154. package/kits/shared/skills/pr-review/references/output-schema.md +130 -0
  155. package/kits/shared/skills/pr-review/scripts/post-review.py +1395 -0
  156. package/kits/shared/skills/push-code/SKILL.md +176 -0
  157. package/kits/shared/skills/self-review/SKILL.md +234 -0
  158. package/kits/shared/skills/self-review/evals/evals.json +23 -0
  159. package/kits/shared/skills/self-review/references/automation.md +62 -0
  160. package/kits/shared/skills/self-review/references/backend.md +95 -0
  161. package/kits/shared/skills/self-review/references/frontend.md +103 -0
  162. package/kits/shared/skills/self-review/references/mobile.md +108 -0
  163. package/kits/shared/skills/self-review/templates/issues.template.md +72 -0
  164. package/kits/shared/skills/update-feature-document/SKILL.md +156 -0
  165. package/kits/shared/skills/update-feature-document/templates/delta.template.yaml +58 -0
  166. package/kits/shared/skills/update-feature-document/templates/feature.template.md +25 -0
  167. package/kits/shared/skills/web-auto-assisted-fix-and-run/SKILL.md +130 -0
  168. package/kits/shared/skills/web-auto-assisted-fix-and-run/references/resolve-api-error.md +108 -0
  169. package/kits/shared/skills/web-auto-assisted-fix-and-run/references/resolve-selector.md +60 -0
  170. package/kits/shared/skills/web-auto-assisted-fix-and-run/templates/issues-resolution-report-append.template.md +54 -0
  171. package/kits/shared/skills/web-auto-chrome-devtools-mcp-extract-selectors/SKILL.md +284 -0
  172. package/kits/shared/skills/web-auto-coding/SKILL.md +152 -0
  173. package/kits/shared/skills/web-auto-extract-lessons-learned/SKILL.md +168 -0
  174. package/kits/shared/skills/web-auto-extract-lessons-learned/templates/lessons-learned.template.md +115 -0
  175. package/kits/shared/skills/web-auto-fe-extract-selectors/SKILL.md +282 -0
  176. package/kits/shared/skills/web-auto-fe-extract-selectors/evals/evals.json +23 -0
  177. package/kits/shared/skills/web-auto-fix-and-run-test/SKILL.md +183 -0
  178. package/kits/shared/skills/web-auto-fix-and-run-test/templates/issues-resolution-report.template.md +77 -0
  179. package/kits/shared/skills/web-auto-generate-best-practices/SKILL.md +123 -0
  180. package/kits/shared/skills/web-auto-generate-instructions/SKILL.md +200 -0
  181. package/kits/shared/skills/web-auto-generate-instructions/evals/evals.json +23 -0
  182. package/kits/shared/skills/web-auto-generate-instructions/references/analysis-guide.md +145 -0
  183. package/kits/shared/skills/web-auto-generate-instructions/templates/web-auto-instructions.template.md +184 -0
  184. package/kits/shared/skills/web-auto-generate-project-blueprint/SKILL.md +181 -0
  185. package/kits/shared/skills/web-auto-generate-project-blueprint/evals/evals.json +57 -0
  186. package/kits/shared/skills/web-auto-generate-project-blueprint/templates/web-auto-project-blueprint.template.md +161 -0
  187. package/kits/shared/skills/web-auto-playwright-mcp-extract-selectors/SKILL.md +293 -0
  188. package/kits/shared/skills/web-auto-test-cases/SKILL.md +138 -0
  189. package/kits/shared/skills/web-auto-test-cases/evals/evals.json +129 -0
  190. package/kits/shared/skills/web-auto-test-cases/templates/test-cases.template.md +53 -0
  191. package/kits/shared/skills/web-auto-ticket-design/SKILL.md +199 -0
  192. package/kits/shared/skills/web-auto-ticket-design/templates/ticket-design.template.md +138 -0
  193. package/kits/shared/skills/web-auto-ticket-playbook/SKILL.md +218 -0
  194. package/kits/shared/skills/web-auto-ticket-playbook/evals/evals.json +23 -0
  195. package/kits/shared/skills/web-auto-ticket-playbook/templates/ticket-playbook.template.md +148 -0
  196. package/kits/shared/skills/web-auto-update-source-instructions/SKILL.md +156 -0
  197. package/kits/shared/skills/web-auto-update-source-instructions/evals/evals.json +22 -0
  198. package/kits/shared/skills/workspace-ai-nav-creator/SKILL.md +168 -0
  199. package/kits/shared/skills/workspace-ai-nav-creator/templates/agents-md.template.md +112 -0
  200. package/kits/shared/skills/workspace-ai-nav-creator/templates/claude-md.template.md +86 -0
  201. package/package.json +16 -0
@@ -0,0 +1,310 @@
1
+ ---
2
+ name: claude-code-subagent-creator
3
+ description: Create Claude Code custom subagent profiles (Markdown files with YAML frontmatter stored in .claude/agents/) that use corresponding skills. Use when asked to create a Claude Code subagent for a skill, generate a subagent file, build a custom agent for Claude Code, or wire up skills to a Claude Code subagent. Triggers on requests like "create a Claude Code subagent for skill X", "make a Claude Code agent that uses skill Y", "generate subagent profile for these skills", or "set up a subagent for X task". Use proactively whenever someone mentions .claude/agents/, Claude Code automation, or wants a dedicated Claude agent for any repeatable task — even without explicitly saying "subagent". NOT for GitHub Copilot agents (.agent.md) — use copilot-subagent-creator for those.
4
+ ---
5
+
6
+ # Claude Code Subagent Creator
7
+
8
+ Create Claude Code subagent profiles — Markdown files with YAML frontmatter stored in `.claude/agents/` (project-level) or `~/.claude/agents/` (user-level). Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions.
9
+
10
+ The created subagent uses the `skills` frontmatter field to preload user-provided skill content at startup, so the subagent receives the full skill knowledge as part of its context without needing to read files at runtime.
11
+
12
+ ## Key Concepts
13
+
14
+ - Subagents receive **only** their markdown body as the system prompt (plus basic environment details). They do **not** receive the full Claude Code system prompt.
15
+ - The `skills` frontmatter field **injects the full content** of each listed skill into the subagent's context at startup. Subagents don't inherit skills from the parent conversation — you must list them explicitly.
16
+ - The system prompt should be direct and actionable — never include meta-instructions like "go read SKILL.md". The skill content is already injected.
17
+ - Each subagent should excel at **one specific task**.
18
+ - Subagents can be **project-scoped** (`.claude/agents/`) for team use or **user-scoped** (`~/.claude/agents/`) for personal use across all projects. Determine scope before writing the file — ask the user if not specified.
19
+
20
+ ## Subagent Creation Workflow
21
+
22
+ 1. Identify and analyze the target skills
23
+ 2. Design the subagent configuration
24
+ 3. Write the system prompt
25
+ 4. Generate the subagent file
26
+ 5. Verify and test
27
+
28
+ ### Step 1: Identify and Analyze the Target Skills
29
+
30
+ The user provides one or more skills that the subagent should use. Locate and read each skill's `SKILL.md` to understand what it does:
31
+ - Check `skills/<skill-name>/SKILL.md` (workspace convention)
32
+ - Check `.github/skills/<skill-name>/SKILL.md` (Copilot convention)
33
+
34
+ For each skill, extract:
35
+ 1. **Skill name** — from frontmatter `name` (this goes into the `skills` list)
36
+ 2. **Skill description** — from frontmatter `description`
37
+ 3. **Workflow summary** — key steps the skill performs
38
+ 4. **Tool requirements** — what tools the skill needs (file read/write, search, shell, etc.)
39
+ 5. **Output format** — what the skill produces
40
+
41
+ If the user describes a task without naming a skill, search the skills directories for a matching skill by reading available `SKILL.md` frontmatter descriptions. If no matching skill exists, inform the user and suggest creating one first using the `skill-creator` skill.
42
+
43
+ ### Step 2: Design the Subagent Configuration
44
+
45
+ Derive the subagent configuration from the analyzed skills. For the full configuration reference, see [references/claude-code-subagent-configuration.md](references/claude-code-subagent-configuration.md).
46
+
47
+ #### Name (required)
48
+ Derive from the skill name(s). Use lowercase letters and hyphens:
49
+ - Skill `pr-review` → Subagent `pr-reviewer`
50
+ - Skill `increase-unit-test-coverage` → Subagent `test-coverage`
51
+ - Skill `web-auto-coding` → Subagent `web-auto-coder`
52
+ - Multiple skills → name by the primary responsibility (e.g., skills `api-conventions` + `error-handling-patterns` → `api-developer`)
53
+
54
+ #### Description (required)
55
+ Combine the skill descriptions into a concise subagent description (1-2 sentences) explaining **what the subagent does** and **when Claude should delegate to it**. Claude uses this to decide when to delegate, so be specific. Include "use proactively" for subagents that should be auto-triggered.
56
+
57
+ Good: `"Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code."`
58
+
59
+ Bad: `"Reviews code"` (too vague for Claude to know when to delegate)
60
+
61
+ #### Skills (required)
62
+ List all user-provided skills in the `skills` frontmatter field. The full content of each skill is injected into the subagent's context at startup.
63
+
64
+ ```yaml
65
+ skills:
66
+ - skill-name-1
67
+ - skill-name-2
68
+ ```
69
+
70
+ #### Tools
71
+ Derive from the union of tool requirements across all provided skills. Grant only the tools the skills actually need. Omit `tools` to inherit all.
72
+
73
+ | Tool | Description |
74
+ |------|-------------|
75
+ | `Read` | Read file contents |
76
+ | `Write` | Write/create files |
77
+ | `Edit` | Edit existing files |
78
+ | `Bash` | Execute shell commands |
79
+ | `Grep` | Search text in files |
80
+ | `Glob` | Find files by pattern |
81
+
82
+ Common patterns:
83
+ - **Read-only subagent**: `tools: Read, Grep, Glob, Bash` + `disallowedTools: Write, Edit`
84
+ - **Full access subagent**: Omit `tools` entirely
85
+ - **Limited execution**: `tools: Read, Grep, Glob` (no Bash, no file modification)
86
+
87
+ #### Model
88
+ - `haiku` — fast, low-latency (codebase exploration, simple lookups)
89
+ - `sonnet` — balanced capability and speed (most subagents)
90
+ - `opus` — most capable (complex reasoning, architecture decisions)
91
+ - `inherit` — same as main conversation (default if omitted)
92
+
93
+ #### Scope
94
+ Determine whether the subagent should be project-scoped or user-scoped **before** writing the file:
95
+ - **Project** (`.claude/agents/`): Codebase-specific agents, checked into VCS for team sharing. Use this as the default.
96
+ - **User** (`~/.claude/agents/`): Personal agents available in all projects (e.g., a general-purpose reviewer or formatter).
97
+
98
+ If the user hasn't specified, ask: *"Should this be a project agent (team-shared) or a personal agent (available across all your projects)?"*
99
+
100
+ #### Optional Fields
101
+ Only add these when the subagent genuinely needs them:
102
+
103
+ - **`memory`**: Enable persistent cross-session learning. Scopes: `user` (all projects), `project` (project-specific, shareable via VCS), `local` (project-specific, not in VCS).
104
+ - **`hooks`**: Lifecycle hooks for validation or side effects. Use `PreToolUse` to validate, `PostToolUse` for post-processing, `Stop` for cleanup.
105
+ - **`permissionMode`**: `default`, `acceptEdits`, `dontAsk`, `plan` (read-only), or `bypassPermissions` (use with extreme caution).
106
+ - **`background`**: Set `true` to always run concurrently without blocking the main conversation. Useful for long-running monitors or background analysis tasks.
107
+ - **`maxTurns`**: Cap the number of agentic turns. Useful for safety-sensitive or cost-sensitive subagents.
108
+ - **`isolation`**: Set `worktree` for isolated git worktree execution — good for experiments or risky refactors.
109
+ - **`mcpServers`**: MCP servers available to this subagent. Only list the MCP servers the skill actually needs — this applies least-privilege access. Example: a web-scraping skill might need the `browser` MCP server, while a database skill might need the `postgres` MCP server.
110
+
111
+ ### Step 3: Write the System Prompt
112
+
113
+ The markdown body below the frontmatter becomes the subagent's **entire system prompt**. Since the skills are preloaded via the `skills` frontmatter field, the system prompt should **direct the subagent to use the preloaded skill knowledge** — not re-explain it. Follow these best practices from the official Claude Code documentation:
114
+
115
+ #### Structure Pattern
116
+
117
+ ```
118
+ 1. Role statement — who the subagent is
119
+ 2. Skill reference — tell the subagent to follow the preloaded skills
120
+ 3. "When invoked" block — immediate action steps (numbered)
121
+ 4. Domain-specific guidance — checklist, key practices, or process (derived from the skills)
122
+ 5. Output format — how to present results
123
+ ```
124
+
125
+ #### Prompt Writing Guidelines
126
+
127
+ **Reference the preloaded skills by name.** Since skill content is injected at startup, tell the subagent: "Follow the conventions and patterns from the preloaded skills." or "Follow the workflow defined in the [skill-name] skill."
128
+
129
+ **Be direct and actionable.** The subagent should know exactly what to do when invoked. Start with "When invoked:" followed by numbered steps derived from the skill workflow.
130
+
131
+ **Derive domain guidance from the skills.** Extract the key checklists, criteria, or process steps from the skill and include them (or summarize them) in the prompt to reinforce the skill's workflow.
132
+
133
+ **Be specific about output format.** Tell the subagent how to organize and present its results (e.g., "organized by priority: Critical → Warnings → Suggestions").
134
+
135
+ **Keep it focused.** Each subagent should do one thing well. Don't combine multiple unrelated responsibilities.
136
+
137
+ **Keep prompts concise.** Trust the skill injection — don't restate what the skill already explains. The prompt body should orient and direct the subagent, not re-teach the skill. Aim for 150–400 words; if you need more, the skill is doing the work, not the prompt.
138
+
139
+ **Coordinate multiple skills explicitly.** When listing more than one skill, tell the subagent the order or relationship: *"Apply the api-conventions skill first to establish structure, then apply error-handling-patterns to add resilience."* This prevents the subagent from blending concerns randomly.
140
+
141
+ **Include memory instructions when using `memory`.** Tell the subagent what to remember: `"Update your agent memory as you discover codepaths, patterns, library locations, and key architectural decisions."`
142
+
143
+ **Do NOT include meta-instructions to read files.** Never tell the subagent to "go read SKILL.md for instructions". The skill content is already injected via the `skills` field. The prompt should complement the skill, not redirect to it.
144
+
145
+ ### Step 4: Generate the Subagent File
146
+
147
+ **Confirm scope before writing.** If you haven't already confirmed with the user, do so now: *"Should this subagent go into `.claude/agents/` (project, shared with the team) or `~/.claude/agents/` (personal, available everywhere)?"* Default to `.claude/agents/` for codebase-specific agents.
148
+
149
+ **File location by scope:**
150
+ - **Project**: `.claude/agents/<agent-name>.md` — check into version control for team use
151
+ - **User**: `~/.claude/agents/<agent-name>.md` — personal, available in all projects
152
+
153
+ Use the template at [templates/subagent-profile.template.md](templates/subagent-profile.template.md) as a starting point, replacing `{{PLACEHOLDER}}` values.
154
+
155
+ #### Example: Subagent with a Single Skill (pr-review)
156
+
157
+ ```markdown
158
+ ---
159
+ name: pr-reviewer
160
+ description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
161
+ tools: Read, Grep, Glob, Bash
162
+ model: sonnet
163
+ skills:
164
+ - pr-review
165
+ ---
166
+
167
+ You are a senior code reviewer ensuring high standards of code quality and security.
168
+
169
+ Follow the review workflow defined in the pr-review skill.
170
+
171
+ When invoked:
172
+ 1. Run git diff to see recent changes
173
+ 2. Focus on modified files
174
+ 3. Begin review following the skill's process
175
+
176
+ Provide feedback organized by priority:
177
+ - Critical issues (must fix)
178
+ - Warnings (should fix)
179
+ - Suggestions (consider improving)
180
+
181
+ Include specific examples of how to fix issues.
182
+ ```
183
+
184
+ #### Example: Subagent with Multiple Skills
185
+
186
+ ```markdown
187
+ ---
188
+ name: api-developer
189
+ description: Implement API endpoints following team conventions and error handling standards.
190
+ tools: Read, Edit, Write, Bash, Grep, Glob
191
+ model: sonnet
192
+ skills:
193
+ - api-conventions
194
+ - error-handling-patterns
195
+ ---
196
+
197
+ Implement API endpoints. Follow the conventions and patterns from the preloaded skills.
198
+
199
+ When invoked:
200
+ 1. Understand the endpoint requirement
201
+ 2. Check existing patterns in the codebase
202
+ 3. Implement the endpoint following api-conventions skill
203
+ 4. Add error handling per the error-handling-patterns skill
204
+ 5. Write or update tests
205
+ ```
206
+
207
+ #### Example: Subagent with Skills, Memory, and Hooks
208
+
209
+ ```markdown
210
+ ---
211
+ name: db-reader
212
+ description: Execute read-only database queries. Use when analyzing data or generating reports.
213
+ tools: Bash, Read
214
+ model: sonnet
215
+ skills:
216
+ - database-schema
217
+ memory: project
218
+ hooks:
219
+ PreToolUse:
220
+ - matcher: "Bash"
221
+ hooks:
222
+ - type: command
223
+ command: "./scripts/validate-readonly-query.sh"
224
+ ---
225
+
226
+ You are a database analyst with read-only access. Use the table schemas and query patterns from the database-schema skill.
227
+
228
+ When asked to analyze data:
229
+ 1. Identify which tables contain the relevant data using preloaded schema knowledge
230
+ 2. Write efficient SELECT queries with appropriate filters
231
+ 3. Present results clearly with context
232
+
233
+ You cannot modify data. If asked to INSERT, UPDATE, DELETE, or modify schema, explain that you only have read access.
234
+
235
+ Update your agent memory as you discover common queries, data patterns, and optimization insights.
236
+ ```
237
+
238
+ #### Example: Read-Only Subagent with Skills
239
+
240
+ ```markdown
241
+ ---
242
+ name: debugger
243
+ description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
244
+ tools: Read, Edit, Bash, Grep, Glob
245
+ skills:
246
+ - fix-automation-tests
247
+ ---
248
+
249
+ You are an expert debugger specializing in root cause analysis. Follow the debugging workflow from the fix-automation-tests skill.
250
+
251
+ When invoked:
252
+ 1. Capture error message and stack trace
253
+ 2. Identify reproduction steps
254
+ 3. Isolate the failure location
255
+ 4. Implement minimal fix following the skill's patterns
256
+ 5. Verify solution works
257
+
258
+ For each issue, provide:
259
+ - Root cause explanation
260
+ - Evidence supporting the diagnosis
261
+ - Specific code fix
262
+ - Testing approach
263
+ - Prevention recommendations
264
+
265
+ Focus on fixing the underlying issue, not the symptoms.
266
+ ```
267
+
268
+ ### Step 5: Verify and Test
269
+
270
+ Before finalizing, verify:
271
+
272
+ - [ ] `name` uses only lowercase letters and hyphens
273
+ - [ ] `description` clearly states what the subagent does AND when to delegate
274
+ - [ ] `skills` lists all user-provided skills and names match existing skills
275
+ - [ ] `tools` grants only what the skills need (principle of least privilege)
276
+ - [ ] `model` is appropriate for the task complexity
277
+ - [ ] System prompt references the preloaded skills by name
278
+ - [ ] System prompt starts with a role statement and "When invoked:" steps
279
+ - [ ] System prompt does NOT tell the subagent to "go read" any files — skills are already injected
280
+ - [ ] System prompt is concise (150–400 words) and does not restate skill content
281
+ - [ ] Output format is specified in the prompt
282
+ - [ ] File is in the correct scope location: `.claude/agents/` (project) or `~/.claude/agents/` (user)
283
+ - [ ] If using `memory`, prompt includes instructions on what to remember
284
+ - [ ] If using `hooks`, validation scripts exist and are executable
285
+ - [ ] If using `mcpServers`, each listed server is available in the target environment
286
+ - [ ] If using `background: true`, the task is genuinely long-running and non-blocking
287
+ - [ ] If using `isolation: worktree`, understand that the subagent operates in a separate git worktree
288
+
289
+ After saving, the subagent is available immediately in new sessions (or use `/agents` to load it in the current session).
290
+
291
+ ## Rules
292
+
293
+ ### DO:
294
+ - Always include user-provided skills in the `skills` frontmatter field
295
+ - Read each skill's SKILL.md to understand its workflow before designing the subagent
296
+ - Derive the subagent's name, description, tools, and prompt from the skill analysis
297
+ - Design focused subagents — each should excel at one specific task
298
+ - Write detailed descriptions — Claude uses them to decide when to delegate
299
+ - Limit tool access — grant only what the skills need
300
+ - Reference preloaded skills by name in the system prompt
301
+ - Follow the "When invoked:" numbered steps pattern from official examples
302
+
303
+ ### DO NOT:
304
+ - Create a subagent without listing the user-provided skills in `skills` frontmatter
305
+ - Write meta-instructions like "go read SKILL.md" in the prompt body — skill content is already injected
306
+ - Grant more tools than the skills actually need
307
+ - Combine multiple unrelated responsibilities into one subagent
308
+ - Use `bypassPermissions` without explicit user request and understanding of risks
309
+ - Omit the description field — it's required and drives delegation decisions
310
+ - Write vague descriptions — Claude won't know when to delegate
@@ -0,0 +1,158 @@
1
+ # Claude Code Subagent Configuration Reference
2
+
3
+ Source: https://code.claude.com/docs/en/sub-agents
4
+
5
+ ## Subagent File Format
6
+
7
+ Subagent files are Markdown files with YAML frontmatter. The body becomes the system prompt.
8
+
9
+ ```markdown
10
+ ---
11
+ name: my-agent
12
+ description: What the agent does and when to use it
13
+ tools: Read, Grep, Glob, Bash
14
+ model: sonnet
15
+ ---
16
+
17
+ You are a specialist. When invoked, do X, Y, Z.
18
+ ```
19
+
20
+ ## Subagent Scope (File Locations)
21
+
22
+ | Location | Scope | Priority |
23
+ |----------|-------|----------|
24
+ | `--agents` CLI flag | Current session only | 1 (highest) |
25
+ | `.claude/agents/` | Current project | 2 |
26
+ | `~/.claude/agents/` | All user projects | 3 |
27
+ | Plugin's `agents/` directory | Where plugin is enabled | 4 (lowest) |
28
+
29
+ - **Project subagents** (`.claude/agents/`): Ideal for codebase-specific agents. Check into version control for team sharing.
30
+ - **User subagents** (`~/.claude/agents/`): Personal agents available in all projects.
31
+
32
+ ## YAML Frontmatter Fields
33
+
34
+ | Field | Required | Description |
35
+ |-------|----------|-------------|
36
+ | `name` | Yes | Unique identifier using lowercase letters and hyphens |
37
+ | `description` | Yes | When Claude should delegate to this subagent |
38
+ | `tools` | No | Tools the subagent can use. Inherits all tools if omitted |
39
+ | `disallowedTools` | No | Tools to deny, removed from inherited or specified list |
40
+ | `model` | No | Model: `sonnet`, `opus`, `haiku`, or `inherit`. Defaults to `inherit` |
41
+ | `permissionMode` | No | `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, or `plan` |
42
+ | `maxTurns` | No | Maximum agentic turns before the subagent stops |
43
+ | `skills` | No | Skills to preload into the subagent's context at startup |
44
+ | `mcpServers` | No | MCP servers available to this subagent |
45
+ | `hooks` | No | Lifecycle hooks scoped to this subagent |
46
+ | `memory` | No | Persistent memory scope: `user`, `project`, or `local` |
47
+ | `background` | No | Set `true` to always run as a background task. Default: `false` |
48
+ | `isolation` | No | Set to `worktree` for isolated git worktree execution |
49
+
50
+ ## Available Tools
51
+
52
+ Subagents can use any of Claude Code's internal tools. Common tools:
53
+
54
+ | Tool | Description |
55
+ |------|-------------|
56
+ | `Read` | Read file contents |
57
+ | `Write` | Write/create files |
58
+ | `Edit` | Edit existing files |
59
+ | `Bash` | Execute shell commands |
60
+ | `Grep` | Search text in files |
61
+ | `Glob` | Find files by pattern |
62
+ | `Agent` | Spawn other subagents (main thread only) |
63
+
64
+ Use `tools` for an allowlist or `disallowedTools` for a denylist:
65
+
66
+ ```yaml
67
+ tools: Read, Grep, Glob, Bash
68
+ disallowedTools: Write, Edit
69
+ ```
70
+
71
+ ### Restricting Subagent Spawning
72
+
73
+ Use `Agent(worker, researcher)` syntax to allowlist which subagents can be spawned:
74
+
75
+ ```yaml
76
+ tools: Agent(worker, researcher), Read, Bash
77
+ ```
78
+
79
+ ## Permission Modes
80
+
81
+ | Mode | Behavior |
82
+ |------|----------|
83
+ | `default` | Standard permission checking with prompts |
84
+ | `acceptEdits` | Auto-accept file edits |
85
+ | `dontAsk` | Auto-deny permission prompts (explicitly allowed tools still work) |
86
+ | `bypassPermissions` | Skip all permission checks (use with caution) |
87
+ | `plan` | Plan mode (read-only exploration) |
88
+
89
+ ## Preloading Skills
90
+
91
+ ```yaml
92
+ skills:
93
+ - api-conventions
94
+ - error-handling-patterns
95
+ ```
96
+
97
+ Full skill content is injected at startup. Subagents don't inherit skills from the parent.
98
+
99
+ ## Persistent Memory
100
+
101
+ ```yaml
102
+ memory: user
103
+ ```
104
+
105
+ | Scope | Storage Location | Use When |
106
+ |-------|-----------------|----------|
107
+ | `user` | `~/.claude/agent-memory/<name>/` | Knowledge should persist across all projects |
108
+ | `project` | `.claude/agent-memory/<name>/` | Knowledge is project-specific and shareable via VCS |
109
+ | `local` | `.claude/agent-memory-local/<name>/` | Project-specific but should not be checked into VCS |
110
+
111
+ When enabled, the subagent can read/write to its memory directory. Include memory instructions in the prompt:
112
+
113
+ ```
114
+ Update your agent memory as you discover codepaths, patterns, library locations,
115
+ and key architectural decisions.
116
+ ```
117
+
118
+ ## Hooks
119
+
120
+ ### In Subagent Frontmatter
121
+
122
+ ```yaml
123
+ hooks:
124
+ PreToolUse:
125
+ - matcher: "Bash"
126
+ hooks:
127
+ - type: command
128
+ command: "./scripts/validate-command.sh"
129
+ PostToolUse:
130
+ - matcher: "Edit|Write"
131
+ hooks:
132
+ - type: command
133
+ command: "./scripts/run-linter.sh"
134
+ ```
135
+
136
+ Supported events in frontmatter: `PreToolUse`, `PostToolUse`, `Stop`.
137
+
138
+ ### In Project settings.json
139
+
140
+ ```json
141
+ {
142
+ "hooks": {
143
+ "SubagentStart": [
144
+ { "matcher": "db-agent", "hooks": [{ "type": "command", "command": "./scripts/setup.sh" }] }
145
+ ],
146
+ "SubagentStop": [
147
+ { "hooks": [{ "type": "command", "command": "./scripts/cleanup.sh" }] }
148
+ ]
149
+ }
150
+ }
151
+ ```
152
+
153
+ ## Foreground vs Background
154
+
155
+ - **Foreground**: Blocks main conversation. Permission prompts pass through.
156
+ - **Background**: Runs concurrently. Permissions must be pre-approved before launch.
157
+
158
+ Set `background: true` in frontmatter to always run in background.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: {{AGENT_NAME}}
3
+ description: {{AGENT_DESCRIPTION}}
4
+ tools: {{TOOLS}}
5
+ model: {{MODEL}}
6
+ skills:
7
+ - {{SKILL_NAME_1}}
8
+ # - {{SKILL_NAME_2}} # Add more skills if needed
9
+ # --- Optional fields (uncomment as needed) ---
10
+ # disallowedTools: Write, Edit # Deny specific tools even if tools list is broad
11
+ # permissionMode: acceptEdits # default | acceptEdits | dontAsk | plan | bypassPermissions
12
+ # maxTurns: 20 # Cap agentic turns for safety/cost control
13
+ # memory: project # user | project | local
14
+ # background: false # true = always run concurrently
15
+ # isolation: worktree # worktree = isolated git worktree execution
16
+ # mcpServers: # MCP servers this subagent can access
17
+ # - {{MCP_SERVER_NAME}}
18
+ ---
19
+
20
+ You are {{ROLE_DESCRIPTION}}.
21
+
22
+ Follow the workflow defined in the {{SKILL_NAME_1}} skill.
23
+
24
+ When invoked:
25
+ 1. {{STEP_1}}
26
+ 2. {{STEP_2}}
27
+ 3. {{STEP_3}}
28
+
29
+ {{DOMAIN_GUIDANCE}}
30
+
31
+ For each {{TASK_UNIT}}, provide:
32
+ - {{OUTPUT_ITEM_1}}
33
+ - {{OUTPUT_ITEM_2}}
34
+ - {{OUTPUT_ITEM_3}}
35
+
36
+ {{ADDITIONAL_INSTRUCTIONS}}
37
+ # If using memory, add: "Update your agent memory as you discover codepaths, patterns, and key decisions."