Back to Skills
antigravityDocument Processing

evolution

This skill enables makepad-skills to self-improve continuously during development.

Documentation

Makepad Skills Evolution

This skill enables makepad-skills to self-improve continuously during development.

When to Use

  • You are maintaining makepad-skills and want the skill library to improve itself during development.
  • You need the workflow for deciding when a new pattern should become a skill update or hook-driven evolution.
  • You are working on self-correction, self-validation, or version adaptation for the skill set.

Quick Navigation

TopicDescription
Collaboration GuidelinesContributing to makepad-skills
Hooks SetupAuto-trigger evolution with hooks
When to EvolveTriggers and classification
Evolution ProcessStep-by-step guide
Self-CorrectionAuto-fix skill errors
Self-ValidationVerify skill accuracy
Version AdaptationMulti-branch support

Hooks-Based Auto-Triggering

For reliable automatic triggering, use Claude Code hooks. Install with --with-hooks:

# Install makepad-skills with hooks enabled
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
curl -fsSLo "$tmpdir/makepad-skills-install.sh" https://raw.githubusercontent.com/ZhangHanDong/makepad-skills/main/install.sh
sed -n '1,160p' "$tmpdir/makepad-skills-install.sh"
bash "$tmpdir/makepad-skills-install.sh" --with-hooks

This will install hooks to .claude/hooks/ and configure .claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "bash .claude/hooks/makepad-skill-router.sh"
          }
        ]
      }
    ],
    "PreToolUse": [
      {
        "matcher": "Bash|Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "bash .claude/hooks/pre-tool.sh"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "bash .claude/hooks/post-bash.sh"
          }
        ]
      }
    ]
  }
}

What Hooks Do

HookTrigger EventAction
makepad-skill-router.shUserPromptSubmitAuto-route to relevant skills
pre-tool.shBefore Bash/Write/EditDetect Makepad version from Cargo.toml
post-bash.shAfter Bash command failsDetect Makepad errors, suggest fixes
session-end.shSession endsPrompt to capture learnings

Skill Routing and Bundling

The makepad-skill-router.sh hook automatically loads relevant skills based on user queries.

Context Detection

ContextTrigger KeywordsSkills Loaded
Full App"build app", "从零", "完整应用"basics, dsl, layout, widgets, event-action, app-architecture
UI Design"ui design", "界面设计"dsl, layout, widgets, animation, shaders
Widget Creation"create widget", "创建组件", "自定义组件"widgets, dsl, layout, animation, shaders, font, event-action
Production"best practice", "robrix pattern", "实际项目"app-architecture, widget-patterns, state-management, event-action

Skill Dependencies

When loading certain skills, related skills are auto-loaded:

Primary SkillAuto-loads
robius-app-architecturemakepad-basics, makepad-event-action
robius-widget-patternsmakepad-widgets, makepad-layout
makepad-widgetsmakepad-layout, makepad-dsl
makepad-animationmakepad-shaders
makepad-shadersmakepad-widgets
makepad-fontmakepad-widgets
robius-event-actionmakepad-event-action

Example

User: "我想从零开发一个 Makepad 应用"

[makepad-skills] Detected Makepad/Robius query
[makepad-skills] App development context detected - loading skill bundle
[makepad-skills] Routing to: makepad-basics makepad-dsl makepad-event-action
                            makepad-layout makepad-widgets robius-app-architecture

When to Evolve

Trigger skill evolution when any of these occur during development:

TriggerTarget SkillPriority
New widget pattern discoveredrobius-widget-patterns/_baseHigh
Shader technique learnedmakepad-shadersHigh
Compilation error solvedmakepad-reference/troubleshootingHigh
Layout solution foundmakepad-reference/adaptive-layoutMedium
Build/packaging issue resolvedmakepad-deploymentMedium
New project structure insightmakepad-basicsLow
Core concept clarifiedmakepad-dsl/makepad-widgetsLow

Evolution Process

Step 1: Identify Knowledge Worth Capturing

Ask yourself:

  • Is this a reusable pattern? (not project-specific)
  • Did it take significant effort to figure out?
  • Would it help other Makepad developers?

Use Cases

  • You are maintaining `makepad-skills` and want the skill library to improve itself during development.
  • You need the workflow for deciding when a new pattern should become a skill update or hook-driven evolution.
  • You are working on self-correction, self-validation, or version adaptation for the skill set.