# makepad-2.0-dsl

Teaches agents Makepad 2.0 DSL syntax, Splash runtime scripts, property merging, and Rust widget registration.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 751
- Author: ZhangHanDong
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ZhangHanDong/makepad-skills/tree/HEAD/skills/makepad-2.0-dsl/SKILL.md
- Updated: 2026-04-07
- HTML: https://affpapa.org/en/nevibecode/skills/makepad-20-dsl

## What it does

Makepad 2.0 shifted from compile-time templates to runtime evaluation using Splash and the `script_mod!` macro. This skill directs coding assistants to apply the refreshed rules: colons replace equals signs, commas between siblings are dropped, and `:=` declares addressable widget instances. Those instances end up in object vectors and resolve via `id!` in Rust.

The guidance covers property merging mechanics. Using `+:` or dot paths modifies targeted fields without wiping existing borders or hover states. On the Rust side, structs tied to the script engine must include `#[source] source: ScriptObjectRef`. Registration sequence is critical: registering UI screens before their underlying widget modules will break initialization at runtime.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-dsl -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/makepad-2.0-dsl/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/makepad-2.0-dsl/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-dsl -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/makepad-2.0-dsl/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-dsl -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/makepad-2.0-dsl/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install ZhangHanDong/makepad-skills makepad-2.0-dsl
```

2. **Manually: put the files in place**
- File: `.github/skills/makepad-2.0-dsl/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-dsl -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/ZhangHanDong/makepad-skills --path skills/makepad-2.0-dsl
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/makepad-2.0-dsl/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-dsl -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ZhangHanDong/makepad-skills/tree/HEAD/skills/makepad-2.0-dsl/SKILL.md

## When to use it
- Migrate legacy `live_design!` layouts to Makepad 2.0 `script_mod!` blocks
- Apply partial style updates using `+:` without wiping default parameters
- Create addressable widget instances using `:=` for Rust lookup via `ids!`
- Sequence widget and UI module registrations correctly in Rust code

## Example prompts
- Convert this legacy Makepad component to the 2.0 script_mod! format
- Demonstrate how to update border radius using dot-path shorthand in Makepad 2.0
- Write a custom widget Rust struct definition using Script and ScriptHook derives

## Similar
- [frontend-design](https://affpapa.org/en/nevibecode/skills/frontend-design.md) — skill · 1025790 installs
- [design-taste-frontend](https://affpapa.org/en/nevibecode/skills/design-taste-frontend.md) — skill · 678700 installs
- [prototype](https://affpapa.org/en/nevibecode/skills/prototype.md) — skill · 986201 installs
- [hyperframes](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes.md) — skill · 1200000 installs
- [hyperframes-cli](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes-cli.md) — skill · 1300000 installs
- [webapp-testing](https://affpapa.org/en/nevibecode/skills/webapp-testing.md) — skill · 186758 installs

From the same set: [zhanghandong/makepad-skills](https://affpapa.org/en/nevibecode/by/zhanghandong/makepad-skills.md) — 14 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
