Agent skill · Audited from source
Makepad 2.0 App Structure
skill · ZhangHanDong/makepad-skillsLicence not declaredAudited 12 Oct 2026 · source 7cbc563d4f32
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 7cbc563d4f32 and found no filesystem, network or shell access and no hard-coded secrets. What it does: CRITICAL: Use for Makepad 2.0 app structure and Rust integration. Triggers on: makepad app, makepad getting started, app_main!, App::run, MatchEvent, AppMain, handle_event, handle_actions, ScriptVm, from_script_mod,…
Cite
Cite this page
ModelsAtlas. “Makepad 2.0 App Structure (ZhangHanDong/makepad-skills)”. Retrieved 12 Oct 2026. https://modelsatlas.com/skills/zhanghandong/makepad-2-0-app-structure
Trust audit
Audit 0.4.1 · source read 12 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 1 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass, no license.
Findings (1)
LOWInventory / provenanceinv.no_license
- Why
- no LICENSE file and no repo licence
- Fix
- add a licence
Audit 0.4.1 · source sha 7cbc563d4f32 · 12 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- PublisherZhangHanDong GitHub userOwner of the repository this skill is read from
- Source folderZhangHanDong/makepad-skills/skills/makepad-2.0-app-structureThe exact folder we audited
- LicenceNot declaredAs the repository states it
- Commit pinned for this verdict7cbc563d4f32A new audit runs when the source changes
- Repository statusNot archivedLast push 188 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: CRITICAL: Use for Makepad 2.0 app structure and Rust integration. Triggers on: makepad app, makepad getting started, app_main!, App::run, MatchEvent, AppMain, handle_event, handle_actions, ScriptVm, from_script_mod,…
---
name: makepad-2.0-app-structure
description: |
CRITICAL: Use for Makepad 2.0 app structure and Rust integration. Triggers on:
makepad app, makepad getting started, app_main!, App::run, MatchEvent,
AppMain, handle_event, handle_actions, ScriptVm, from_script_mod,
makepad boilerplate, makepad new project, makepad cargo, Cargo.toml setup,
hot reload, --hot, live reload, wasm deploy, cargo makepad, media plugin,
audio_output, audio_input, AudioBuffer, cx.audio, makepad audio, 音频,
应用结构, 入门, 新项目, 脚手架, 启动, 热重载, 部署
---
# Makepad 2.0 App Structure Skill
> **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-03-03
## Overview
A Makepad 2.0 app combines Rust code with Splash scripting. The Rust side handles app lifecycle, event routing, and business logic. The Splash side defines UI structure, templates, and inline interactions.
## Documentation
Refer to the local files for detailed documentation:
- `./references/app-boilerplate.md` - Complete working app template with Cargo.toml
- `./references/rust-splash-integration.md` - Rust ↔ Splash communication patterns
## IMPORTANT: Documentation Completeness Check
**Before answering questions, Claude MUST:**
1. Read the relevant reference file(s) listed above
2. If file read fails, answer based on SKILL.md patterns + built-in knowledge
---
## Minimal App Template
### Cargo.toml
```toml
[package]
name = "my-app"
version = "0.1.0"
edition = "2024"
[dependencies]
makepad-widgets = { path = "../path/to/makepad/widgets" }
```
### src/app.rs (or src/main.rs)
```rust
use makepad_widgets::*;
app_main!(App);
script_mod! {
use mod.prelude.widgets.*
let state = {
counter: 0
}
mod.state = state
startup() do #(App::script_component(vm)){
ui: Root{
on_startup: ||{
ui.main_view.render()
}
main_window := Window{
window.inner_size: vec2(420, 300)
body +: {
main_view := View{
width: Fill height: Fill
flow: Down spacing: 12
align: Center
on_render: ||{
Label{
text: "Count: " + state.counter
draw_text.text_style.font_size: 24
}
}
}
increment_button := Button{
text: "Increment"
}
}
}
}
}
}
impl App {
fn run(vm: &mut ScriptVm) -> Self {
crate::makepad_widgets::script_mod(vm);
App::from_script_mod(vm, self::script_mod)
}
}
#[derive(Script, ScriptHook)]
pub struct App {
#[live]
ui: WidgetRef,
}
impl MatchEvent for App {
fn handle_actions(&mut self, cx: &mut Cx, actions: &Actions) {
if self.ui.button(cx, ids!(increment_button)).clicked(actions) {
script_eval!(cx, {
mod.state.counter += 1
ui.main_view.render()
});
}
}
}
impl AppMain for App {
fn handle_event(&mut self, cx: &mut Cx, event: &Event) {
self.match_event(cx, event);
self.ui.handle_event(cx, event, &mut Scope::empty());
}
}
```
---
## Key Components Explained
### 1. `app_main!(App)`
Registers `App` as the application entry point. MUST be called at module level.
### 2. `script_mod! { ... }`
Defines the Splash script that runs at startup. Contains:
- `use mod.prelude.widgets.*` - Import widget definitions
- State definitions (`let state = {...}`)
- Functions and templates
- `startup() do #(App::script_component(vm)){...}` - UI construction
### 3. `App::run(vm)` - Initialization Order
**CRITICAL: Registration order matters!**
```rust
fn run(vm: &mut ScriptVm) -> Self {
// 1. Register theme (optional, for light/dark theme)
crate::makepad_widgets::theme_mod(vm);
script_eval!(vm, { mod.theme = mod.themes.light });
// 2. Register base widgets
crate::makepad_widgets::widgets_mod(vm);
// 3. Register custom widget modules (if any)
// crate::my_widgets::script_mod(vm);
// 4. Build app from script module
App::from_script_mod(vm, self::script_mod)
}
```
**Simplified (without theme selection):**
```rust
fn run(vm: &mut ScriptVm) -> Self {
crate::makepad_widgets::script_mod(vm); // Registers both theme + widgets
App::from_script_mod(vm, self::script_mod)
}
```
### 4. `#[derive(Script, ScriptHook)]` on App struct
```rust
#[derive(Script, ScriptHook)]
pub struct App {
#[live]
ui: WidgetRef, // The widget tree root
}
```
- `Script` - Enables Splash integration (replaces old `Live`)
- `ScriptHook` - Enables lifecycle hooks (replaces old `LiveHook`)
- `#[live]` - Field settable from DSL
### 5. `MatchEvent` for Action Handling
```rust
impl MatchEvent for App {
fn handle_actions(&mut self, cx: &mut Cx, actions: &Actions) {
// Check button clicks
if self.ui.button(cx, ids!(my_button)).clicked(actions) {
// Handle click
}
// Check text input changes
if let Some(text) = self.ui.text_input(cx, ids!(my_input)).changed(actions) {
log!("Input: {}", text);
}
}
}
```
### 6. `AppMain` for Event Dispatch
```rust
impl AppMain for App {
fn handle_event(&mut self, cx: &mut Cx, event: &Event) {
self.match_event(cx, event); // MUST call for MatchEvent to work
self.ui.handle_event(cx, event, &mut Scope::empty());
}
}
```
---
## Rust → Splash Communication
### script_eval! - Update state and trigger renders
```rust
script_eval!(cx, {
mod.state.counter += 1
ui.main_view.render()
});
```
### script_apply_eval! - Patch widget properties
```rust
script_apply_eval!(cx, self.ui, {
title.text: "New Title"
subtitle.draw_text.color: #f00
});
```
---
## Splash → Rust Communication
### InExcerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 7cbc563
git clone https://github.com/ZhangHanDong/makepad-skills git -C makepad-skills checkout 7cbc563d4f32
The author documents no install command, so this uses the repository directly. Our verdict covers commit 7cbc563d4f32 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
7cbc563d4f32
Similar skills
All coding & review skills →ZhangHanDong/makepad-skills
CRITICAL: Use for Makepad 2.0 animation system. Triggers on: makepad animation, makepad animator, Animator, AnimatorState, hover effect, makepad transition, animation state, Forward, Snap, Loop, ease function, makepad…
ZhangHanDong/makepad-skills
CRITICAL: Entry-level skill for Makepad 2.0 GUI development. This is the FIRST skill to load for any Makepad task — it provides design judgment anchors ABOVE the other 13 Makepad 2.0 skills. Triggers on: makepad,…
ZhangHanDong/makepad-skills
CRITICAL: Use for Makepad 2.0 DSL syntax and property system. Triggers on: makepad dsl, script_mod!, makepad syntax, makepad property, makepad 2.0 syntax, colon syntax, merge operator, named instance, let binding,…
ZhangHanDong/makepad-skills
CRITICAL: Use for Makepad 2.0 event and action handling. Triggers on: makepad event, makepad action, MatchEvent, handle_event, handle_actions, on_click, on_render, on_return, on_startup, script_eval!,…
ZhangHanDong/makepad-skills
CRITICAL: Use for Makepad 2.0 layout system. Triggers on: makepad layout, makepad width, makepad height, makepad flex, makepad flow, makepad padding, makepad margin, makepad spacing, makepad align, makepad sizing, Fill,…
ZhangHanDong/makepad-skills
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…
Questions about Makepad 2.0 App Structure
What does the Makepad 2.0 App Structure skill do?
Is Makepad 2.0 App Structure safe to install?
What can Makepad 2.0 App Structure access on my machine?
How current is this page?
Sources
- github.com/ZhangHanDong/makepad-skills/tree/main/skills/makepad- — the audited source at commit 7cbc563d4f32 and every finding aboveObserved · 12 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Makepad 2.0 App Structure skill do?
- Is Makepad 2.0 App Structure safe to install?
- What can Makepad 2.0 App Structure access on my machine?