Makepad 2.0 Migration logo

Makepad 2.0 Migration

Community
ZhangHanDong
makepad-2.0-migration

CRITICAL: Use for migrating from Makepad 1.x to 2.0. Triggers on: makepad migration, live_design to script_mod, makepad upgrade, makepad 1.x, old syntax, new syntax, makepad breaking changes, makepad 迁移, 旧语法, LiveHook to ScriptHook, apply_over to script_apply_eval, Live to Script, live_design!, angle brackets to curly braces

Overview

PublisherZhangHanDong
Repositorymakepad-skills
Skill namemakepad-2.0-migration
Stars
748
Forks
88
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZhangHanDong on GitHub. Read the source before you install it.

Installation

Install the Makepad 2.0 Migration AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ZhangHanDong/makepad-skills/tree/main/skills/makepad-2.0-migration
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZhangHanDong/makepad-skills.git /tmp/makepad-skills
mkdir -p .claude/skills
cp -r /tmp/makepad-skills/skills/makepad-2.0-migration .claude/skills/makepad-2.0-migration
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Makepad 2.0 Migration in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Makepad 2.0 Migration on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Makepad 2.0 Migration is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Makepad 1.x to 2.0 Migration Skill

Version: makepad-widgets (dev branch) | Last Updated: 2026-03-03

Overview

Makepad 2.0 is a fundamental architecture shift from compile-time static DSL to runtime scripting. Migration involves syntax changes, derive macro updates, lifecycle method renames, and new patterns for state management.

Documentation

Refer to the local files for detailed documentation:

  • ./references/migration-guide.md - Complete migration reference with examples

Quick Syntax Mapping Table

Makepad 1.xMakepad 2.0Notes
live_design! { ... }script_mod! { ... }Core macro change
<Widget> { ... }Widget{ ... }No angle brackets
Key = ValueKey: valueColon, not equals
(THEME_COLOR)theme.color_*Theme namespace
live_body: { ... }body +: { ... }Merge operator
#[derive(Live)]#[derive(Script)]Derive macro
#[derive(LiveHook)]#[derive(ScriptHook)]Lifecycle hooks
#[derive(Widget)]#[derive(Widget)]Unchanged
before_apply()on_before_apply()Method rename
after_apply()on_after_apply()Method rename
apply_over!()script_apply_eval!()Runtime updates
DefaultNoneDefaultEnum default
LiveRegisterWidgetRegisterWidget registration
live_register()register_widget(vm)Registration method
LiveIdLiveIdUnchanged

Step-by-Step Migration

Step 1: Replace Macro

rust
// OLD
live_design! {
    import makepad_widgets::base::*;
    import makepad_widgets::theme_desktop_dark::*;

    App = {{App}} {
        ui: <Root> { ... }
    }
}

// NEW
script_mod! {
    use mod.prelude.widgets.*

    startup() do #(App::script_component(vm)){
        ui: Root{
            // ... UI definition
        }
    }
}

Step 2: Update Derives

rust
// OLD
#[derive(Live, LiveHook, Widget)]
pub struct MyWidget { ... }

// NEW
#[derive(Script, ScriptHook, Widget)]
pub struct MyWidget { ... }

Step 3: Update App::run

rust
// OLD
impl LiveRegister for App {
    fn live_register(cx: &mut Cx) {
        makepad_widgets::live_design(cx);
    }
}

// NEW
impl App {
    fn run(vm: &mut ScriptVm) -> Self {
        crate::makepad_widgets::script_mod(vm);
        App::from_script_mod(vm, self::script_mod)
    }
}

Step 4: Rename Lifecycle Methods

rust
// OLD
impl LiveHook for MyWidget {
    fn before_apply(&mut self, cx: &mut Cx, ...) { ... }
    fn after_apply(&mut self, cx: &mut Cx, ...) { ... }
}

// NEW
impl ScriptHook for MyWidget {
    fn on_before_apply(&mut self, cx: &mut Cx, ...) { ... }
    fn on_after_apply(&mut self, cx: &mut Cx, ...) { ... }
}

Step 5: Update DSL Syntax

// OLD - angle brackets, equals signs
<View> {
    width: Fill, height: Fill
    show_bg: true
    draw_bg: { color: (THEME_BG) }

    title = <Label> {
        text: "Hello"
        draw_text: { color: #fff }
    }
}

// NEW - curly braces, colons, theme namespace
View{
    width: Fill height: Fill
    show_bg: true
    draw_bg.color: theme.color_bg_app

    title := Label{
        text: "Hello"
        draw_text.color: #fff
    }
}

Step 6: Replace apply_over with script_eval

rust
// OLD
self.label(id!(title)).apply_over(cx, live! {
    text: "New text"
});

// NEW
script_eval!(cx, {
    ui.title.set_text("New text")
});
// OR
script_apply_eval!(cx, self.ui, {
    title.text: "New text"
});

Key Breaking Changes

  1. No commas between properties (whitespace-delimited)
  2. No semicolons anywhere in Splash
  3. No angle brackets for widget types
  4. Theme constants use theme.* prefix, not (THEME_*) syntax
  5. Named children use := operator, not =
  6. Merge operator is +: not : for extending parent properties
  7. height: Fit is MANDATORY on containers (default is 0px, not auto)
  8. Registration happens in App::run, not live_register
  9. Field attribute #[source] links to script object (required on some widgets)
  10. Old old/ directory contains archived 1.x code for reference

Common Migration Mistakes

MistakeSymptomFix
Still using live_design!Compile errorReplace with script_mod!
Using <Widget> syntaxParse errorUse Widget{}
Using Key = ValueProperty not appliedUse Key: value
Using (THEME_COLOR)Unknown tokenUse theme.color_*
Missing height: FitContainer invisible (0px)Add height: Fit
Using Live deriveCompile errorUse Script
Using before_applyMethod not foundUse on_before_apply
Using commas between propsParse errorRemove commas

Best Practices for Migration

  1. Start with examples - Study examples/counter and examples/todo for 2.0 patterns
  2. Migrate one widget at a time - Don't try to convert everything at once
  3. Check the old/ directory - Compare old vs new widget implementations
  4. Test height: Fit - Most invisible UI is caused by missing height
  5. Use theme variables - Replace all hardcoded theme colors with theme.*
  6. Add new_batch: true - Any View with show_bg and text children needs it

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Makepad 2.0 Migration AI skill do?

CRITICAL: Use for migrating from Makepad 1.x to 2.0. Triggers on: makepad migration, live_design to script_mod, makepad upgrade, makepad 1.x, old syntax, new syntax, makepad breaking changes, makepad 迁移, 旧语法, LiveHook to ScriptHook, apply_over to script_apply_eval, Live to Script, live_design!, angle brackets to curly braces

Why use Makepad 2.0 Migration on TypingMind?

Because you install it once and use it with any model. Makepad 2.0 Migration is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Makepad 2.0 Migration in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZhangHanDong/makepad-skills/tree/main/skills/makepad-2.0-migration. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Makepad 2.0 Migration?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Makepad 2.0 Migration?

As many as you like. As long as a model supports skills, you can use Makepad 2.0 Migration with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Makepad 2.0 Migration AI skill free?

It is published on GitHub by ZhangHanDong. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇