claude-mpm 4.15.2__py3-none-any.whl → 4.20.3__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.
Files changed (203) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/BASE_ENGINEER.md +286 -0
  3. claude_mpm/agents/BASE_PM.md +255 -23
  4. claude_mpm/agents/PM_INSTRUCTIONS.md +40 -0
  5. claude_mpm/agents/agent_loader.py +4 -4
  6. claude_mpm/agents/templates/agentic-coder-optimizer.json +9 -2
  7. claude_mpm/agents/templates/api_qa.json +7 -1
  8. claude_mpm/agents/templates/clerk-ops.json +8 -1
  9. claude_mpm/agents/templates/code_analyzer.json +4 -1
  10. claude_mpm/agents/templates/dart_engineer.json +11 -1
  11. claude_mpm/agents/templates/data_engineer.json +11 -1
  12. claude_mpm/agents/templates/documentation.json +6 -1
  13. claude_mpm/agents/templates/engineer.json +18 -1
  14. claude_mpm/agents/templates/gcp_ops_agent.json +8 -1
  15. claude_mpm/agents/templates/golang_engineer.json +11 -1
  16. claude_mpm/agents/templates/java_engineer.json +12 -2
  17. claude_mpm/agents/templates/local_ops_agent.json +216 -37
  18. claude_mpm/agents/templates/nextjs_engineer.json +11 -1
  19. claude_mpm/agents/templates/ops.json +8 -1
  20. claude_mpm/agents/templates/php-engineer.json +11 -1
  21. claude_mpm/agents/templates/project_organizer.json +9 -2
  22. claude_mpm/agents/templates/prompt-engineer.json +5 -1
  23. claude_mpm/agents/templates/python_engineer.json +19 -4
  24. claude_mpm/agents/templates/qa.json +7 -1
  25. claude_mpm/agents/templates/react_engineer.json +11 -1
  26. claude_mpm/agents/templates/refactoring_engineer.json +8 -1
  27. claude_mpm/agents/templates/research.json +4 -1
  28. claude_mpm/agents/templates/ruby-engineer.json +11 -1
  29. claude_mpm/agents/templates/rust_engineer.json +23 -8
  30. claude_mpm/agents/templates/security.json +6 -1
  31. claude_mpm/agents/templates/svelte-engineer.json +225 -0
  32. claude_mpm/agents/templates/ticketing.json +6 -1
  33. claude_mpm/agents/templates/typescript_engineer.json +11 -1
  34. claude_mpm/agents/templates/vercel_ops_agent.json +8 -1
  35. claude_mpm/agents/templates/version_control.json +8 -1
  36. claude_mpm/agents/templates/web_qa.json +7 -1
  37. claude_mpm/agents/templates/web_ui.json +11 -1
  38. claude_mpm/cli/commands/__init__.py +2 -0
  39. claude_mpm/cli/commands/configure.py +164 -16
  40. claude_mpm/cli/commands/configure_agent_display.py +6 -6
  41. claude_mpm/cli/commands/configure_behavior_manager.py +8 -8
  42. claude_mpm/cli/commands/configure_navigation.py +20 -18
  43. claude_mpm/cli/commands/configure_startup_manager.py +14 -14
  44. claude_mpm/cli/commands/configure_template_editor.py +8 -8
  45. claude_mpm/cli/commands/mpm_init.py +109 -24
  46. claude_mpm/cli/commands/skills.py +434 -0
  47. claude_mpm/cli/executor.py +2 -0
  48. claude_mpm/cli/interactive/__init__.py +3 -0
  49. claude_mpm/cli/interactive/skills_wizard.py +491 -0
  50. claude_mpm/cli/parsers/base_parser.py +7 -0
  51. claude_mpm/cli/parsers/skills_parser.py +137 -0
  52. claude_mpm/cli/startup.py +83 -0
  53. claude_mpm/commands/mpm-auto-configure.md +52 -0
  54. claude_mpm/commands/mpm-help.md +3 -0
  55. claude_mpm/commands/mpm-init.md +112 -6
  56. claude_mpm/commands/mpm-version.md +113 -0
  57. claude_mpm/commands/mpm.md +1 -0
  58. claude_mpm/config/agent_config.py +2 -2
  59. claude_mpm/constants.py +12 -0
  60. claude_mpm/core/config.py +42 -0
  61. claude_mpm/core/enums.py +18 -0
  62. claude_mpm/core/factories.py +1 -1
  63. claude_mpm/core/optimized_agent_loader.py +3 -3
  64. claude_mpm/core/types.py +2 -9
  65. claude_mpm/dashboard/static/js/dashboard.js +0 -14
  66. claude_mpm/dashboard/templates/index.html +3 -41
  67. claude_mpm/hooks/__init__.py +8 -0
  68. claude_mpm/hooks/claude_hooks/response_tracking.py +35 -1
  69. claude_mpm/hooks/session_resume_hook.py +121 -0
  70. claude_mpm/models/resume_log.py +340 -0
  71. claude_mpm/services/agents/auto_config_manager.py +1 -1
  72. claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
  73. claude_mpm/services/agents/deployment/agent_record_service.py +1 -1
  74. claude_mpm/services/agents/deployment/agent_validator.py +17 -1
  75. claude_mpm/services/agents/deployment/async_agent_deployment.py +1 -1
  76. claude_mpm/services/agents/deployment/local_template_deployment.py +1 -1
  77. claude_mpm/services/agents/deployment/validation/__init__.py +3 -1
  78. claude_mpm/services/agents/deployment/validation/validation_result.py +1 -9
  79. claude_mpm/services/agents/local_template_manager.py +1 -1
  80. claude_mpm/services/agents/recommender.py +47 -0
  81. claude_mpm/services/cli/resume_service.py +617 -0
  82. claude_mpm/services/cli/session_manager.py +87 -0
  83. claude_mpm/services/cli/session_resume_helper.py +352 -0
  84. claude_mpm/services/core/models/health.py +1 -28
  85. claude_mpm/services/core/path_resolver.py +1 -1
  86. claude_mpm/services/infrastructure/monitoring/__init__.py +1 -1
  87. claude_mpm/services/infrastructure/monitoring/aggregator.py +12 -12
  88. claude_mpm/services/infrastructure/monitoring/base.py +5 -13
  89. claude_mpm/services/infrastructure/monitoring/network.py +7 -6
  90. claude_mpm/services/infrastructure/monitoring/process.py +13 -12
  91. claude_mpm/services/infrastructure/monitoring/resources.py +7 -6
  92. claude_mpm/services/infrastructure/monitoring/service.py +16 -15
  93. claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
  94. claude_mpm/services/local_ops/__init__.py +1 -1
  95. claude_mpm/services/local_ops/crash_detector.py +1 -1
  96. claude_mpm/services/local_ops/health_checks/http_check.py +2 -1
  97. claude_mpm/services/local_ops/health_checks/process_check.py +2 -1
  98. claude_mpm/services/local_ops/health_checks/resource_check.py +2 -1
  99. claude_mpm/services/local_ops/health_manager.py +1 -1
  100. claude_mpm/services/local_ops/restart_manager.py +1 -1
  101. claude_mpm/services/mcp_config_manager.py +7 -131
  102. claude_mpm/services/session_manager.py +205 -1
  103. claude_mpm/services/shared/async_service_base.py +16 -27
  104. claude_mpm/services/shared/lifecycle_service_base.py +1 -14
  105. claude_mpm/services/socketio/handlers/__init__.py +5 -2
  106. claude_mpm/services/socketio/handlers/hook.py +10 -0
  107. claude_mpm/services/socketio/handlers/registry.py +4 -2
  108. claude_mpm/services/socketio/server/main.py +7 -7
  109. claude_mpm/services/unified/deployment_strategies/local.py +1 -1
  110. claude_mpm/services/version_service.py +104 -1
  111. claude_mpm/skills/__init__.py +42 -0
  112. claude_mpm/skills/agent_skills_injector.py +331 -0
  113. claude_mpm/skills/bundled/LICENSE_ATTRIBUTIONS.md +79 -0
  114. claude_mpm/skills/bundled/__init__.py +6 -0
  115. claude_mpm/skills/bundled/api-documentation.md +393 -0
  116. claude_mpm/skills/bundled/async-testing.md +571 -0
  117. claude_mpm/skills/bundled/code-review.md +143 -0
  118. claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +75 -0
  119. claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +184 -0
  120. claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +107 -0
  121. claude_mpm/skills/bundled/collaboration/requesting-code-review/code-reviewer.md +146 -0
  122. claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +118 -0
  123. claude_mpm/skills/bundled/database-migration.md +199 -0
  124. claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +177 -0
  125. claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
  126. claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
  127. claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
  128. claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
  129. claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
  130. claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
  131. claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
  132. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
  133. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
  134. claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
  135. claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +175 -0
  136. claude_mpm/skills/bundled/debugging/verification-before-completion/references/common-failures.md +213 -0
  137. claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +314 -0
  138. claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +227 -0
  139. claude_mpm/skills/bundled/docker-containerization.md +194 -0
  140. claude_mpm/skills/bundled/express-local-dev.md +1429 -0
  141. claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
  142. claude_mpm/skills/bundled/git-workflow.md +414 -0
  143. claude_mpm/skills/bundled/imagemagick.md +204 -0
  144. claude_mpm/skills/bundled/json-data-handling.md +223 -0
  145. claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +74 -0
  146. claude_mpm/skills/bundled/main/internal-comms/SKILL.md +32 -0
  147. claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
  148. claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
  149. claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
  150. claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
  151. claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +328 -0
  152. claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
  153. claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
  154. claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
  155. claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
  156. claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +150 -0
  157. claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +372 -0
  158. claude_mpm/skills/bundled/main/skill-creator/SKILL.md +209 -0
  159. claude_mpm/skills/bundled/main/skill-creator/scripts/init_skill.py +302 -0
  160. claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +111 -0
  161. claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +65 -0
  162. claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
  163. claude_mpm/skills/bundled/pdf.md +141 -0
  164. claude_mpm/skills/bundled/performance-profiling.md +567 -0
  165. claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
  166. claude_mpm/skills/bundled/security-scanning.md +327 -0
  167. claude_mpm/skills/bundled/systematic-debugging.md +473 -0
  168. claude_mpm/skills/bundled/test-driven-development.md +378 -0
  169. claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +123 -0
  170. claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
  171. claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
  172. claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
  173. claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
  174. claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
  175. claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
  176. claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +304 -0
  177. claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +96 -0
  178. claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +35 -0
  179. claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +40 -0
  180. claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +34 -0
  181. claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +107 -0
  182. claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
  183. claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
  184. claude_mpm/skills/bundled/xlsx.md +157 -0
  185. claude_mpm/skills/registry.py +286 -0
  186. claude_mpm/skills/skill_manager.py +310 -0
  187. claude_mpm/skills/skills_registry.py +351 -0
  188. claude_mpm/skills/skills_service.py +730 -0
  189. claude_mpm/utils/agent_dependency_loader.py +2 -2
  190. {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/METADATA +211 -33
  191. {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/RECORD +195 -115
  192. claude_mpm/agents/INSTRUCTIONS_OLD_DEPRECATED.md +0 -602
  193. claude_mpm/dashboard/static/css/code-tree.css +0 -1639
  194. claude_mpm/dashboard/static/js/components/code-tree/tree-breadcrumb.js +0 -353
  195. claude_mpm/dashboard/static/js/components/code-tree/tree-constants.js +0 -235
  196. claude_mpm/dashboard/static/js/components/code-tree/tree-search.js +0 -409
  197. claude_mpm/dashboard/static/js/components/code-tree/tree-utils.js +0 -435
  198. claude_mpm/dashboard/static/js/components/code-tree.js +0 -5869
  199. claude_mpm/dashboard/static/js/components/code-viewer.js +0 -1386
  200. {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/WHEEL +0 -0
  201. {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/entry_points.txt +0 -0
  202. {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/licenses/LICENSE +0 -0
  203. {claude_mpm-4.15.2.dist-info → claude_mpm-4.20.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: skill-creator
3
+ description: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
4
+ license: Complete terms in LICENSE.txt
5
+ ---
6
+
7
+ # Skill Creator
8
+
9
+ This skill provides guidance for creating effective skills.
10
+
11
+ ## About Skills
12
+
13
+ Skills are modular, self-contained packages that extend Claude's capabilities by providing
14
+ specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
15
+ domains or tasks—they transform Claude from a general-purpose agent into a specialized agent
16
+ equipped with procedural knowledge that no model can fully possess.
17
+
18
+ ### What Skills Provide
19
+
20
+ 1. Specialized workflows - Multi-step procedures for specific domains
21
+ 2. Tool integrations - Instructions for working with specific file formats or APIs
22
+ 3. Domain expertise - Company-specific knowledge, schemas, business logic
23
+ 4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
24
+
25
+ ### Anatomy of a Skill
26
+
27
+ Every skill consists of a required SKILL.md file and optional bundled resources:
28
+
29
+ ```
30
+ skill-name/
31
+ ├── SKILL.md (required)
32
+ │ ├── YAML frontmatter metadata (required)
33
+ │ │ ├── name: (required)
34
+ │ │ └── description: (required)
35
+ │ └── Markdown instructions (required)
36
+ └── Bundled Resources (optional)
37
+ ├── scripts/ - Executable code (Python/Bash/etc.)
38
+ ├── references/ - Documentation intended to be loaded into context as needed
39
+ └── assets/ - Files used in output (templates, icons, fonts, etc.)
40
+ ```
41
+
42
+ #### SKILL.md (required)
43
+
44
+ **Metadata Quality:** The `name` and `description` in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
45
+
46
+ #### Bundled Resources (optional)
47
+
48
+ ##### Scripts (`scripts/`)
49
+
50
+ Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
51
+
52
+ - **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed
53
+ - **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks
54
+ - **Benefits**: Token efficient, deterministic, may be executed without loading into context
55
+ - **Note**: Scripts may still need to be read by Claude for patching or environment-specific adjustments
56
+
57
+ ##### References (`references/`)
58
+
59
+ Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking.
60
+
61
+ - **When to include**: For documentation that Claude should reference while working
62
+ - **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications
63
+ - **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
64
+ - **Benefits**: Keeps SKILL.md lean, loaded only when Claude determines it's needed
65
+ - **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md
66
+ - **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
67
+
68
+ ##### Assets (`assets/`)
69
+
70
+ Files not intended to be loaded into context, but rather used within the output Claude produces.
71
+
72
+ - **When to include**: When the skill needs files that will be used in the final output
73
+ - **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography
74
+ - **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
75
+ - **Benefits**: Separates output resources from documentation, enables Claude to use files without loading them into context
76
+
77
+ ### Progressive Disclosure Design Principle
78
+
79
+ Skills use a three-level loading system to manage context efficiently:
80
+
81
+ 1. **Metadata (name + description)** - Always in context (~100 words)
82
+ 2. **SKILL.md body** - When skill triggers (<5k words)
83
+ 3. **Bundled resources** - As needed by Claude (Unlimited*)
84
+
85
+ *Unlimited because scripts can be executed without reading into context window.
86
+
87
+ ## Skill Creation Process
88
+
89
+ To create a skill, follow the "Skill Creation Process" in order, skipping steps only if there is a clear reason why they are not applicable.
90
+
91
+ ### Step 1: Understanding the Skill with Concrete Examples
92
+
93
+ Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
94
+
95
+ To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
96
+
97
+ For example, when building an image-editor skill, relevant questions include:
98
+
99
+ - "What functionality should the image-editor skill support? Editing, rotating, anything else?"
100
+ - "Can you give some examples of how this skill would be used?"
101
+ - "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
102
+ - "What would a user say that should trigger this skill?"
103
+
104
+ To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
105
+
106
+ Conclude this step when there is a clear sense of the functionality the skill should support.
107
+
108
+ ### Step 2: Planning the Reusable Skill Contents
109
+
110
+ To turn concrete examples into an effective skill, analyze each example by:
111
+
112
+ 1. Considering how to execute on the example from scratch
113
+ 2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
114
+
115
+ Example: When building a `pdf-editor` skill to handle queries like "Help me rotate this PDF," the analysis shows:
116
+
117
+ 1. Rotating a PDF requires re-writing the same code each time
118
+ 2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill
119
+
120
+ Example: When designing a `frontend-webapp-builder` skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
121
+
122
+ 1. Writing a frontend webapp requires the same boilerplate HTML/React each time
123
+ 2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill
124
+
125
+ Example: When building a `big-query` skill to handle queries like "How many users have logged in today?" the analysis shows:
126
+
127
+ 1. Querying BigQuery requires re-discovering the table schemas and relationships each time
128
+ 2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill
129
+
130
+ To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
131
+
132
+ ### Step 3: Initializing the Skill
133
+
134
+ At this point, it is time to actually create the skill.
135
+
136
+ Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
137
+
138
+ When creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
139
+
140
+ Usage:
141
+
142
+ ```bash
143
+ scripts/init_skill.py <skill-name> --path <output-directory>
144
+ ```
145
+
146
+ The script:
147
+
148
+ - Creates the skill directory at the specified path
149
+ - Generates a SKILL.md template with proper frontmatter and TODO placeholders
150
+ - Creates example resource directories: `scripts/`, `references/`, and `assets/`
151
+ - Adds example files in each directory that can be customized or deleted
152
+
153
+ After initialization, customize or remove the generated SKILL.md and example files as needed.
154
+
155
+ ### Step 4: Edit the Skill
156
+
157
+ When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Focus on including information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
158
+
159
+ #### Start with Reusable Skill Contents
160
+
161
+ To begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.
162
+
163
+ Also, delete any example files and directories not needed for the skill. The initialization script creates example files in `scripts/`, `references/`, and `assets/` to demonstrate structure, but most skills won't need all of them.
164
+
165
+ #### Update SKILL.md
166
+
167
+ **Writing Style:** Write the entire skill using **imperative/infinitive form** (verb-first instructions), not second person. Use objective, instructional language (e.g., "To accomplish X, do Y" rather than "You should do X" or "If you need to do X"). This maintains consistency and clarity for AI consumption.
168
+
169
+ To complete SKILL.md, answer the following questions:
170
+
171
+ 1. What is the purpose of the skill, in a few sentences?
172
+ 2. When should the skill be used?
173
+ 3. In practice, how should Claude use the skill? All reusable skill contents developed above should be referenced so that Claude knows how to use them.
174
+
175
+ ### Step 5: Packaging a Skill
176
+
177
+ Once the skill is ready, it should be packaged into a distributable zip file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:
178
+
179
+ ```bash
180
+ scripts/package_skill.py <path/to/skill-folder>
181
+ ```
182
+
183
+ Optional output directory specification:
184
+
185
+ ```bash
186
+ scripts/package_skill.py <path/to/skill-folder> ./dist
187
+ ```
188
+
189
+ The packaging script will:
190
+
191
+ 1. **Validate** the skill automatically, checking:
192
+ - YAML frontmatter format and required fields
193
+ - Skill naming conventions and directory structure
194
+ - Description completeness and quality
195
+ - File organization and resource references
196
+
197
+ 2. **Package** the skill if validation passes, creating a zip file named after the skill (e.g., `my-skill.zip`) that includes all files and maintains the proper directory structure for distribution.
198
+
199
+ If validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.
200
+
201
+ ### Step 6: Iterate
202
+
203
+ After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
204
+
205
+ **Iteration workflow:**
206
+ 1. Use the skill on real tasks
207
+ 2. Notice struggles or inefficiencies
208
+ 3. Identify how SKILL.md or bundled resources should be updated
209
+ 4. Implement changes and test again
@@ -0,0 +1,302 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Initializer - Creates a new skill from template
4
+
5
+ Usage:
6
+ init_skill.py <skill-name> --path <path>
7
+
8
+ Examples:
9
+ init_skill.py my-new-skill --path skills/public
10
+ init_skill.py my-api-helper --path skills/private
11
+ init_skill.py custom-skill --path /custom/location
12
+ """
13
+
14
+ import sys
15
+ from pathlib import Path
16
+
17
+ SKILL_TEMPLATE = """---
18
+ name: {skill_name}
19
+ description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
20
+ ---
21
+
22
+ # {skill_title}
23
+
24
+ ## Overview
25
+
26
+ [TODO: 1-2 sentences explaining what this skill enables]
27
+
28
+ ## Structuring This Skill
29
+
30
+ [TODO: Choose the structure that best fits this skill's purpose. Common patterns:
31
+
32
+ **1. Workflow-Based** (best for sequential processes)
33
+ - Works well when there are clear step-by-step procedures
34
+ - Example: DOCX skill with "Workflow Decision Tree" → "Reading" → "Creating" → "Editing"
35
+ - Structure: ## Overview → ## Workflow Decision Tree → ## Step 1 → ## Step 2...
36
+
37
+ **2. Task-Based** (best for tool collections)
38
+ - Works well when the skill offers different operations/capabilities
39
+ - Example: PDF skill with "Quick Start" → "Merge PDFs" → "Split PDFs" → "Extract Text"
40
+ - Structure: ## Overview → ## Quick Start → ## Task Category 1 → ## Task Category 2...
41
+
42
+ **3. Reference/Guidelines** (best for standards or specifications)
43
+ - Works well for brand guidelines, coding standards, or requirements
44
+ - Example: Brand styling with "Brand Guidelines" → "Colors" → "Typography" → "Features"
45
+ - Structure: ## Overview → ## Guidelines → ## Specifications → ## Usage...
46
+
47
+ **4. Capabilities-Based** (best for integrated systems)
48
+ - Works well when the skill provides multiple interrelated features
49
+ - Example: Product Management with "Core Capabilities" → numbered capability list
50
+ - Structure: ## Overview → ## Core Capabilities → ### 1. Feature → ### 2. Feature...
51
+
52
+ Patterns can be mixed and matched as needed. Most skills combine patterns (e.g., start with task-based, add workflow for complex operations).
53
+
54
+ Delete this entire "Structuring This Skill" section when done - it's just guidance.]
55
+
56
+ ## [TODO: Replace with the first main section based on chosen structure]
57
+
58
+ [TODO: Add content here. See examples in existing skills:
59
+ - Code samples for technical skills
60
+ - Decision trees for complex workflows
61
+ - Concrete examples with realistic user requests
62
+ - References to scripts/templates/references as needed]
63
+
64
+ ## Resources
65
+
66
+ This skill includes example resource directories that demonstrate how to organize different types of bundled resources:
67
+
68
+ ### scripts/
69
+ Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
70
+
71
+ **Examples from other skills:**
72
+ - PDF skill: `fill_fillable_fields.py`, `extract_form_field_info.py` - utilities for PDF manipulation
73
+ - DOCX skill: `document.py`, `utilities.py` - Python modules for document processing
74
+
75
+ **Appropriate for:** Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
76
+
77
+ **Note:** Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
78
+
79
+ ### references/
80
+ Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.
81
+
82
+ **Examples from other skills:**
83
+ - Product management: `communication.md`, `context_building.md` - detailed workflow guides
84
+ - BigQuery: API reference documentation and query examples
85
+ - Finance: Schema documentation, company policies
86
+
87
+ **Appropriate for:** In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
88
+
89
+ ### assets/
90
+ Files not intended to be loaded into context, but rather used within the output Claude produces.
91
+
92
+ **Examples from other skills:**
93
+ - Brand styling: PowerPoint template files (.pptx), logo files
94
+ - Frontend builder: HTML/React boilerplate project directories
95
+ - Typography: Font files (.ttf, .woff2)
96
+
97
+ **Appropriate for:** Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
98
+
99
+ ---
100
+
101
+ **Any unneeded directories can be deleted.** Not every skill requires all three types of resources.
102
+ """
103
+
104
+ EXAMPLE_SCRIPT = '''#!/usr/bin/env python3
105
+ """
106
+ Example helper script for {skill_name}
107
+
108
+ This is a placeholder script that can be executed directly.
109
+ Replace with actual implementation or delete if not needed.
110
+
111
+ Example real scripts from other skills:
112
+ - pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
113
+ - pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
114
+ """
115
+
116
+ def main():
117
+ print("This is an example script for {skill_name}")
118
+ # TODO: Add actual script logic here
119
+ # This could be data processing, file conversion, API calls, etc.
120
+
121
+ if __name__ == "__main__":
122
+ main()
123
+ '''
124
+
125
+ EXAMPLE_REFERENCE = """# Reference Documentation for {skill_title}
126
+
127
+ This is a placeholder for detailed reference documentation.
128
+ Replace with actual reference content or delete if not needed.
129
+
130
+ Example real reference docs from other skills:
131
+ - product-management/references/communication.md - Comprehensive guide for status updates
132
+ - product-management/references/context_building.md - Deep-dive on gathering context
133
+ - bigquery/references/ - API references and query examples
134
+
135
+ ## When Reference Docs Are Useful
136
+
137
+ Reference docs are ideal for:
138
+ - Comprehensive API documentation
139
+ - Detailed workflow guides
140
+ - Complex multi-step processes
141
+ - Information too lengthy for main SKILL.md
142
+ - Content that's only needed for specific use cases
143
+
144
+ ## Structure Suggestions
145
+
146
+ ### API Reference Example
147
+ - Overview
148
+ - Authentication
149
+ - Endpoints with examples
150
+ - Error codes
151
+ - Rate limits
152
+
153
+ ### Workflow Guide Example
154
+ - Prerequisites
155
+ - Step-by-step instructions
156
+ - Common patterns
157
+ - Troubleshooting
158
+ - Best practices
159
+ """
160
+
161
+ EXAMPLE_ASSET = """# Example Asset File
162
+
163
+ This placeholder represents where asset files would be stored.
164
+ Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
165
+
166
+ Asset files are NOT intended to be loaded into context, but rather used within
167
+ the output Claude produces.
168
+
169
+ Example asset files from other skills:
170
+ - Brand guidelines: logo.png, slides_template.pptx
171
+ - Frontend builder: hello-world/ directory with HTML/React boilerplate
172
+ - Typography: custom-font.ttf, font-family.woff2
173
+ - Data: sample_data.csv, test_dataset.json
174
+
175
+ ## Common Asset Types
176
+
177
+ - Templates: .pptx, .docx, boilerplate directories
178
+ - Images: .png, .jpg, .svg, .gif
179
+ - Fonts: .ttf, .otf, .woff, .woff2
180
+ - Boilerplate code: Project directories, starter files
181
+ - Icons: .ico, .svg
182
+ - Data files: .csv, .json, .xml, .yaml
183
+
184
+ Note: This is a text placeholder. Actual assets can be any file type.
185
+ """
186
+
187
+
188
+ def title_case_skill_name(skill_name):
189
+ """Convert hyphenated skill name to Title Case for display."""
190
+ return ' '.join(word.capitalize() for word in skill_name.split('-'))
191
+
192
+
193
+ def init_skill(skill_name, path):
194
+ """
195
+ Initialize a new skill directory with template SKILL.md.
196
+
197
+ Args:
198
+ skill_name: Name of the skill
199
+ path: Path where the skill directory should be created
200
+
201
+ Returns:
202
+ Path to created skill directory, or None if error
203
+ """
204
+ # Determine skill directory path
205
+ skill_dir = Path(path).resolve() / skill_name
206
+
207
+ # Check if directory already exists
208
+ if skill_dir.exists():
209
+ print(f"❌ Error: Skill directory already exists: {skill_dir}")
210
+ return None
211
+
212
+ # Create skill directory
213
+ try:
214
+ skill_dir.mkdir(parents=True, exist_ok=False)
215
+ print(f"✅ Created skill directory: {skill_dir}")
216
+ except Exception as e:
217
+ print(f"❌ Error creating directory: {e}")
218
+ return None
219
+
220
+ # Create SKILL.md from template
221
+ skill_title = title_case_skill_name(skill_name)
222
+ skill_content = SKILL_TEMPLATE.format(
223
+ skill_name=skill_name,
224
+ skill_title=skill_title
225
+ )
226
+
227
+ skill_md_path = skill_dir / 'SKILL.md'
228
+ try:
229
+ skill_md_path.write_text(skill_content)
230
+ print("✅ Created SKILL.md")
231
+ except Exception as e:
232
+ print(f"❌ Error creating SKILL.md: {e}")
233
+ return None
234
+
235
+ # Create resource directories with example files
236
+ try:
237
+ # Create scripts/ directory with example script
238
+ scripts_dir = skill_dir / 'scripts'
239
+ scripts_dir.mkdir(exist_ok=True)
240
+ example_script = scripts_dir / 'example.py'
241
+ example_script.write_text(EXAMPLE_SCRIPT.format(skill_name=skill_name))
242
+ example_script.chmod(0o755)
243
+ print("✅ Created scripts/example.py")
244
+
245
+ # Create references/ directory with example reference doc
246
+ references_dir = skill_dir / 'references'
247
+ references_dir.mkdir(exist_ok=True)
248
+ example_reference = references_dir / 'api_reference.md'
249
+ example_reference.write_text(EXAMPLE_REFERENCE.format(skill_title=skill_title))
250
+ print("✅ Created references/api_reference.md")
251
+
252
+ # Create assets/ directory with example asset placeholder
253
+ assets_dir = skill_dir / 'assets'
254
+ assets_dir.mkdir(exist_ok=True)
255
+ example_asset = assets_dir / 'example_asset.txt'
256
+ example_asset.write_text(EXAMPLE_ASSET)
257
+ print("✅ Created assets/example_asset.txt")
258
+ except Exception as e:
259
+ print(f"❌ Error creating resource directories: {e}")
260
+ return None
261
+
262
+ # Print next steps
263
+ print(f"\n✅ Skill '{skill_name}' initialized successfully at {skill_dir}")
264
+ print("\nNext steps:")
265
+ print("1. Edit SKILL.md to complete the TODO items and update the description")
266
+ print("2. Customize or delete the example files in scripts/, references/, and assets/")
267
+ print("3. Run the validator when ready to check the skill structure")
268
+
269
+ return skill_dir
270
+
271
+
272
+ def main():
273
+ if len(sys.argv) < 4 or sys.argv[2] != '--path':
274
+ print("Usage: init_skill.py <skill-name> --path <path>")
275
+ print("\nSkill name requirements:")
276
+ print(" - Hyphen-case identifier (e.g., 'data-analyzer')")
277
+ print(" - Lowercase letters, digits, and hyphens only")
278
+ print(" - Max 40 characters")
279
+ print(" - Must match directory name exactly")
280
+ print("\nExamples:")
281
+ print(" init_skill.py my-new-skill --path skills/public")
282
+ print(" init_skill.py my-api-helper --path skills/private")
283
+ print(" init_skill.py custom-skill --path /custom/location")
284
+ sys.exit(1)
285
+
286
+ skill_name = sys.argv[1]
287
+ path = sys.argv[3]
288
+
289
+ print(f"🚀 Initializing skill: {skill_name}")
290
+ print(f" Location: {path}")
291
+ print()
292
+
293
+ result = init_skill(skill_name, path)
294
+
295
+ if result:
296
+ sys.exit(0)
297
+ else:
298
+ sys.exit(1)
299
+
300
+
301
+ if __name__ == "__main__":
302
+ main()
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill Packager - Creates a distributable zip file of a skill folder
4
+
5
+ Usage:
6
+ python utils/package_skill.py <path/to/skill-folder> [output-directory]
7
+
8
+ Example:
9
+ python utils/package_skill.py skills/public/my-skill
10
+ python utils/package_skill.py skills/public/my-skill ./dist
11
+ """
12
+
13
+ import sys
14
+ import zipfile
15
+ from pathlib import Path
16
+
17
+ from quick_validate import validate_skill
18
+
19
+
20
+ def package_skill(skill_path, output_dir=None):
21
+ """
22
+ Package a skill folder into a zip file.
23
+
24
+ Args:
25
+ skill_path: Path to the skill folder
26
+ output_dir: Optional output directory for the zip file (defaults to current directory)
27
+
28
+ Returns:
29
+ Path to the created zip file, or None if error
30
+ """
31
+ skill_path = Path(skill_path).resolve()
32
+
33
+ # Validate skill folder exists
34
+ if not skill_path.exists():
35
+ print(f"❌ Error: Skill folder not found: {skill_path}")
36
+ return None
37
+
38
+ if not skill_path.is_dir():
39
+ print(f"❌ Error: Path is not a directory: {skill_path}")
40
+ return None
41
+
42
+ # Validate SKILL.md exists
43
+ skill_md = skill_path / "SKILL.md"
44
+ if not skill_md.exists():
45
+ print(f"❌ Error: SKILL.md not found in {skill_path}")
46
+ return None
47
+
48
+ # Run validation before packaging
49
+ print("🔍 Validating skill...")
50
+ valid, message = validate_skill(skill_path)
51
+ if not valid:
52
+ print(f"❌ Validation failed: {message}")
53
+ print(" Please fix the validation errors before packaging.")
54
+ return None
55
+ print(f"✅ {message}\n")
56
+
57
+ # Determine output location
58
+ skill_name = skill_path.name
59
+ if output_dir:
60
+ output_path = Path(output_dir).resolve()
61
+ output_path.mkdir(parents=True, exist_ok=True)
62
+ else:
63
+ output_path = Path.cwd()
64
+
65
+ zip_filename = output_path / f"{skill_name}.zip"
66
+
67
+ # Create the zip file
68
+ try:
69
+ with zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
70
+ # Walk through the skill directory
71
+ for file_path in skill_path.rglob('*'):
72
+ if file_path.is_file():
73
+ # Calculate the relative path within the zip
74
+ arcname = file_path.relative_to(skill_path.parent)
75
+ zipf.write(file_path, arcname)
76
+ print(f" Added: {arcname}")
77
+
78
+ print(f"\n✅ Successfully packaged skill to: {zip_filename}")
79
+ return zip_filename
80
+
81
+ except Exception as e:
82
+ print(f"❌ Error creating zip file: {e}")
83
+ return None
84
+
85
+
86
+ def main():
87
+ if len(sys.argv) < 2:
88
+ print("Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory]")
89
+ print("\nExample:")
90
+ print(" python utils/package_skill.py skills/public/my-skill")
91
+ print(" python utils/package_skill.py skills/public/my-skill ./dist")
92
+ sys.exit(1)
93
+
94
+ skill_path = sys.argv[1]
95
+ output_dir = sys.argv[2] if len(sys.argv) > 2 else None
96
+
97
+ print(f"📦 Packaging skill: {skill_path}")
98
+ if output_dir:
99
+ print(f" Output directory: {output_dir}")
100
+ print()
101
+
102
+ result = package_skill(skill_path, output_dir)
103
+
104
+ if result:
105
+ sys.exit(0)
106
+ else:
107
+ sys.exit(1)
108
+
109
+
110
+ if __name__ == "__main__":
111
+ main()
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Quick validation script for skills - minimal version
4
+ """
5
+
6
+ import re
7
+ import sys
8
+ from pathlib import Path
9
+
10
+
11
+ def validate_skill(skill_path):
12
+ """Basic validation of a skill"""
13
+ skill_path = Path(skill_path)
14
+
15
+ # Check SKILL.md exists
16
+ skill_md = skill_path / 'SKILL.md'
17
+ if not skill_md.exists():
18
+ return False, "SKILL.md not found"
19
+
20
+ # Read and validate frontmatter
21
+ content = skill_md.read_text()
22
+ if not content.startswith('---'):
23
+ return False, "No YAML frontmatter found"
24
+
25
+ # Extract frontmatter
26
+ match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
27
+ if not match:
28
+ return False, "Invalid frontmatter format"
29
+
30
+ frontmatter = match.group(1)
31
+
32
+ # Check required fields
33
+ if 'name:' not in frontmatter:
34
+ return False, "Missing 'name' in frontmatter"
35
+ if 'description:' not in frontmatter:
36
+ return False, "Missing 'description' in frontmatter"
37
+
38
+ # Extract name for validation
39
+ name_match = re.search(r'name:\s*(.+)', frontmatter)
40
+ if name_match:
41
+ name = name_match.group(1).strip()
42
+ # Check naming convention (hyphen-case: lowercase with hyphens)
43
+ if not re.match(r'^[a-z0-9-]+$', name):
44
+ return False, f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)"
45
+ if name.startswith('-') or name.endswith('-') or '--' in name:
46
+ return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
47
+
48
+ # Extract and validate description
49
+ desc_match = re.search(r'description:\s*(.+)', frontmatter)
50
+ if desc_match:
51
+ description = desc_match.group(1).strip()
52
+ # Check for angle brackets
53
+ if '<' in description or '>' in description:
54
+ return False, "Description cannot contain angle brackets (< or >)"
55
+
56
+ return True, "Skill is valid!"
57
+
58
+ if __name__ == "__main__":
59
+ if len(sys.argv) != 2:
60
+ print("Usage: python quick_validate.py <skill_directory>")
61
+ sys.exit(1)
62
+
63
+ valid, message = validate_skill(sys.argv[1])
64
+ print(message)
65
+ sys.exit(0 if valid else 1)