Skip to content
Skillpedia
Websites & UI (frontend)48k · #3531

makepad-basics

Helps your agent understand the basics and structure of a Makepad app. This is useful for starting new projects and learning how Makepad works.

What it does

Helps you get started building apps with Makepad, showing basic code structure and how to set up your project.

When to use it

  • ✓When you want to create your first Makepad app.
  • ✓To understand how to organize the initial app code.
  • ✓When setting up a new Makepad project.

Example of what to ask your AI

“How do I create a simple app in Makepad?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-basics/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-basics/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It generates the necessary starting code for a Makepad application, including the basic structure and dependency settings. It also explains how Makepad handles events and updates the interface.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill makepad-basics

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/makepad-basics/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

  • ./references/app-structure.md
  • ./references/event-handling.md

Obtain the required material from the declared upstream source, or from a user-provided installation of that source. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

Makepad Basics Skill

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

Check for updates: https://crates.io/crates/makepad-widgets

You are an expert at the Rust makepad-widgets crate. Help users by:

  • Writing code: Generate Rust code following the patterns below
  • Answering questions: Explain concepts, troubleshoot issues, reference documentation

When to Use

  • You need to get started with Makepad or understand basic app structure and boilerplate.
  • The task involves project setup, live_design!, app_main!, or first-screen application wiring.
  • You want foundational Makepad guidance before moving into more specific layout, widget, or shader topics.

Documentation

Refer to the local files for detailed documentation:

  • ./references/app-structure.md - Complete app boilerplate and structure
  • ./references/event-handling.md - Event handling patterns

IMPORTANT: Documentation Completeness Check

Before answering questions, Claude MUST:

  1. Read the relevant reference file(s) listed above
  2. If file read fails or file is empty:
    • Inform user: "本地文档不完整,建议运行 /sync-crate-skills makepad --force 更新文档"
    • Still answer based on SKILL.md patterns + built-in knowledge
  3. If reference file exists, incorporate its content into the answer

Key Patterns

1. Basic App Structure

use makepad_widgets::*;

live_design! {
    use link::theme::*;
    use link::shaders::*;
    use link::widgets::*;

    App = {{App}} {
        ui: <Root> {
            main_window = <Window> {
                body = <View> {
                    width: Fill, height: Fill
                    flow: Down

                    <Label> { text: "Hello Makepad!" }
                }
            }
        }
    }
}

app_main!(App);

#[derive(Live, LiveHook)]
pub struct App {
    #[live] ui: WidgetRef,
}

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

impl AppMain for App {
    fn handle_event(&mut self, cx: &mut Cx, event: &Event) {
        self.ui.handle_event(cx, event, &mut Scope::empty());
    }
}

2. Cargo.toml Setup

[package]
name = "my_app"
version = "0.1.0"
edition = "2024"

[dependencies]
makepad-widgets = { git = "https://github.com/makepad/makepad", branch = "dev" }

3. Handling Button Clicks

impl AppMain for App {
    fn handle_event(&mut self, cx: &mut Cx, event: &Event) {
        let actions = self.ui.handle_event(cx, event, &mut Scope::empty());

        if self.ui.button(id!(my_button)).clicked(&actions) {
            log!("Button clicked!");
        }
    }
}

4. Accessing and Modifying Widgets

// Get widget references
let label = self.ui.label(id!(my_label));
label.set_text("Updated text");

let input = self.ui.text_input(id!(my_input));
let text = input.text();

API Reference Table

Macro/Type Description Example
live_design! Defines UI in DSL live_design! { App = {{App}} { ... } }
app_main! Entry point macro app_main!(App);
#[derive(Live)] Derive live data #[derive(Live, LiveHook)]
WidgetRef Reference to UI tree #[live] ui: WidgetRef
Cx Context for rendering fn handle_event(&mut self, cx: &mut Cx, ...)
id!() Widget ID macro self.ui.button(id!(my_button))

Platform Setup

Platform Requirements
macOS Works out of the box
Windows Works out of the box

…

FAQ

What is `live_design!`?

It's a way to define your app's interface using a special language that Makepad understands. Changes made here appear instantly without needing to recompile the code.

What is `app_main!(App)`?

This marks the main entry point of your application, telling Makepad which code structure to use to start everything.

How does Makepad work on different systems?

Makepad is designed to work in many places: computers (Windows, macOS, Linux), phones (Android, iOS), and even the web. The same code runs on all of them.

Details

Original description by the author

CRITICAL: Use for Makepad getting started and app structure. Triggers on: makepad, makepad getting started, makepad tutorial, live_design!, app_main!, makepad project setup, makepad hello world, "how to create makepad app", makepad 入门, 创建 makepad 应用, makepad 教程, makepad 项目结构

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3531
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills