makepad-2.0-app-structure — Claude Code skill: Makepad 2.0 app layout
Walks you through the skeleton of a Makepad 2.0 app: Rust entry point, Splash markup, event handling and hot reload.
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure -a claude-codeWhat makepad-2.0-app-structure does
The skill explains how a Makepad 2.0 app is put together and how the Rust side talks to Splash. It ships a minimal template: a Cargo.toml, an entry point registered with app_main!(App), a script_mod! block that builds the UI, and an App struct carrying the Script and ScriptHook derives. Separate sections cover the registration order inside App::run, action handling with MatchEvent, and event dispatch through AppMain.
It also covers the other direction. Rust updates Splash state with script_eval! and patches widget properties with script_apply_eval!, while markup calls handlers such as on_click and on_render. Widgets are reached by id: buttons, labels, text inputs, and nested paths like container.inner.title.
Two local reference files hold the details — ./references/app-boilerplate.md and ./references/rust-splash-integration.md. Skip them and answers fall back to the patterns in SKILL.md, which is where the registration order gets easy to mix up. That order matters because widgets have to be registered before the app is built from the script module. You run the app with cargo run -p my-app, add --hot for hot reload, and Splash edits apply without recompiling.
What it helps with
- scaffold a fresh Makepad 2.0 app
- wire Rust code to Splash markup
- catch a button click and update state
- run the app with hot reload
- get the widget and theme registration order right
Example prompts for the agent
- Show me the minimal Makepad 2.0 app template with Cargo.toml and app_main!
- How do I handle a button click in Makepad 2.0 and update the counter with script_eval!?
- Explain the registration order in App::run and why MatchEvent is needed
How to install makepad-2.0-app-structure
1Skills CLI (Vercel)
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure -a claude-code2Manually: put the files in place
~/.claude/skills/makepad-2.0-app-structure/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/makepad-2.0-app-structure/
1Skills CLI (Vercel)
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure -a codex2Manually: put the files in place
.agents/skills/makepad-2.0-app-structure/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure -a cursor2Manually: put the files in place
.cursor/skills/makepad-2.0-app-structure/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ZhangHanDong/makepad-skills makepad-2.0-app-structure2Manually: put the files in place
.github/skills/makepad-2.0-app-structure/SKILL.md1Skills CLI (Vercel)
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure -a gemini-cli2Platform CLI
gemini skills install https://github.com/ZhangHanDong/makepad-skills --path skills/makepad-2.0-app-structureManually: put the files in place
.devin/skills/makepad-2.0-app-structure/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about makepad-2.0-app-structure
How do I install makepad-2.0-app-structure in Claude?
Run npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure -a claude-code. The skill file then lands at ~/.claude/skills/makepad-2.0-app-structure/SKILL.md.
What does makepad-2.0-app-structure do?
It covers Makepad 2.0 app structure: the entry point, Splash markup, event handling, and data passing between Rust and the script.
What does the skill need to answer accurately?
It tells the agent to read ./references/app-boilerplate.md and ./references/rust-splash-integration.md first. If those reads fail, answers fall back to the patterns in SKILL.md.