mother-brain 0.0.4

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.
@@ -0,0 +1,48 @@
1
+ # Project Vision Template
2
+ # Template for creating vision documents in docs/vision.md
3
+
4
+ ## Project Name
5
+ [Auto-generated from user input]
6
+
7
+ ## Problem Statement
8
+ **What problem does this solve?**
9
+ [User's description of pain point/need]
10
+
11
+ ## Target Users
12
+ **Who will use this?**
13
+ [Primary user personas and use cases]
14
+
15
+ ## Success Criteria
16
+ **What does success look like?**
17
+ [Measurable outcomes and impact]
18
+
19
+ ## Key Features (MVP)
20
+ 1. [Feature 1 - core functionality]
21
+ 2. [Feature 2 - essential capability]
22
+ 3. [Feature 3 - must-have feature]
23
+
24
+ ## Technology Preferences
25
+ **Stack considerations:**
26
+ - Frontend: [Based on user needs and project type]
27
+ - Backend: [Based on data/API requirements]
28
+ - Database: [Based on data structure]
29
+ - Deployment: [Based on audience and scale]
30
+
31
+ ## Constraints & Requirements
32
+ **Technical:**
33
+ - [Performance requirements]
34
+ - [Scalability needs]
35
+ - [Security considerations]
36
+
37
+ **Business:**
38
+ - [Timeline expectations]
39
+ - [Budget constraints]
40
+ - [Compliance requirements]
41
+
42
+ ## Future Vision (Post-MVP)
43
+ [Features for later phases]
44
+
45
+ ---
46
+
47
+ **Created by Mother Brain on [DATE]**
48
+ **Vision Discovery Wizard - Session [ID]**
@@ -0,0 +1,615 @@
1
+ ---
2
+ name: skill-creator
3
+ description: Create (and continuously improve) new GitHub Copilot Agent Skills by generating high-quality SKILL.md files and examples.
4
+ license: MIT
5
+ compatibility: node>=18
6
+ metadata:
7
+ domain: meta
8
+ stage: production
9
+ allowed-tools: bash node view grep glob web_search ask_user powershell create edit skill
10
+ ---
11
+
12
+ # Skill Creator
13
+
14
+ Use this skill when the user wants a new reusable capability, or when you notice repeated work that should be turned into a skill.
15
+
16
+ ## Purpose
17
+
18
+ Create a complete skill folder at `.github/skills/<skill-name>/` with:
19
+ - `SKILL.md` (clear instructions + constraints + validation)
20
+ - `examples/` (at least one input and expected output)
21
+ - `references/` (research findings, best practices, documentation links)
22
+ - `scripts/` (helper scripts, templates, automation utilities)
23
+
24
+ This skill is optimized for *minimal prompts, maximal clarity*, and iterative improvement.
25
+
26
+ ## Operating principles
27
+
28
+ - Prefer **small, focused skills** over "do everything" skills.
29
+ - Each step must be **observable** (creates/changes something, or produces a checkable result).
30
+ - Keep the description **one sentence** (when/why to use).
31
+ - Include a **validation section** so success is unambiguous.
32
+ - **Research first**: Check existing repo files/docs and search the web for best practices during skill creation (after wizard completes). All research findings MUST be saved to the skill's `references/` folder.
33
+ - **Mandatory folders**: Every skill MUST have `references/` and `scripts/` folders with meaningful content. Empty folders are not acceptable.
34
+ - **Product owner mindset**: Treat users as product owners, not developers. Ask about problems, pain points, and desired outcomes—not technical configurations.
35
+ - **Problem-solving questions**: Focus on understanding what the user wants to achieve and why, not how they think it should be built.
36
+ - **Wizard interface**: Use numbered multiple-choice questions (up to 3 options + freeform) that users can select via arrow keys or number keys.
37
+ - **Varied options**: Provide diverse approaches as choices, including combination options like "Both of the above" or "All three approaches."
38
+ - **Agent-driven naming**: Never ask users what to name the skill—the agent always decides the name based on understanding the user's needs, following lowercase-hyphenated format (e.g., "markdown-formatter", "api-tester", "git-workflow-helper").
39
+ - **Wizard pattern propagation**: ALL created skills MUST use the same wizard pattern to gather information from their users. Created skills should ask contextual questions to understand user intent, not assume technical knowledge.
40
+ - **End-user accessibility**: Consider how users will interact with the skill's output. If creating applications/tools, assume non-technical end users who want to launch and use the result, not edit code. Make outputs immediately usable in the simplest way possible.
41
+ - **Automation-first**: Skills should automate everything possible. Never delegate manual steps to users if the skill can do it automatically.
42
+ - **Check prerequisites**: Skills that require external tools/SDKs must check for them before executing and provide clear installation guidance.
43
+ - **Error handling**: Skills must handle failures gracefully with actionable error messages, not silent failures.
44
+ - **TEST OUTPUT**: Skills MUST verify their output actually works before claiming success. Build it, run it, test it. Don't assume—prove.
45
+ - **Continuous self-improvement**: When the Heal function fixes a skill execution issue, extract the general lesson and update skill-creator itself to prevent creating skills with similar flaws in the future.
46
+ - **Skill composition**: Skills should detect when they need expertise from another skill and invoke it using the `skill` tool. This allows skills to collaborate and combine their capabilities for better results.
47
+ - **Guided external service setup**: When skills require external services (databases, APIs, cloud platforms), NEVER dump technical instructions on the user. Instead:
48
+ - Explain in plain language WHAT the service does and WHY it's needed
49
+ - Estimate time required ("This takes about 5 minutes")
50
+ - Guide step-by-step with checkpoints ("Did that work? Great, let's continue...")
51
+ - Translate technical terms into user-friendly language (e.g., "API key" → "secret password for your app")
52
+ - Offer to pause and resume later if the setup is complex
53
+ - Consider the user as a product owner, not a developer
54
+
55
+ ## Steps
56
+
57
+ 1. **Show Welcome Menu**
58
+ - Display: "🎯 Welcome to Skill Creator!"
59
+ - Present 6 numbered options using `ask_user` tool (numbers only in choices, not duplicated in text):
60
+ 1. Create new skill
61
+ 2. Update existing skill
62
+ 3. Heal skill (fix/validate)
63
+ 4. Use a skill
64
+ 5. View all skills
65
+ 6. Delete skill
66
+ - After any action completes (or is cancelled), return to main menu
67
+ - Proceed based on user's choice
68
+
69
+ 2. **Collect inputs** (based on option selected)
70
+
71
+ **If "Create new skill":**
72
+
73
+ **WIZARD PHASE (interactive CLI):**
74
+ - Display: "📋 Skill Creation Wizard" (number of questions varies based on context)
75
+ - Ask contextual questions to understand user needs, pain points, and desired outcomes
76
+ - Treat the user as a product owner—focus on WHAT they want to achieve and WHY, not HOW
77
+ - For each question, use `ask_user` with:
78
+ - Up to 3 varied, diverse approaches as `choices`
79
+ - Options can include combinations: "Both A and B", "All of the above"
80
+ - Freeform input always available (automatically added by UI)
81
+ - Users can navigate with arrow keys or press numbers (1-3)
82
+
83
+ **Question strategy (adapt based on user's problem):**
84
+ - Start with: **What problem are you trying to solve?** or **What's the pain point you're experiencing?**
85
+ - Follow with contextual questions that dig deeper:
86
+ - "What would success look like for you?"
87
+ - "Who will be using this and in what situations?"
88
+ - "What are the biggest challenges you face with this task?"
89
+ - "How often do you encounter this problem?"
90
+ - "What have you tried so far that hasn't worked?"
91
+
92
+ **Never ask:**
93
+ - ❌ "What should we name this skill?" (Agent decides based on understanding)
94
+ - ❌ "What tools should this use?" (Technical question - agent decides)
95
+ - ❌ "What domain?" (Technical categorization - agent decides)
96
+ - ❌ Technical configuration questions
97
+
98
+ **Always infer from context:**
99
+ - Skill name (from problem understanding)
100
+ - Technical implementation details (from user needs)
101
+ - Tools and domain (from problem domain)
102
+
103
+ **REVIEW PHASE:**
104
+ - Display summary showing what the agent understood:
105
+ - Problem statement
106
+ - Proposed solution approach
107
+ - Key capabilities
108
+ - (Skill name decided by agent - shown but not editable)
109
+ - Ask: "✅ Does this capture what you need? Submit or refine?"
110
+ - Choices: "Submit and create", "Refine the approach", "Start over"
111
+ - If refining, ask what aspect needs adjustment
112
+
113
+ **RESEARCH PHASE (after wizard is complete):**
114
+ - Check `.github/skills/` folder for similar skills and reference materials
115
+ - Use `view` to read existing skill examples for patterns
116
+ - Use `web_search` to find best practices, current standards, and reference materials for the skill domain
117
+ - **MANDATORY**: Save ALL research findings to skill's `references/` folder
118
+ - Use research to inform the SKILL.md structure and content
119
+
120
+ **If "Update existing skill":**
121
+ - Ask which skill to update (with option to return to menu)
122
+ - Ask what changes to make
123
+ - After completion, return to main menu
124
+
125
+ **If "Heal skill":**
126
+ - Ask which skill to validate/fix (with option to return to menu)
127
+ - Ask: "What needs healing?" with options:
128
+ 1. Validate the skill file (check structure and format)
129
+ 2. Test and fix a recent skill execution (analyze output and fix errors)
130
+ 3. Both validation and execution testing
131
+ - If option 1 (Validate): Run validation checks on SKILL.md structure
132
+ - If option 2 or 3 (Test execution):
133
+ - Ask user to describe what happened when they used the skill
134
+ - Review the skill's output (files created, errors encountered)
135
+ - Identify issues (missing dependencies, incorrect paths, build failures, etc.)
136
+ - Re-execute the skill with fixes, OR update the skill instructions to prevent the issue
137
+ - After completion, return to main menu
138
+
139
+ **If "Use a skill":**
140
+ - List all available skills to choose from
141
+ - Include "Return to menu" as first option
142
+ - After user selects a skill:
143
+ - Invoke the skill using `skill` tool
144
+ - The skill runs its wizard and completes its task
145
+ - After skill completes, return to main menu
146
+
147
+ **If "View all skills":**
148
+ - List all skills in `.github/skills/`
149
+ - Show name, description, and status
150
+ - Automatically return to main menu after display
151
+
152
+ **If "Delete skill":**
153
+ - List all available skills to choose from
154
+ - Include "Return to menu" as first option
155
+ - After user selects a skill to delete, ask confirmation:
156
+ - "⚠️ Are you sure you want to delete [skill-name]? This cannot be undone."
157
+ - Choices: "Yes, delete it", "No, cancel"
158
+ - If confirmed, delete entire skill folder
159
+ - Show success/cancellation message
160
+ - Return to main menu
161
+
162
+ 3. **Execute selected action**
163
+
164
+ **For Create:**
165
+ - Generate the skill skeleton using collected information
166
+ - Create `.github/skills/<skill-name>/SKILL.md` with:
167
+ - Proper YAML frontmatter (include `ask_user` in allowed-tools)
168
+ - Clear purpose and operating principles
169
+ - **Step 1 MUST be a wizard phase** that uses `ask_user` to gather context:
170
+ - Ask problem-focused questions (not technical config)
171
+ - Provide 2-3 varied options per question
172
+ - Understand user intent before proceeding
173
+ - Consider: Is this creating something new or updating existing?
174
+ - Consider: How will the end user access/use the output?
175
+ - Subsequent steps for execution based on gathered info
176
+ - Validation criteria
177
+ - **Accessibility note**: If skill creates applications/tools, include guidance on making output immediately usable (e.g., executable files, launcher scripts, not just source code)
178
+ - Create `.github/skills/<skill-name>/examples/input-01.md` showing wizard interaction
179
+ - Create `.github/skills/<skill-name>/examples/output-01.md` showing end-user accessible result
180
+ - **MANDATORY**: Create `.github/skills/<skill-name>/references/` folder with:
181
+ - `resources.md` - Links to external documentation, tutorials, best practices
182
+ - Research findings from web_search (save as markdown files)
183
+ - Related technology documentation
184
+ - **MUST contain at least 2 files** with substantive content
185
+ - **MANDATORY**: Create `.github/skills/<skill-name>/scripts/` folder with:
186
+ - Helper scripts relevant to the skill's domain
187
+ - Template files or configuration examples
188
+ - Validation or testing utilities
189
+ - **MUST contain at least 1 useful script or template** that supports the skill's purpose
190
+ - If no scripts are needed, include a `templates.md` with useful templates/snippets
191
+ - **After skill is created, ask user**:
192
+ - "Would you like to use this skill now?"
193
+ - Choices: "Yes, use it now", "No, just return to menu"
194
+ - If "Yes": Execute the skill inline by following its SKILL.md instructions directly
195
+ - If "No": Return to main menu
196
+
197
+ **For Update:**
198
+ - Modify the existing SKILL.md
199
+ - Update examples if needed
200
+ - **Update or create references folder** if needed (ensure at least 2 files with content)
201
+ - **Update or create scripts folder** if needed (ensure at least 1 useful script/template)
202
+ - Return to main menu after completion
203
+
204
+ **For Use:**
205
+ - Check if the skill exists in `.github/skills/`
206
+ - **IMPORTANT**: Newly created skills in the current session cannot be invoked yet
207
+ - If the skill was just created:
208
+ - Inform user: "This skill was just created and will be available next session"
209
+ - Offer to execute the skill's functionality manually (follow its steps directly)
210
+ - Return to main menu
211
+ - If the skill exists from a previous session:
212
+ - Invoke using `skill` tool: `skill <skill-name>`
213
+ - Let the skill run its complete workflow
214
+ - Return to main menu after skill completes
215
+
216
+ **For Heal:**
217
+
218
+ **If validating skill structure:**
219
+ - Validate YAML frontmatter
220
+ - Check `name` matches `^[a-z][a-z0-9]*(-[a-z0-9]+)*$`
221
+ - Verify instructions are actionable
222
+ - Check examples exist and are complete
223
+ - Fix any structural issues found
224
+
225
+ **If testing/fixing skill execution:**
226
+ - Ask user what happened during skill execution
227
+ - Examine the output/artifacts created by the skill
228
+ - Identify errors:
229
+ - Build failures (missing SDKs, dependencies)
230
+ - Runtime errors (incorrect paths, missing files)
231
+ - Logic errors (skill produced wrong output)
232
+ - Documentation errors (instructions don't match reality)
233
+ - Determine fix strategy:
234
+ - **Quick fix**: Re-execute the skill with corrections (e.g., fix paths, add missing files)
235
+ - **Skill update**: If the skill itself has flaws, update SKILL.md to prevent future issues
236
+ - **Environment issue**: Guide user to install missing dependencies
237
+ - Apply the fix and verify it works
238
+ - Document what was fixed in a brief summary
239
+
240
+ **Self-Improvement (Critical):**
241
+ - After fixing the issue, analyze the root cause
242
+ - Extract the general lesson learned (not just the specific fix)
243
+ - Update skill-creator itself to prevent creating skills with similar flaws:
244
+ - If issue was "skill didn't check prerequisites" → Add to skill creation template: "Always check prerequisites before executing"
245
+ - If issue was "skill asked user to do manual steps" → Add principle: "Automate everything possible, don't delegate to user"
246
+ - If issue was "skill had missing error handling" → Add to validation: "Check for error handling in generated skills"
247
+ - Update the relevant section of skill-creator/SKILL.md:
248
+ - Operating Principles (if it's a broad principle)
249
+ - Wizard Pattern for Created Skills (if it's about how skills should behave)
250
+ - Validation Checklist (if it's something to check during creation)
251
+ - Briefly explain what was learned and how it will prevent future issues
252
+
253
+ - Return to main menu after completion
254
+
255
+ **For Delete:**
256
+ - Use `powershell` tool to remove entire skill directory
257
+ - Command: `Remove-Item -Path ".github/skills/<skill-name>" -Recurse -Force`
258
+ - Display success message with skill name
259
+ - Return to main menu
260
+
261
+ 4. **Validate before finishing** (for Create/Update/Heal)
262
+ - YAML frontmatter parses correctly
263
+ - `name` matches naming pattern `^[a-z][a-z0-9]*(-[a-z0-9]+)*$`
264
+ - Instructions are actionable (no vague "make it better" steps)
265
+ - **Step 1 includes wizard pattern** with `ask_user` for gathering context
266
+ - Examples are present, clear, and demonstrate the skill
267
+ - Examples show wizard interaction and end-user accessible output
268
+ - **MANDATORY FOLDERS CHECK**:
269
+ - `references/` folder exists with at least 2 files containing substantive content
270
+ - `scripts/` folder exists with at least 1 useful script, template, or helper file
271
+ - No empty folders allowed
272
+ - `ask_user` is included in `allowed-tools`
273
+ - All other required tools are listed in `allowed-tools`
274
+ - If skill creates applications/tools, validation includes accessibility considerations
275
+ - **Automation check**: Skill automates execution—doesn't ask user to run manual commands
276
+ - **Prerequisites check**: If skill requires external tools, it checks for them first
277
+ - **Error handling**: Skill includes error handling with clear, actionable messages
278
+ - **Skill composition**: If skill's domain could benefit from other skills' expertise, it checks for and invokes them
279
+
280
+ 5. **Self-improve** (continuous learning loop)
281
+
282
+ **After creating/updating a skill:**
283
+ - If a skill is later healed due to execution issues, capture the lesson learned
284
+ - Update skill-creator itself to prevent similar issues in future skill creations
285
+
286
+ **After healing a skill:**
287
+ - Identify the root cause category:
288
+ - Missing automation (skill asked user to do manual work)
289
+ - Missing prerequisite checks (skill failed due to missing tools/SDKs)
290
+ - Poor error handling (silent failures or unclear errors)
291
+ - Documentation mismatch (instructions don't match behavior)
292
+ - Extract the general principle (not just the specific fix)
293
+ - Update skill-creator's Operating Principles, Wizard Template, or Validation Checklist
294
+ - Document the improvement for transparency
295
+
296
+ **Examples of self-improvement:**
297
+ - Issue: "windows-app-builder created files but didn't build the app"
298
+ - Lesson: Skills should automate execution, not delegate to users
299
+ - Update: Add "Automation-first" to Operating Principles + "Prerequisites check" step to template
300
+
301
+ This creates a feedback loop where skill-creator gets better with each healing session.
302
+
303
+ ## Wizard Best Practices
304
+
305
+ **Research Before Asking:**
306
+ - Use `web_search` to find best practices and reference materials AFTER the wizard completes and you know what skill to research
307
+ - Check existing skills for structural patterns to inform the SKILL.md format
308
+ - Research happens after scoping, not before
309
+
310
+ **Question Design:**
311
+ - Start with problem identification: "What problem are you trying to solve?"
312
+ - Ask contextual follow-up questions based on the problem domain
313
+ - Focus on user needs, frequency, impact, and desired outcomes
314
+ - Provide 2-3 varied approaches that solve the problem differently
315
+ - Include combination options when appropriate ("Both approaches", "All three")
316
+ - Never ask technical questions (naming, tools, domains)
317
+ - Display progress: "Question X" (variable number based on context)
318
+
319
+ ## Wizard Pattern for Created Skills
320
+
321
+ **CRITICAL**: Every skill you create MUST include a wizard phase as Step 1. This ensures all skills gather context intelligently before executing.
322
+
323
+ **Wizard Template for New Skills:**
324
+ ```markdown
325
+ ## Steps
326
+
327
+ 1. **Gather Context via Wizard**
328
+ - Use `ask_user` tool to understand user intent
329
+ - Ask 3-5 contextual questions about:
330
+ - What they're trying to achieve
331
+ - Current situation (new or updating existing?)
332
+ - Desired outcome and how they'll use it
333
+ - Any constraints or preferences
334
+ - Provide 2-3 varied options per question
335
+ - Consider accessibility: How will end user interact with the output?
336
+
337
+ Example questions:
338
+ - "What are you trying to create/accomplish?"
339
+ - "Is this a new project or updating something existing?"
340
+ - "Who will use this? (You, your team, end users)"
341
+ - "How do you want to access/launch the result?"
342
+
343
+ 2. **Research & Plan** (based on wizard responses)
344
+ - Use gathered context to inform approach
345
+ - Research best practices for the specific use case
346
+ - Determine appropriate tools and technologies
347
+
348
+ 3. **Check Prerequisites** (if skill requires external tools)
349
+ - Use `powershell` or `bash` to check if required tools are installed
350
+ - Examples: "dotnet --version", "python --version", "node --version"
351
+ - If missing:
352
+ - Provide clear installation instructions
353
+ - Offer automated installation if possible
354
+ - Ask user if they want to proceed without prerequisites (and what that means)
355
+ - Never assume prerequisites exist—always verify
356
+
357
+ 4. **Execute** (create/update based on plan)
358
+ - Perform the actual work automatically
359
+ - Don't ask user to run manual commands
360
+ - Handle errors with clear, actionable messages
361
+ - Test that output actually works
362
+ - **Check for skill collaboration opportunities**:
363
+ - If task requires expertise from another domain, invoke related skills
364
+ - Example: Building a UI? Invoke design/branding skills for visual guidance
365
+ - Example: Creating API? Invoke documentation skills for API docs
366
+ - Use `skill` tool to invoke other skills mid-execution
367
+ - Collect their output and integrate into current task
368
+ ...
369
+
370
+ 5. **Validate & Test** (verify success)
371
+ - Check that expected files/outputs were created
372
+ - **CRITICAL**: Test functionality—don't just check files exist
373
+ - For applications: Build, publish, and LAUNCH to verify it works
374
+ - For scripts: Actually run them to verify they execute
375
+ - For documents: Open and verify they're properly formatted
376
+ - Provide clear success/failure feedback based on ACTUAL testing
377
+
378
+ 6. **Deliver Results**
379
+ - Summarize what was created
380
+ - Provide immediate next steps (how to use/launch the output)
381
+ - Offer to make adjustments if needed
382
+ ```
383
+
384
+ **Key Requirements for All Created Skills:**
385
+ - ✅ **Automate execution**: Don't tell user to run commands—do it for them
386
+ - ✅ **Check prerequisites**: Verify external tools exist before using them
387
+ - ✅ **Handle errors**: Provide clear, actionable error messages
388
+ - ✅ **Test output**: Build it, run it, test it—verify it ACTUALLY works before delivering
389
+ - ✅ **End-user focus**: Make output immediately usable
390
+ - ✅ **Skill composition**: Detect when another skill's expertise would help and invoke it
391
+
392
+ **Continuous Learning Architecture (MANDATORY)**:
393
+
394
+ Skills are LIVING systems that learn continuously, not static templates. Each skill must:
395
+
396
+ **1. Initial Domain Discovery (At Creation Time):**
397
+ - Use `web_search` to research: "[domain] requirements discovery checklist" and "[domain] common user frustrations"
398
+ - Extract domain-appropriate discovery questions dynamically from research
399
+ - Store research findings in skill's `references/` folder
400
+ - Build initial wizard from research, not hard-coded knowledge
401
+
402
+ **2. Continuous Learning During Execution:**
403
+ - When user expresses frustration or confusion → skill triggers self-analysis
404
+ - When multiple iteration cycles occur → skill logs pattern for improvement
405
+ - When validation fails → skill traces root cause back through pipeline
406
+ - Skills maintain their own `learnings.md` file that accumulates execution patterns
407
+
408
+ **3. Self-Healing After Friction:**
409
+ - When friction detected, skill asks: "What would have prevented this frustration?"
410
+ - Check existing research: "Did we already have knowledge that wasn't applied?"
411
+ - Identify if NEW research is needed: "Is this a gap in our domain understanding?"
412
+ - Trace pipeline: "Where upstream could this have been caught/prevented?"
413
+ - Update skill's own SKILL.md with improved patterns
414
+
415
+ **4. Pre-emptive Frustration Detection (Built Into Skills):**
416
+ - Each skill should include a section: "Common Frustration Points"
417
+ - Before executing, skills ask internally: "What typically frustrates users here?"
418
+ - Skills research common pitfalls: "[domain] common mistakes" and "[domain] user pain points"
419
+ - Address likely frustrations BEFORE they happen, not after
420
+
421
+ **5. Pipeline Tracing (Root Cause Without Domain Knowledge):**
422
+ - When something goes wrong, DON'T add domain knowledge to Mother Brain/skill-creator
423
+ - Instead ASK: "What PROCESS failed that allowed this to happen?"
424
+ - Update the PROCESS (research step, validation step, discovery question pattern)
425
+ - The fix is always: "How do we learn this dynamically?" not "Remember this fact"
426
+
427
+ **The Meta-Pattern:**
428
+ - Mother Brain = Process orchestrator (no domain knowledge)
429
+ - Skill-Creator = Skill factory + learning architecture (no domain knowledge)
430
+ - Project Skills = Domain learners that research, execute, and continuously improve
431
+ - Learning flows: User friction → Skill improvement → (if pattern) → Skill-creator improvement → (if process) → Mother Brain improvement
432
+
433
+ **Skill Composition Pattern:**
434
+
435
+ When to invoke other skills during execution:
436
+ - **Design/Visual tasks** → Invoke branding/design skills
437
+ - **Documentation needs** → Invoke documentation skills
438
+ - **Code quality** → Invoke linting/testing skills
439
+ - **Data modeling** → Invoke database/schema skills
440
+
441
+ How to invoke:
442
+ 1. Detect the need (e.g., "I'm building a UI and need design guidance")
443
+ 2. Check if relevant skill exists (search `.github/skills/` for matching domain)
444
+ 3. Use `skill` tool to invoke: `skill brand-guidelines-builder` or `skill <skill-name>`
445
+ 4. Collect output/guidance from invoked skill
446
+ 5. Integrate into current execution
447
+ 6. Continue with main task
448
+
449
+ Example flow:
450
+ ```
451
+ windows-app-builder executing...
452
+ ├─ Step 1-3: Gather context, plan architecture
453
+ ├─ Step 4: Building UI...
454
+ │ ├─ Detect: Need visual design guidance
455
+ │ ├─ Check: brand-guidelines-builder skill exists
456
+ │ ├─ Invoke: skill brand-guidelines-builder
457
+ │ │ └─ (Brand skill wizard runs, provides color palette, typography, spacing)
458
+ │ ├─ Receive: Brand guidelines output
459
+ │ └─ Apply: Use guidelines in UI generation
460
+ └─ Step 5-6: Complete app with branded UI
461
+ ```
462
+
463
+ **End-User Accessibility Principle:**
464
+ - **If skill creates applications**: Provide launchers, executables, or simple run scripts—not just source code
465
+ - **If skill creates documents**: Generate in commonly used formats (PDF, DOCX, HTML)
466
+ - **If skill creates tools**: Include README with one-line command to use it
467
+ - **Default assumption**: User wants to USE the output immediately, not configure or edit it
468
+
469
+ **Bad Example (technical focus):**
470
+ ```
471
+ 1. Gather Requirements
472
+ - Ask: "What framework do you want to use?"
473
+ - Ask: "What build tool?"
474
+ - Ask: "What package manager?"
475
+ ❌ Too technical, assumes user knows infrastructure
476
+ ```
477
+
478
+ **Good Example (outcome focus):**
479
+ ```
480
+ 1. Gather Context via Wizard
481
+ - Ask: "What problem does this app solve?"
482
+ - Ask: "Who will use it and how often?"
483
+ - Ask: "How do you want to launch it? (Desktop icon, command line, web browser)"
484
+ ✅ Focuses on user needs, agent decides technical details
485
+ ```
486
+
487
+ **Example wizard flow:**
488
+ ```
489
+ 📋 Skill Creation Wizard
490
+
491
+ Question 1: What problem are you trying to solve?
492
+ > [User types: "Our API documentation is always out of sync with the actual code. Developers update endpoints but forget to update the docs."]
493
+
494
+ Question 2: How critical is this problem for your team?
495
+ 1. Blocks development - happens daily and causes confusion
496
+ 2. Slows us down - happens weekly, wastes time
497
+ 3. Minor annoyance - happens occasionally
498
+
499
+ Question 3: What would the ideal solution do for you?
500
+ 1. Automatically generate docs from code annotations
501
+ 2. Validate existing docs against live API and flag mismatches
502
+ 3. Both - generate docs AND validate them continuously
503
+
504
+ Question 4: Who will use this solution most?
505
+ 1. Developers writing the APIs
506
+ 2. Technical writers maintaining docs
507
+ 3. Both developers and writers
508
+
509
+ ✅ Here's what I understand:
510
+
511
+ **Problem**: API documentation becomes outdated when code changes
512
+ **Impact**: Daily confusion and wasted time across team
513
+ **Solution**: Auto-generate and validate API docs from code
514
+ **Users**: Both developers and technical writers
515
+
516
+ **Proposed skill**: api-docs-sync
517
+ **Capabilities**:
518
+ • Scan code for API endpoint definitions and annotations
519
+ • Generate documentation in standard format (OpenAPI/Swagger)
520
+ • Validate existing docs against actual API structure
521
+ • Flag mismatches and suggest updates
522
+ • Run as CI/CD check to prevent drift
523
+
524
+ Does this capture what you need?
525
+ 1. Yes, submit and create
526
+ 2. Refine the approach
527
+ 3. Start over
528
+ ```
529
+
530
+ ## Skill Composition (Cross-Skill Collaboration)
531
+
532
+ **Purpose**: Enable skills to invoke other skills for specialized expertise, creating a collaborative skill ecosystem.
533
+
534
+ **When to Use Skill Composition:**
535
+
536
+ A skill should invoke another skill when:
537
+ - It encounters a task outside its primary domain
538
+ - Another skill has specialized knowledge that would improve the result
539
+ - The task has multiple distinct phases requiring different expertise
540
+
541
+ **Common Collaboration Patterns:**
542
+
543
+ | Primary Skill | Could Invoke | For What |
544
+ |---------------|--------------|----------|
545
+ | windows-app-builder | brand-guidelines-builder | UI design, colors, typography |
546
+ | api-builder | documentation-skill | API reference docs |
547
+ | database-designer | data-validator | Schema validation |
548
+ | test-generator | code-analyzer | Complexity analysis |
549
+
550
+ **How to Implement in Created Skills:**
551
+
552
+ 1. **Detection Phase** (during execution):
553
+ ```markdown
554
+ - Analyze current task and identify sub-domains
555
+ - Check if task would benefit from specialized expertise
556
+ - Search `.github/skills/` for relevant skills by domain/name
557
+ ```
558
+
559
+ 2. **Invocation**:
560
+ ```markdown
561
+ - Use `skill` tool: `skill <skill-name>`
562
+ - The invoked skill runs its wizard to gather context
563
+ - Collect output/guidance from invoked skill
564
+ ```
565
+
566
+ 3. **Integration**:
567
+ ```markdown
568
+ - Apply output from invoked skill to current task
569
+ - Continue with main execution using enhanced knowledge
570
+ ```
571
+
572
+ **Example Implementation in SKILL.md:**
573
+
574
+ ```markdown
575
+ 4. **Execute - Build Application**
576
+ - Generate project structure
577
+ - **Check for design enhancement**:
578
+ - If creating UI components, check if brand-guidelines-builder skill exists
579
+ - If exists: Invoke `skill brand-guidelines-builder`
580
+ - Collect: Color palette, typography rules, spacing system
581
+ - Apply: Use brand guidelines in generated UI code
582
+ - Build remaining components
583
+ - Compile and test
584
+ ```
585
+
586
+ **Guidelines for Skill Composition:**
587
+
588
+ - ✅ **Optional, not required**: Skill should work standalone if invoked skill doesn't exist
589
+ - ✅ **Context passing**: Briefly explain to user why invoking another skill
590
+ - ✅ **Seamless integration**: Make the collaboration invisible to user if possible
591
+ - ✅ **Avoid circular dependencies**: Skill A shouldn't invoke Skill B if B invokes A
592
+ - ❌ **Don't over-compose**: Only invoke when genuinely adds value
593
+
594
+ **Detecting Available Skills:**
595
+
596
+ ```markdown
597
+ Step: Check for complementary skills
598
+ - Use `glob` tool: pattern=".github/skills/*/SKILL.md"
599
+ - Parse skill names and descriptions
600
+ - Match against current needs (e.g., "design", "brand", "visual")
601
+ - If match found, consider invoking
602
+ ```
603
+
604
+ ## Example
605
+
606
+ **User request**: "Make a skill for formatting Markdown."
607
+
608
+ - Name: `markdown-formatter`
609
+ - Description: "Format markdown files with consistent headings, lists, and code blocks."
610
+ - Domain: `docs`
611
+
612
+ Create `.github/skills/markdown-formatter/SKILL.md` with:
613
+ - explicit formatting rules
614
+ - a before/after example
615
+ - validation checks (e.g. no malformed headings, consistent list indentation)