claude-code-workflow 6.3.48 → 6.3.49

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 (211) hide show
  1. package/.claude/CLAUDE.md +6 -8
  2. package/.claude/agents/action-planning-agent.md +28 -45
  3. package/.claude/agents/cli-lite-planning-agent.md +93 -1
  4. package/.claude/agents/code-developer.md +144 -27
  5. package/.claude/commands/ccw-coordinator.md +175 -21
  6. package/.claude/commands/ccw-debug.md +832 -0
  7. package/.claude/commands/ccw.md +90 -9
  8. package/.claude/commands/cli/cli-init.md +1 -0
  9. package/.claude/commands/issue/convert-to-plan.md +718 -0
  10. package/.claude/commands/issue/from-brainstorm.md +382 -0
  11. package/.claude/commands/memory/tips.md +332 -0
  12. package/.claude/commands/workflow/analyze-with-file.md +804 -0
  13. package/.claude/commands/workflow/brainstorm/auto-parallel.md +18 -43
  14. package/.claude/commands/workflow/brainstorm/role-analysis.md +705 -0
  15. package/.claude/commands/workflow/brainstorm-with-file.md +1153 -0
  16. package/.claude/commands/workflow/debug-with-file.md +7 -5
  17. package/.claude/commands/workflow/execute.md +6 -4
  18. package/.claude/commands/workflow/lite-plan.md +2 -2
  19. package/.claude/commands/workflow/plan-verify.md +162 -327
  20. package/.claude/commands/workflow/plan.md +162 -26
  21. package/.claude/commands/workflow/replan.md +78 -2
  22. package/.claude/commands/workflow/{review-fix.md → review-cycle-fix.md} +6 -6
  23. package/.claude/commands/workflow/review-module-cycle.md +2 -2
  24. package/.claude/commands/workflow/review-session-cycle.md +2 -2
  25. package/.claude/commands/workflow/tools/conflict-resolution.md +16 -26
  26. package/.claude/commands/workflow/tools/context-gather.md +81 -118
  27. package/.claude/commands/workflow/tools/task-generate-agent.md +94 -10
  28. package/.claude/skills/ccw-help/command.json +4 -4
  29. package/.claude/skills/lite-skill-generator/SKILL.md +650 -0
  30. package/.claude/skills/lite-skill-generator/templates/simple-skill.md +68 -0
  31. package/.claude/skills/lite-skill-generator/templates/style-guide.md +64 -0
  32. package/.claude/skills/skill-generator/SKILL.md +277 -85
  33. package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +4 -15
  34. package/.claude/skills/skill-generator/phases/02-structure-generation.md +72 -17
  35. package/.claude/skills/skill-generator/phases/03-phase-generation.md +218 -51
  36. package/.claude/skills/skill-generator/phases/04-specs-templates.md +111 -41
  37. package/.claude/skills/skill-generator/phases/05-validation.md +139 -56
  38. package/.claude/skills/skill-generator/templates/autonomous-action.md +78 -268
  39. package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +14 -0
  40. package/.claude/skills/skill-generator/templates/code-analysis-action.md +12 -0
  41. package/.claude/skills/skill-generator/templates/llm-action.md +12 -0
  42. package/.claude/skills/skill-generator/templates/script-template.md +368 -0
  43. package/.claude/skills/skill-generator/templates/sequential-phase.md +14 -0
  44. package/.claude/skills/skill-generator/templates/skill-md.md +14 -0
  45. package/.claude/skills/skill-tuning/SKILL.md +130 -266
  46. package/.claude/skills/skill-tuning/phases/orchestrator.md +95 -283
  47. package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +90 -198
  48. package/.claude/skills/skill-tuning/specs/tuning-strategies.md +193 -1345
  49. package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +47 -0
  50. package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +158 -0
  51. package/.claude/workflows/cli-tools-usage.md +1 -1
  52. package/.codex/AGENTS.md +1 -3
  53. package/.codex/prompts/analyze-with-file.md +607 -0
  54. package/.codex/prompts/brainstorm-to-cycle.md +455 -0
  55. package/.codex/prompts/brainstorm-with-file.md +933 -0
  56. package/.codex/prompts/debug-with-file.md +15 -20
  57. package/.codex/skills/ccw-cli-tools/SKILL.md +559 -0
  58. package/ccw/dist/commands/cli.d.ts.map +1 -1
  59. package/ccw/dist/commands/cli.js +29 -5
  60. package/ccw/dist/commands/cli.js.map +1 -1
  61. package/ccw/dist/commands/issue.d.ts +2 -0
  62. package/ccw/dist/commands/issue.d.ts.map +1 -1
  63. package/ccw/dist/commands/issue.js +62 -20
  64. package/ccw/dist/commands/issue.js.map +1 -1
  65. package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
  66. package/ccw/dist/config/litellm-api-config-manager.js +5 -3
  67. package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
  68. package/ccw/dist/config/litellm-provider-models.d.ts +73 -0
  69. package/ccw/dist/config/litellm-provider-models.d.ts.map +1 -0
  70. package/ccw/dist/config/litellm-provider-models.js +172 -0
  71. package/ccw/dist/config/litellm-provider-models.js.map +1 -0
  72. package/ccw/dist/config/provider-models.d.ts +25 -51
  73. package/ccw/dist/config/provider-models.d.ts.map +1 -1
  74. package/ccw/dist/config/provider-models.js +84 -149
  75. package/ccw/dist/config/provider-models.js.map +1 -1
  76. package/ccw/dist/config/storage-paths.d.ts.map +1 -1
  77. package/ccw/dist/config/storage-paths.js +23 -5
  78. package/ccw/dist/config/storage-paths.js.map +1 -1
  79. package/ccw/dist/core/auth/csrf-middleware.js +3 -3
  80. package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
  81. package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
  82. package/ccw/dist/core/dashboard-generator.js +3 -1
  83. package/ccw/dist/core/dashboard-generator.js.map +1 -1
  84. package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -1
  85. package/ccw/dist/core/routes/claude-routes.js +206 -14
  86. package/ccw/dist/core/routes/claude-routes.js.map +1 -1
  87. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
  88. package/ccw/dist/core/routes/cli-routes.js.map +1 -1
  89. package/ccw/dist/core/routes/commands-routes.d.ts +7 -0
  90. package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -0
  91. package/ccw/dist/core/routes/commands-routes.js +480 -0
  92. package/ccw/dist/core/routes/commands-routes.js.map +1 -0
  93. package/ccw/dist/core/routes/model-routes.d.ts +11 -0
  94. package/ccw/dist/core/routes/model-routes.d.ts.map +1 -0
  95. package/ccw/dist/core/routes/model-routes.js +112 -0
  96. package/ccw/dist/core/routes/model-routes.js.map +1 -0
  97. package/ccw/dist/core/routes/nav-status-routes.d.ts.map +1 -1
  98. package/ccw/dist/core/routes/nav-status-routes.js +84 -1
  99. package/ccw/dist/core/routes/nav-status-routes.js.map +1 -1
  100. package/ccw/dist/core/routes/provider-routes.d.ts +11 -0
  101. package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -0
  102. package/ccw/dist/core/routes/provider-routes.js +67 -0
  103. package/ccw/dist/core/routes/provider-routes.js.map +1 -0
  104. package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
  105. package/ccw/dist/core/routes/skills-routes.js +219 -7
  106. package/ccw/dist/core/routes/skills-routes.js.map +1 -1
  107. package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
  108. package/ccw/dist/core/routes/system-routes.js +58 -6
  109. package/ccw/dist/core/routes/system-routes.js.map +1 -1
  110. package/ccw/dist/core/server.d.ts.map +1 -1
  111. package/ccw/dist/core/server.js +13 -0
  112. package/ccw/dist/core/server.js.map +1 -1
  113. package/ccw/dist/mcp-server/index.js +2 -2
  114. package/ccw/dist/mcp-server/index.js.map +1 -1
  115. package/ccw/dist/tools/claude-cli-tools.d.ts +48 -11
  116. package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
  117. package/ccw/dist/tools/claude-cli-tools.js +146 -50
  118. package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
  119. package/ccw/dist/tools/cli-config-manager.d.ts +1 -13
  120. package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
  121. package/ccw/dist/tools/cli-config-manager.js +3 -27
  122. package/ccw/dist/tools/cli-config-manager.js.map +1 -1
  123. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  124. package/ccw/dist/tools/cli-executor-core.js +7 -2
  125. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  126. package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
  127. package/ccw/dist/tools/cli-history-store.d.ts +11 -0
  128. package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
  129. package/ccw/dist/tools/cli-history-store.js +82 -2
  130. package/ccw/dist/tools/cli-history-store.js.map +1 -1
  131. package/ccw/dist/tools/command-registry.d.ts +7 -0
  132. package/ccw/dist/tools/command-registry.d.ts.map +1 -1
  133. package/ccw/dist/tools/command-registry.js +14 -1
  134. package/ccw/dist/tools/command-registry.js.map +1 -1
  135. package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
  136. package/ccw/dist/tools/generate-module-docs.js +11 -7
  137. package/ccw/dist/tools/generate-module-docs.js.map +1 -1
  138. package/ccw/dist/tools/litellm-executor.d.ts +1 -0
  139. package/ccw/dist/tools/litellm-executor.d.ts.map +1 -1
  140. package/ccw/dist/tools/litellm-executor.js +11 -9
  141. package/ccw/dist/tools/litellm-executor.js.map +1 -1
  142. package/ccw/dist/types/skill-types.d.ts +97 -0
  143. package/ccw/dist/types/skill-types.d.ts.map +1 -0
  144. package/ccw/dist/types/skill-types.js +6 -0
  145. package/ccw/dist/types/skill-types.js.map +1 -0
  146. package/ccw/src/commands/cli.ts +36 -5
  147. package/ccw/src/commands/issue.ts +81 -26
  148. package/ccw/src/config/litellm-api-config-manager.ts +5 -3
  149. package/ccw/src/config/litellm-provider-models.ts +222 -0
  150. package/ccw/src/config/provider-models.ts +91 -190
  151. package/ccw/src/config/storage-paths.ts +20 -5
  152. package/ccw/src/core/auth/csrf-middleware.ts +3 -3
  153. package/ccw/src/core/dashboard-generator.ts +3 -1
  154. package/ccw/src/core/routes/claude-routes.ts +233 -15
  155. package/ccw/src/core/routes/cli-routes.ts +2 -3
  156. package/ccw/src/core/routes/commands-routes.ts +620 -0
  157. package/ccw/src/core/routes/nav-status-routes.ts +95 -1
  158. package/ccw/src/core/routes/provider-routes.ts +78 -0
  159. package/ccw/src/core/routes/skills-routes.ts +266 -45
  160. package/ccw/src/core/routes/system-routes.ts +102 -50
  161. package/ccw/src/core/server.ts +13 -0
  162. package/ccw/src/mcp-server/index.ts +2 -2
  163. package/ccw/src/templates/dashboard-css/18-cli-settings.css +35 -0
  164. package/ccw/src/templates/dashboard-css/37-commands.css +193 -0
  165. package/ccw/src/templates/dashboard-js/components/navigation.js +4 -0
  166. package/ccw/src/templates/dashboard-js/i18n.js +116 -0
  167. package/ccw/src/templates/dashboard-js/views/cli-manager.js +249 -4
  168. package/ccw/src/templates/dashboard-js/views/commands-manager.js +503 -0
  169. package/ccw/src/templates/dashboard-js/views/issue-manager.js +7 -7
  170. package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2 -7
  171. package/ccw/src/templates/dashboard-js/views/skills-manager.js +164 -23
  172. package/ccw/src/templates/dashboard.html +7 -0
  173. package/ccw/src/tools/claude-cli-tools.ts +170 -56
  174. package/ccw/src/tools/cli-config-manager.ts +2 -33
  175. package/ccw/src/tools/cli-executor-core.ts +8 -2
  176. package/ccw/src/tools/cli-history-store.ts +92 -2
  177. package/ccw/src/tools/command-registry.ts +16 -1
  178. package/ccw/src/tools/generate-module-docs.ts +11 -7
  179. package/ccw/src/tools/litellm-executor.ts +13 -9
  180. package/ccw/src/types/skill-types.ts +99 -0
  181. package/package.json +1 -1
  182. package/.claude/commands/enhance-prompt.md +0 -93
  183. package/.claude/commands/memory/code-map-memory.md +0 -687
  184. package/.claude/commands/memory/docs.md +0 -615
  185. package/.claude/commands/memory/load-skill-memory.md +0 -182
  186. package/.claude/commands/memory/skill-memory.md +0 -525
  187. package/.claude/commands/memory/swagger-docs.md +0 -773
  188. package/.claude/commands/memory/tech-research-rules.md +0 -310
  189. package/.claude/commands/memory/workflow-skill-memory.md +0 -517
  190. package/.claude/commands/task/breakdown.md +0 -208
  191. package/.claude/commands/task/create.md +0 -152
  192. package/.claude/commands/task/execute.md +0 -270
  193. package/.claude/commands/task/replan.md +0 -441
  194. package/.claude/commands/version.md +0 -254
  195. package/.claude/commands/workflow/action-plan-verify.md +0 -485
  196. package/.claude/commands/workflow/brainstorm/api-designer.md +0 -587
  197. package/.claude/commands/workflow/brainstorm/data-architect.md +0 -220
  198. package/.claude/commands/workflow/brainstorm/product-manager.md +0 -200
  199. package/.claude/commands/workflow/brainstorm/product-owner.md +0 -200
  200. package/.claude/commands/workflow/brainstorm/scrum-master.md +0 -200
  201. package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +0 -200
  202. package/.claude/commands/workflow/brainstorm/system-architect.md +0 -389
  203. package/.claude/commands/workflow/brainstorm/ui-designer.md +0 -221
  204. package/.claude/commands/workflow/brainstorm/ux-expert.md +0 -221
  205. package/.claude/commands/workflow/debug.md +0 -331
  206. package/.claude/commands/workflow/develop-with-file.md +0 -1044
  207. package/.claude/skills/ccw-loop/README.md +0 -303
  208. package/.claude/skills/skill-generator/templates/script-bash.md +0 -277
  209. package/.claude/skills/skill-generator/templates/script-python.md +0 -198
  210. package/.codex/prompts/debug.md +0 -318
  211. package/ccw/src/core/routes/mcp-routes.ts.backup +0 -549
@@ -0,0 +1,650 @@
1
+ ---
2
+ name: lite-skill-generator
3
+ description: Lightweight skill generator with style learning - creates simple skills using flow-based execution and style imitation. Use for quick skill scaffolding, simple workflow creation, or style-aware skill generation.
4
+ allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
5
+ ---
6
+
7
+ # Lite Skill Generator
8
+
9
+ Lightweight meta-skill for rapid skill creation with intelligent style learning and flow-based execution.
10
+
11
+ ## Core Concept
12
+
13
+ **Simplicity First**: Generate simple, focused skills quickly with minimal overhead. Learn from existing skills to maintain consistent style and structure.
14
+
15
+ **Progressive Disclosure**: Follow anthropics' three-layer loading principle:
16
+ 1. **Metadata** - name, description, triggers (always loaded)
17
+ 2. **SKILL.md** - core instructions (loaded when triggered)
18
+ 3. **Bundled resources** - scripts, references, assets (loaded on demand)
19
+
20
+ ## Execution Model
21
+
22
+ **3-Phase Flow**: Style Learning → Requirements Gathering → Generation
23
+
24
+ ```
25
+ User Input → Phase 1: Style Analysis → Phase 2: Requirements → Phase 3: Generate → Skill Package
26
+ ↓ ↓ ↓
27
+ Learn from examples Interactive prompts Write files + validate
28
+ ```
29
+
30
+ ## Architecture Overview
31
+
32
+ ```
33
+ ┌─────────────────────────────────────────────────────────────────┐
34
+ │ Lite Skill Generator │
35
+ │ │
36
+ │ Input: Skill name, purpose, reference skills │
37
+ │ ↓ │
38
+ │ ┌─────────────────────────────────────────────────────────┐ │
39
+ │ │ Phase 1-3: Lightweight Pipeline │ │
40
+ │ │ ┌────┐ ┌────┐ ┌────┐ │ │
41
+ │ │ │ P1 │→│ P2 │→│ P3 │ │ │
42
+ │ │ │Styl│ │Req │ │Gen │ │ │
43
+ │ │ └────┘ └────┘ └────┘ │ │
44
+ │ └─────────────────────────────────────────────────────────┘ │
45
+ │ ↓ │
46
+ │ Output: .claude/skills/{skill-name}/ (minimal package) │
47
+ │ │
48
+ └─────────────────────────────────────────────────────────────────┘
49
+ ```
50
+
51
+ ## 3-Phase Workflow
52
+
53
+ ### Phase 1: Style Analysis & Learning
54
+
55
+ Analyze reference skills to extract language patterns, structural conventions, and writing style.
56
+
57
+ ```javascript
58
+ // Phase 1 Execution Flow
59
+ async function analyzeStyle(referencePaths) {
60
+ // Step 1: Load reference skills
61
+ const references = [];
62
+ for (const path of referencePaths) {
63
+ const content = Read(path);
64
+ references.push({
65
+ path: path,
66
+ content: content,
67
+ metadata: extractYAMLFrontmatter(content)
68
+ });
69
+ }
70
+
71
+ // Step 2: Extract style patterns
72
+ const styleProfile = {
73
+ // Structural patterns
74
+ structure: {
75
+ hasFrontmatter: references.every(r => r.metadata !== null),
76
+ sectionHeaders: extractCommonSections(references),
77
+ codeBlockUsage: detectCodeBlockPatterns(references),
78
+ flowDiagramUsage: detectFlowDiagrams(references)
79
+ },
80
+
81
+ // Language patterns
82
+ language: {
83
+ instructionStyle: detectInstructionStyle(references), // 'imperative' | 'declarative' | 'procedural'
84
+ pseudocodeUsage: detectPseudocodePatterns(references),
85
+ verbosity: calculateVerbosityLevel(references), // 'concise' | 'detailed' | 'verbose'
86
+ terminology: extractCommonTerms(references)
87
+ },
88
+
89
+ // Organization patterns
90
+ organization: {
91
+ phaseStructure: detectPhasePattern(references), // 'sequential' | 'autonomous' | 'flat'
92
+ exampleDensity: calculateExampleRatio(references),
93
+ templateUsage: detectTemplateReferences(references)
94
+ }
95
+ };
96
+
97
+ // Step 3: Generate style guide
98
+ return {
99
+ profile: styleProfile,
100
+ recommendations: generateStyleRecommendations(styleProfile),
101
+ examples: extractStyleExamples(references, styleProfile)
102
+ };
103
+ }
104
+
105
+ // Structural pattern detection
106
+ function extractCommonSections(references) {
107
+ const allSections = references.map(r =>
108
+ r.content.match(/^##? (.+)$/gm)?.map(s => s.replace(/^##? /, ''))
109
+ ).flat();
110
+ return findMostCommon(allSections);
111
+ }
112
+
113
+ // Language style detection
114
+ function detectInstructionStyle(references) {
115
+ const imperativePattern = /^(Use|Execute|Run|Call|Create|Generate)\s/gim;
116
+ const declarativePattern = /^(The|This|Each|All)\s.*\s(is|are|will be)\s/gim;
117
+ const proceduralPattern = /^(Step \d+|Phase \d+|First|Then|Finally)\s/gim;
118
+
119
+ const scores = references.map(r => ({
120
+ imperative: (r.content.match(imperativePattern) || []).length,
121
+ declarative: (r.content.match(declarativePattern) || []).length,
122
+ procedural: (r.content.match(proceduralPattern) || []).length
123
+ }));
124
+
125
+ return getMaxStyle(scores);
126
+ }
127
+
128
+ // Pseudocode pattern detection
129
+ function detectPseudocodePatterns(references) {
130
+ const hasJavaScriptBlocks = references.some(r => r.content.includes('```javascript'));
131
+ const hasFunctionDefs = references.some(r => /function\s+\w+\(/m.test(r.content));
132
+ const hasFlowComments = references.some(r => /\/\/.*→/m.test(r.content));
133
+
134
+ return {
135
+ usePseudocode: hasJavaScriptBlocks && hasFunctionDefs,
136
+ flowAnnotations: hasFlowComments,
137
+ style: hasFunctionDefs ? 'functional' : 'imperative'
138
+ };
139
+ }
140
+ ```
141
+
142
+ **Output**:
143
+ ```
144
+ Style Analysis Complete:
145
+ Structure: Flow-based with pseudocode
146
+ Language: Procedural, detailed
147
+ Organization: Sequential phases
148
+ Key Patterns: 3-5 phases, function definitions, ASCII diagrams
149
+
150
+ Recommendations:
151
+ ✓ Use phase-based structure (3-4 phases)
152
+ ✓ Include pseudocode for complex logic
153
+ ✓ Add ASCII flow diagrams
154
+ ✓ Maintain concise documentation style
155
+ ```
156
+
157
+ ---
158
+
159
+ ### Phase 2: Requirements Gathering
160
+
161
+ Interactive discovery of skill requirements using learned style patterns.
162
+
163
+ ```javascript
164
+ async function gatherRequirements(styleProfile) {
165
+ // Step 1: Basic information
166
+ const basicInfo = await AskUserQuestion({
167
+ questions: [
168
+ {
169
+ question: "What is the skill name? (kebab-case, e.g., 'pdf-generator')",
170
+ header: "Name",
171
+ options: [
172
+ { label: "pdf-generator", description: "Example: PDF generation skill" },
173
+ { label: "code-analyzer", description: "Example: Code analysis skill" },
174
+ { label: "Custom", description: "Enter custom name" }
175
+ ]
176
+ },
177
+ {
178
+ question: "What is the primary purpose?",
179
+ header: "Purpose",
180
+ options: [
181
+ { label: "Generation", description: "Create/generate artifacts" },
182
+ { label: "Analysis", description: "Analyze/inspect code or data" },
183
+ { label: "Transformation", description: "Convert/transform content" },
184
+ { label: "Orchestration", description: "Coordinate multiple operations" }
185
+ ]
186
+ }
187
+ ]
188
+ });
189
+
190
+ // Step 2: Execution complexity
191
+ const complexity = await AskUserQuestion({
192
+ questions: [{
193
+ question: "How many main steps does this skill need?",
194
+ header: "Steps",
195
+ options: [
196
+ { label: "2-3 steps", description: "Simple workflow (recommended for lite-skill)" },
197
+ { label: "4-5 steps", description: "Moderate workflow" },
198
+ { label: "6+ steps", description: "Complex workflow (consider full skill-generator)" }
199
+ ]
200
+ }]
201
+ });
202
+
203
+ // Step 3: Tool requirements
204
+ const tools = await AskUserQuestion({
205
+ questions: [{
206
+ question: "Which tools will this skill use? (select multiple)",
207
+ header: "Tools",
208
+ multiSelect: true,
209
+ options: [
210
+ { label: "Read", description: "Read files" },
211
+ { label: "Write", description: "Write files" },
212
+ { label: "Bash", description: "Execute commands" },
213
+ { label: "Task", description: "Launch agents" },
214
+ { label: "AskUserQuestion", description: "Interactive prompts" }
215
+ ]
216
+ }]
217
+ });
218
+
219
+ // Step 4: Output format
220
+ const output = await AskUserQuestion({
221
+ questions: [{
222
+ question: "What does this skill produce?",
223
+ header: "Output",
224
+ options: [
225
+ { label: "Single file", description: "One main output file" },
226
+ { label: "Multiple files", description: "Several related files" },
227
+ { label: "Directory structure", description: "Complete directory tree" },
228
+ { label: "Modified files", description: "Edits to existing files" }
229
+ ]
230
+ }]
231
+ });
232
+
233
+ // Step 5: Build configuration
234
+ return {
235
+ name: basicInfo.Name,
236
+ purpose: basicInfo.Purpose,
237
+ description: generateDescription(basicInfo.Name, basicInfo.Purpose),
238
+ steps: parseStepCount(complexity.Steps),
239
+ allowedTools: tools.Tools,
240
+ outputType: output.Output,
241
+ styleProfile: styleProfile,
242
+ triggerPhrases: generateTriggerPhrases(basicInfo.Name, basicInfo.Purpose)
243
+ };
244
+ }
245
+
246
+ // Generate skill description from name and purpose
247
+ function generateDescription(name, purpose) {
248
+ const templates = {
249
+ Generation: `Generate ${humanize(name)} with intelligent scaffolding`,
250
+ Analysis: `Analyze ${humanize(name)} with detailed reporting`,
251
+ Transformation: `Transform ${humanize(name)} with format conversion`,
252
+ Orchestration: `Orchestrate ${humanize(name)} workflow with multi-step coordination`
253
+ };
254
+ return templates[purpose] || `${humanize(name)} skill for ${purpose.toLowerCase()} tasks`;
255
+ }
256
+
257
+ // Generate trigger phrases
258
+ function generateTriggerPhrases(name, purpose) {
259
+ const base = [name, name.replace(/-/g, ' ')];
260
+ const purposeVariants = {
261
+ Generation: ['generate', 'create', 'build'],
262
+ Analysis: ['analyze', 'inspect', 'review'],
263
+ Transformation: ['transform', 'convert', 'format'],
264
+ Orchestration: ['orchestrate', 'coordinate', 'manage']
265
+ };
266
+ return [...base, ...purposeVariants[purpose].map(v => `${v} ${humanize(name)}`)];
267
+ }
268
+ ```
269
+
270
+ **Display to User**:
271
+ ```
272
+ Requirements Gathered:
273
+ Name: pdf-generator
274
+ Purpose: Generation
275
+ Steps: 3 (Setup → Generate → Validate)
276
+ Tools: Read, Write, Bash
277
+ Output: Single file (PDF document)
278
+ Triggers: "pdf-generator", "generate pdf", "create pdf"
279
+
280
+ Style Application:
281
+ Using flow-based structure (from style analysis)
282
+ Including pseudocode blocks
283
+ Adding ASCII diagrams for clarity
284
+ ```
285
+
286
+ ---
287
+
288
+ ### Phase 3: Generate Skill Package
289
+
290
+ Create minimal skill structure with style-aware content generation.
291
+
292
+ ```javascript
293
+ async function generateSkillPackage(requirements) {
294
+ const skillDir = `.claude/skills/${requirements.name}`;
295
+ const workDir = `.workflow/.scratchpad/lite-skill-gen-${Date.now()}`;
296
+
297
+ // Step 1: Create directory structure
298
+ Bash(`mkdir -p "${skillDir}" "${workDir}"`);
299
+
300
+ // Step 2: Generate SKILL.md (using learned style)
301
+ const skillContent = generateSkillMd(requirements);
302
+ Write(`${skillDir}/SKILL.md`, skillContent);
303
+
304
+ // Step 3: Conditionally add bundled resources
305
+ if (requirements.outputType === 'Directory structure') {
306
+ Bash(`mkdir -p "${skillDir}/templates"`);
307
+ const templateContent = generateTemplate(requirements);
308
+ Write(`${skillDir}/templates/base-template.md`, templateContent);
309
+ }
310
+
311
+ if (requirements.allowedTools.includes('Bash')) {
312
+ Bash(`mkdir -p "${skillDir}/scripts"`);
313
+ const scriptContent = generateScript(requirements);
314
+ Write(`${skillDir}/scripts/helper.sh`, scriptContent);
315
+ }
316
+
317
+ // Step 4: Generate README
318
+ const readmeContent = generateReadme(requirements);
319
+ Write(`${skillDir}/README.md`, readmeContent);
320
+
321
+ // Step 5: Validate structure
322
+ const validation = validateSkillStructure(skillDir, requirements);
323
+ Write(`${workDir}/validation-report.json`, JSON.stringify(validation, null, 2));
324
+
325
+ // Step 6: Return summary
326
+ return {
327
+ skillPath: skillDir,
328
+ filesCreated: [
329
+ `${skillDir}/SKILL.md`,
330
+ ...(validation.hasTemplates ? [`${skillDir}/templates/`] : []),
331
+ ...(validation.hasScripts ? [`${skillDir}/scripts/`] : []),
332
+ `${skillDir}/README.md`
333
+ ],
334
+ validation: validation,
335
+ nextSteps: generateNextSteps(requirements)
336
+ };
337
+ }
338
+
339
+ // Generate SKILL.md with style awareness
340
+ function generateSkillMd(req) {
341
+ const { styleProfile } = req;
342
+
343
+ // YAML frontmatter
344
+ const frontmatter = `---
345
+ name: ${req.name}
346
+ description: ${req.description}
347
+ allowed-tools: ${req.allowedTools.join(', ')}
348
+ ---
349
+ `;
350
+
351
+ // Main content structure (adapts to style)
352
+ let content = frontmatter;
353
+
354
+ content += `\n# ${humanize(req.name)}\n\n`;
355
+ content += `${req.description}\n\n`;
356
+
357
+ // Add architecture diagram if style uses them
358
+ if (styleProfile.structure.flowDiagramUsage) {
359
+ content += generateArchitectureDiagram(req);
360
+ }
361
+
362
+ // Add execution flow
363
+ content += `## Execution Flow\n\n`;
364
+ if (styleProfile.language.pseudocodeUsage.usePseudocode) {
365
+ content += generatePseudocodeFlow(req);
366
+ } else {
367
+ content += generateProceduralFlow(req);
368
+ }
369
+
370
+ // Add phase sections
371
+ for (let i = 0; i < req.steps; i++) {
372
+ content += generatePhaseSection(i + 1, req, styleProfile);
373
+ }
374
+
375
+ // Add examples if style is verbose
376
+ if (styleProfile.language.verbosity !== 'concise') {
377
+ content += generateExamplesSection(req);
378
+ }
379
+
380
+ return content;
381
+ }
382
+
383
+ // Generate architecture diagram
384
+ function generateArchitectureDiagram(req) {
385
+ return `## Architecture
386
+ \`\`\`
387
+ ┌─────────────────────────────────────────────────┐
388
+ │ ${humanize(req.name)} │
389
+ │ │
390
+ │ Input → Phase 1 → Phase 2 → Phase 3 → Output │
391
+ │ ${getPhaseName(1, req)} │
392
+ │ ${getPhaseName(2, req)} │
393
+ │ ${getPhaseName(3, req)} │
394
+ └─────────────────────────────────────────────────┘
395
+ \`\`\`
396
+
397
+ `;
398
+ }
399
+
400
+ // Generate pseudocode flow
401
+ function generatePseudocodeFlow(req) {
402
+ return `\`\`\`javascript
403
+ async function ${toCamelCase(req.name)}(input) {
404
+ // Phase 1: ${getPhaseName(1, req)}
405
+ const prepared = await phase1Prepare(input);
406
+
407
+ // Phase 2: ${getPhaseName(2, req)}
408
+ const processed = await phase2Process(prepared);
409
+
410
+ // Phase 3: ${getPhaseName(3, req)}
411
+ const result = await phase3Finalize(processed);
412
+
413
+ return result;
414
+ }
415
+ \`\`\`
416
+
417
+ `;
418
+ }
419
+
420
+ // Generate phase section
421
+ function generatePhaseSection(phaseNum, req, styleProfile) {
422
+ const phaseName = getPhaseName(phaseNum, req);
423
+
424
+ let section = `### Phase ${phaseNum}: ${phaseName}\n\n`;
425
+
426
+ if (styleProfile.language.pseudocodeUsage.usePseudocode) {
427
+ section += `\`\`\`javascript\n`;
428
+ section += `async function phase${phaseNum}${toCamelCase(phaseName)}(input) {\n`;
429
+ section += ` // TODO: Implement ${phaseName.toLowerCase()} logic\n`;
430
+ section += ` return output;\n`;
431
+ section += `}\n\`\`\`\n\n`;
432
+ } else {
433
+ section += `**Steps**:\n`;
434
+ section += `1. Load input data\n`;
435
+ section += `2. Process according to ${phaseName.toLowerCase()} logic\n`;
436
+ section += `3. Return result to next phase\n\n`;
437
+ }
438
+
439
+ return section;
440
+ }
441
+
442
+ // Validation
443
+ function validateSkillStructure(skillDir, req) {
444
+ const requiredFiles = [`${skillDir}/SKILL.md`, `${skillDir}/README.md`];
445
+ const exists = requiredFiles.map(f => Bash(`test -f "${f}"`).exitCode === 0);
446
+
447
+ return {
448
+ valid: exists.every(e => e),
449
+ hasTemplates: Bash(`test -d "${skillDir}/templates"`).exitCode === 0,
450
+ hasScripts: Bash(`test -d "${skillDir}/scripts"`).exitCode === 0,
451
+ filesPresent: requiredFiles.filter((f, i) => exists[i]),
452
+ styleCompliance: checkStyleCompliance(skillDir, req.styleProfile)
453
+ };
454
+ }
455
+ ```
456
+
457
+ **Output**:
458
+ ```
459
+ Skill Package Generated:
460
+ Location: .claude/skills/pdf-generator/
461
+
462
+ Structure:
463
+ ✓ SKILL.md (entry point)
464
+ ✓ README.md (usage guide)
465
+ ✓ templates/ (directory templates)
466
+ ✓ scripts/ (helper scripts)
467
+
468
+ Validation:
469
+ ✓ All required files present
470
+ ✓ Style compliance: 95%
471
+ ✓ Frontmatter valid
472
+ ✓ Tool references correct
473
+
474
+ Next Steps:
475
+ 1. Review SKILL.md and customize phases
476
+ 2. Test skill: /skill:pdf-generator "test input"
477
+ 3. Iterate based on usage
478
+ ```
479
+
480
+ ---
481
+
482
+ ## Complete Execution Flow
483
+
484
+ ```
485
+ User: "Create a PDF generator skill"
486
+
487
+ Phase 1: Style Analysis
488
+ |-- Read reference skills (ccw.md, ccw-coordinator.md)
489
+ |-- Extract style patterns (flow diagrams, pseudocode, structure)
490
+ |-- Generate style profile
491
+ +-- Output: Style recommendations
492
+
493
+ Phase 2: Requirements
494
+ |-- Ask: Name, purpose, steps
495
+ |-- Ask: Tools, output format
496
+ |-- Generate: Description, triggers
497
+ +-- Output: Requirements config
498
+
499
+ Phase 3: Generation
500
+ |-- Create: Directory structure
501
+ |-- Write: SKILL.md (style-aware)
502
+ |-- Write: README.md
503
+ |-- Optionally: templates/, scripts/
504
+ |-- Validate: Structure and style
505
+ +-- Output: Skill package
506
+
507
+ Return: Skill location + next steps
508
+ ```
509
+
510
+ ## Phase Execution Protocol
511
+
512
+ ```javascript
513
+ // Main entry point
514
+ async function liteSkillGenerator(input) {
515
+ // Phase 1: Style Learning
516
+ const references = [
517
+ '.claude/commands/ccw.md',
518
+ '.claude/commands/ccw-coordinator.md',
519
+ ...discoverReferenceSkills(input)
520
+ ];
521
+ const styleProfile = await analyzeStyle(references);
522
+ console.log(`Style Analysis: ${styleProfile.organization.phaseStructure}, ${styleProfile.language.verbosity}`);
523
+
524
+ // Phase 2: Requirements
525
+ const requirements = await gatherRequirements(styleProfile);
526
+ console.log(`Requirements: ${requirements.name} (${requirements.steps} phases)`);
527
+
528
+ // Phase 3: Generation
529
+ const result = await generateSkillPackage(requirements);
530
+ console.log(`✅ Generated: ${result.skillPath}`);
531
+
532
+ return result;
533
+ }
534
+ ```
535
+
536
+ ## Output Structure
537
+
538
+ **Minimal Package** (default):
539
+ ```
540
+ .claude/skills/{skill-name}/
541
+ ├── SKILL.md # Entry point with frontmatter
542
+ └── README.md # Usage guide
543
+ ```
544
+
545
+ **With Templates** (if needed):
546
+ ```
547
+ .claude/skills/{skill-name}/
548
+ ├── SKILL.md
549
+ ├── README.md
550
+ └── templates/
551
+ └── base-template.md
552
+ ```
553
+
554
+ **With Scripts** (if using Bash):
555
+ ```
556
+ .claude/skills/{skill-name}/
557
+ ├── SKILL.md
558
+ ├── README.md
559
+ └── scripts/
560
+ └── helper.sh
561
+ ```
562
+
563
+ ## Key Design Principles
564
+
565
+ 1. **Style Learning** - Analyze reference skills to maintain consistency
566
+ 2. **Minimal Overhead** - Generate only essential files (SKILL.md + README)
567
+ 3. **Progressive Disclosure** - Follow anthropics' three-layer loading
568
+ 4. **Flow-Based** - Use pseudocode and flow diagrams (when style appropriate)
569
+ 5. **Interactive** - Guided requirements gathering via AskUserQuestion
570
+ 6. **Fast Generation** - 3 phases instead of 6, focused on simplicity
571
+ 7. **Style Awareness** - Adapt output based on detected patterns
572
+
573
+ ## Style Pattern Detection
574
+
575
+ **Structural Patterns**:
576
+ - YAML frontmatter usage (100% in references)
577
+ - Section headers (H2 for major, H3 for sub-sections)
578
+ - Code blocks (JavaScript pseudocode, Bash examples)
579
+ - ASCII diagrams (architecture, flow charts)
580
+
581
+ **Language Patterns**:
582
+ - Instruction style: Procedural with function definitions
583
+ - Pseudocode: JavaScript-based with flow annotations
584
+ - Verbosity: Detailed but focused
585
+ - Terminology: Phase, workflow, pipeline, orchestrator
586
+
587
+ **Organization Patterns**:
588
+ - Phase structure: 3-5 sequential phases
589
+ - Example density: Moderate (1-2 per major section)
590
+ - Template usage: Minimal (only when necessary)
591
+
592
+ ## Usage Examples
593
+
594
+ **Basic Generation**:
595
+ ```
596
+ User: "Create a markdown formatter skill"
597
+ Lite-Skill-Generator:
598
+ → Analyzes ccw.md style
599
+ → Asks: Name? "markdown-formatter"
600
+ → Asks: Purpose? "Transformation"
601
+ → Asks: Steps? "3 steps"
602
+ → Generates: .claude/skills/markdown-formatter/
603
+ ```
604
+
605
+ **With Custom References**:
606
+ ```
607
+ User: "Create a skill like software-manual but simpler"
608
+ Lite-Skill-Generator:
609
+ → Analyzes software-manual skill
610
+ → Learns: Multi-phase, agent-based, template-heavy
611
+ → Simplifies: 3 phases, direct execution, minimal templates
612
+ → Generates: Simplified version
613
+ ```
614
+
615
+ ## Comparison: lite-skill-generator vs skill-generator
616
+
617
+ | Aspect | lite-skill-generator | skill-generator |
618
+ |--------|---------------------|-----------------|
619
+ | **Phases** | 3 (Style → Req → Gen) | 6 (Spec → Req → Dir → Gen → Specs → Val) |
620
+ | **Style Learning** | Yes (analyze references) | No (fixed templates) |
621
+ | **Complexity** | Simple skills only | Full-featured skills |
622
+ | **Output** | Minimal (SKILL.md + README) | Complete (phases/, specs/, templates/) |
623
+ | **Generation Time** | Fast (~2 min) | Thorough (~10 min) |
624
+ | **Use Case** | Quick scaffolding | Production-ready skills |
625
+
626
+ ## Workflow Integration
627
+
628
+ **Standalone**:
629
+ ```bash
630
+ /skill:lite-skill-generator "Create a log analyzer skill"
631
+ ```
632
+
633
+ **With References**:
634
+ ```bash
635
+ /skill:lite-skill-generator "Create a skill based on ccw-coordinator.md style"
636
+ ```
637
+
638
+ **Batch Generation** (for multiple simple skills):
639
+ ```bash
640
+ /skill:lite-skill-generator "Create 3 skills: json-validator, yaml-parser, toml-converter"
641
+ ```
642
+
643
+ ---
644
+
645
+ **Next Steps After Generation**:
646
+ 1. Review `.claude/skills/{name}/SKILL.md`
647
+ 2. Customize phase logic for your use case
648
+ 3. Add examples to README.md
649
+ 4. Test skill with sample input
650
+ 5. Iterate based on real usage