[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-c89c1b15-ccc1-4d83-964f-c6a688b5cc91":3,"$fdtwfItZQDZDfgZL4DRA6F2xiMuj1dDWaLmh3aoap7ek":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"c89c1b15-ccc1-4d83-964f-c6a688b5cc91","evolution","这项技能使makepad-skills能够在开发过程中持续自我改进。","cat_life_career","mod_other","sickn33,other","---\nname: evolution\ndescription: \"This skill enables makepad-skills to self-improve continuously during development.\"\nrisk: critical\nsource: community\n---\n\n\u003C!-- security-allowlist: curl-pipe-bash -->\n\n# Makepad Skills Evolution\n\nThis skill enables makepad-skills to self-improve continuously during development.\n\n## When to Use\n- You are maintaining `makepad-skills` and want the skill library to improve itself during development.\n- You need the workflow for deciding when a new pattern should become a skill update or hook-driven evolution.\n- You are working on self-correction, self-validation, or version adaptation for the skill set.\n\n## Quick Navigation\n\n| Topic | Description |\n|-------|-------------|\n| Collaboration Guidelines | **Contributing to makepad-skills** |\n| [Hooks Setup](#hooks-based-auto-triggering) | Auto-trigger evolution with hooks |\n| [When to Evolve](#when-to-evolve) | Triggers and classification |\n| [Evolution Process](#evolution-process) | Step-by-step guide |\n| [Self-Correction](#self-correction) | Auto-fix skill errors |\n| [Self-Validation](#self-validation) | Verify skill accuracy |\n| [Version Adaptation](#version-adaptation) | Multi-branch support |\n\n---\n\n## Hooks-Based Auto-Triggering\n\nFor reliable automatic triggering, use Claude Code hooks. Install with `--with-hooks`:\n\n```bash\n# Install makepad-skills with hooks enabled\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002FZhangHanDong\u002Fmakepad-skills\u002Fmain\u002Finstall.sh | bash -s -- --with-hooks\n```\n\nThis will install hooks to `.claude\u002Fhooks\u002F` and configure `.claude\u002Fsettings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"UserPromptSubmit\": [\n      {\n        \"matcher\": \"\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bash .claude\u002Fhooks\u002Fmakepad-skill-router.sh\"\n          }\n        ]\n      }\n    ],\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Bash|Write|Edit\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bash .claude\u002Fhooks\u002Fpre-tool.sh\"\n          }\n        ]\n      }\n    ],\n    \"PostToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bash .claude\u002Fhooks\u002Fpost-bash.sh\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n### What Hooks Do\n\n| Hook | Trigger Event | Action |\n|------|---------------|--------|\n| `makepad-skill-router.sh` | UserPromptSubmit | Auto-route to relevant skills |\n| `pre-tool.sh` | Before Bash\u002FWrite\u002FEdit | Detect Makepad version from Cargo.toml |\n| `post-bash.sh` | After Bash command fails | Detect Makepad errors, suggest fixes |\n| `session-end.sh` | Session ends | Prompt to capture learnings |\n\n---\n\n## Skill Routing and Bundling\n\nThe `makepad-skill-router.sh` hook automatically loads relevant skills based on user queries.\n\n### Context Detection\n\n| Context | Trigger Keywords | Skills Loaded |\n|---------|------------------|---------------|\n| **Full App** | \"build app\", \"从零\", \"完整应用\" | basics, dsl, layout, widgets, event-action, app-architecture |\n| **UI Design** | \"ui design\", \"界面设计\" | dsl, layout, widgets, animation, shaders |\n| **Widget Creation** | \"create widget\", \"创建组件\", \"自定义组件\" | widgets, dsl, layout, animation, shaders, font, event-action |\n| **Production** | \"best practice\", \"robrix pattern\", \"实际项目\" | app-architecture, widget-patterns, state-management, event-action |\n\n### Skill Dependencies\n\nWhen loading certain skills, related skills are auto-loaded:\n\n| Primary Skill | Auto-loads |\n|---------------|------------|\n| robius-app-architecture | makepad-basics, makepad-event-action |\n| robius-widget-patterns | makepad-widgets, makepad-layout |\n| makepad-widgets | makepad-layout, makepad-dsl |\n| makepad-animation | makepad-shaders |\n| makepad-shaders | makepad-widgets |\n| makepad-font | makepad-widgets |\n| robius-event-action | makepad-event-action |\n\n### Example\n\n```\nUser: \"我想从零开发一个 Makepad 应用\"\n\n[makepad-skills] Detected Makepad\u002FRobius query\n[makepad-skills] App development context detected - loading skill bundle\n[makepad-skills] Routing to: makepad-basics makepad-dsl makepad-event-action\n                            makepad-layout makepad-widgets robius-app-architecture\n```\n\n---\n\n## When to Evolve\n\nTrigger skill evolution when any of these occur during development:\n\n| Trigger | Target Skill | Priority |\n|---------|--------------|----------|\n| New widget pattern discovered | robius-widget-patterns\u002F_base | High |\n| Shader technique learned | makepad-shaders | High |\n| Compilation error solved | makepad-reference\u002Ftroubleshooting | High |\n| Layout solution found | makepad-reference\u002Fadaptive-layout | Medium |\n| Build\u002Fpackaging issue resolved | makepad-deployment | Medium |\n| New project structure insight | makepad-basics | Low |\n| Core concept clarified | makepad-dsl\u002Fmakepad-widgets | Low |\n\n---\n\n## Evolution Process\n\n### Step 1: Identify Knowledge Worth Capturing\n\nAsk yourself:\n- Is this a reusable pattern? (not project-specific)\n- Did it take significant effort to figure out?\n- Would it help other Makepad developers?\n- Is it not already documented in makepad-skills?\n\n### Step 2: Classify the Knowledge\n\n```\nWidget\u002FComponent Pattern     → robius-widget-patterns\u002F_base\u002F\nShader\u002FVisual Effect         → makepad-shaders\u002F\nError\u002FDebug Solution         → makepad-reference\u002Ftroubleshooting.md\nLayout\u002FResponsive Design     → makepad-reference\u002Fadaptive-layout.md\nBuild\u002FDeploy Issue           → makepad-deployment\u002FSKILL.md\nProject Structure            → makepad-basics\u002F\nCore Concept\u002FAPI             → makepad-dsl\u002F or makepad-widgets\u002F\n```\n\n### Step 3: Format the Contribution\n\n**For Patterns**:\n```markdown\n## Pattern N: [Pattern Name]\n\nBrief description of what this pattern solves.\n\n### live_design!\n```rust\nlive_design! {\n    \u002F\u002F DSL code\n}\n```\n\n### Rust Implementation\n```rust\n\u002F\u002F Rust code\n```\n```\n\n**For Troubleshooting**:\n```markdown\n### [Error Type\u002FMessage]\n\n**Symptom**: What the developer sees\n\n**Cause**: Why this happens\n\n**Solution**:\n```rust\n\u002F\u002F Fixed code\n```\n```\n\n### Step 4: Mark Evolution (NOT Version)\n\nAdd an evolution marker above new content:\n\n```markdown\n\u003C!-- Evolution: 2024-01-15 | source: my-app | author: @zhangsan -->\n```\n\n### Step 5: Submit via Git\n\n```bash\n# Create branch for your contribution\ngit checkout -b evolution\u002Fadd-loading-pattern\n\n# Commit your changes\ngit add robius-widget-patterns\u002F_base\u002Fmy-pattern.md\ngit commit -m \"evolution: add loading state pattern from my-app\"\n\n# Push and create PR\ngit push origin evolution\u002Fadd-loading-pattern\n```\n\n---\n\n## Self-Correction\n\nWhen skill content causes errors, automatically correct it.\n\n### Trigger Conditions\n\n```\nUser follows skill advice → Code fails to compile\u002Frun → Claude identifies skill was wrong\n                                                      ↓\n                                         AUTO: Correct skill immediately\n```\n\n### Correction Flow\n\n1. **Detect** - Skill advice led to an error\n2. **Verify** - Confirm the skill content is wrong\n3. **Correct** - Update the skill file with fix\n\n### Correction Marker Format\n\n```markdown\n\u003C!-- Correction: YYYY-MM-DD | was: [old advice] | reason: [why it was wrong] -->\n```\n\n---\n\n## Self-Validation\n\nPeriodically verify skill content is still accurate.\n\n### Validation Checklist\n\n```markdown\n## Validation Report\n\n### Code Examples\n- [ ] All `live_design!` examples parse correctly\n- [ ] All Rust code compiles\n- [ ] All patterns work as documented\n\n### API Accuracy\n- [ ] Widget names exist in makepad-widgets\n- [ ] Method signatures are correct\n- [ ] Event types are accurate\n```\n\n### Validation Prompt\n\n> \"Please validate makepad-skills against current Makepad version\"\n\n---\n\n## Version Adaptation\n\nProvide version-specific guidance for different Makepad branches.\n\n### Supported Versions\n\n| Branch | Status | Notes |\n|--------|--------|-------|\n| main | Stable | Production ready |\n| dev | Active | Latest features, may break |\n| rik | Legacy | Older API style |\n\n### Version Detection\n\nClaude should detect Makepad version from:\n\n1. **Cargo.toml branch reference**:\n   ```toml\n   makepad-widgets = { git = \"...\", branch = \"dev\" }\n   ```\n\n2. **Cargo.lock content**\n\n3. **Ask user if unclear**\n\n---\n\n## Personalization\n\nAdapt skill suggestions to project's coding style.\n\n### Style Detection\n\nClaude analyzes the current project to detect:\n\n| Aspect | Detection Method | Adaptation |\n|--------|------------------|------------|\n| Naming convention | Scan existing widgets | Match snake_case vs camelCase |\n| Code organization | Check module structure | Suggest matching patterns |\n| Comment style | Read existing comments | Match documentation style |\n| Widget complexity | Count lines per widget | Suggest appropriate patterns |\n\n---\n\n## Quality Guidelines\n\n### DO Add\n- Generic, reusable patterns\n- Common errors with clear solutions\n- Well-tested shader effects\n- Platform-specific gotchas\n- Performance optimizations\n\n### DON'T Add\n- Project-specific code\n- Unverified solutions\n- Duplicate content\n- Incomplete examples\n- Personal preferences without rationale\n\n---\n\n## Skill File Locations\n\n```\nskills\u002F\n├── # === Core Skills (16) ===\n├── makepad-basics\u002F        ← Getting started, app structure\n├── makepad-dsl\u002F           ← DSL syntax, inheritance\n├── makepad-layout\u002F        ← Layout, sizing, alignment\n├── makepad-widgets\u002F       ← Widget components\n├── makepad-event-action\u002F  ← Event handling\n├── makepad-animation\u002F     ← Animation, states\n├── makepad-shaders\u002F       ← Shader basics\n├── makepad-platform\u002F      ← Platform support\n├── makepad-font\u002F          ← Font, typography\n├── makepad-splash\u002F        ← Splash scripting\n├── robius-app-architecture\u002F   ← App architecture patterns\n├── robius-widget-patterns\u002F    ← Widget reuse patterns\n├── robius-event-action\u002F       ← Custom actions\n├── robius-state-management\u002F   ← State persistence\n├── robius-matrix-integration\u002F ← Matrix SDK\n├── molykit\u002F               ← AI chat toolkit\n│\n├── # === Extended Skills (3) ===\n├── makepad-shaders\u002F ← Advanced shaders, SDF\n│   ├── _base\u002F             ← Official patterns\n│   └── community\u002F         ← Community contributions\n├── makepad-deployment\u002F    ← Build & packaging\n├── makepad-reference\u002F     ← Troubleshooting, code quality\n│\n├── # Note: Production patterns integrated into robius-* skills:\n├── # - Widget patterns → robius-widget-patterns\u002F_base\u002F\n├── # - State patterns → robius-state-management\u002F_base\u002F\n├── # - Async patterns → robius-app-architecture\u002F_base\u002F\n│\n└── evolution\u002F             ← Self-evolution system\n    ├── hooks\u002F             ← Auto-trigger hooks\n    ├── references\u002F        ← Detailed guides\n    └── templates\u002F         ← Contribution templates\n```\n\n---\n\n## Auto-Evolution Prompts\n\nUse these prompts to trigger self-evolution:\n\n### After Solving a Problem\n> \"This solution should be added to makepad-skills for future reference.\"\n\n### After Creating a Widget\n> \"This widget pattern is reusable. Let me add it to makepad-patterns.\"\n\n### After Debugging\n> \"This error and its fix should be documented in makepad-troubleshooting.\"\n\n### After Completing a Feature\n> \"Review what I learned and update makepad-skills if applicable.\"\n\n---\n\n## Continuous Improvement Checklist\n\nAfter each Makepad development session, consider:\n\n- [ ] Did I discover a new widget composition pattern?\n- [ ] Did I solve a tricky shader problem?\n- [ ] Did I encounter and fix a confusing error?\n- [ ] Did I find a better way to structure layouts?\n- [ ] Did I learn something about packaging\u002Fdeployment?\n- [ ] Would any of this help other Makepad developers?\n\nIf yes to any, evolve the appropriate skill!\n\n## References\n\n- [makepad-skills repository](https:\u002F\u002Fgithub.com\u002FZhangHanDong\u002Fmakepad-skills)\n- [Makepad documentation](https:\u002F\u002Fgithub.com\u002Fmakepad\u002Fmakepad)\n- [Project Robius](https:\u002F\u002Fgithub.com\u002Fproject-robius)\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,165,1786,"2026-05-16 13:17:14",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"4a83576e-a260-4e72-9b42-99f374fbefab","1.0.0","evolution.zip",4787,"uploads\u002Fskills\u002Fc89c1b15-ccc1-4d83-964f-c6a688b5cc91\u002Fevolution.zip","2b830af1b4196747f03b65b8604d30006c7052e03ed210202582edf0517d6c24","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":12390}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]