Antigravity-awesome-skills makepad-basics
install
source · Clone the upstream repo
git clone https://github.com/sickn33/antigravity-awesome-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sickn33/antigravity-awesome-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/antigravity-awesome-skills-claude/skills/makepad-basics" ~/.claude/skills/sickn33-antigravity-awesome-skills-makepad-basics && rm -rf "$T"
manifest:
plugins/antigravity-awesome-skills-claude/skills/makepad-basics/SKILL.mdsource content
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!
, or first-screen application wiring.app_main! - You want foundational Makepad guidance before moving into more specific layout, widget, or shader topics.
Documentation
Refer to the local files for detailed documentation:
- Complete app boilerplate and structure./references/app-structure.md
- Event handling patterns./references/event-handling.md
IMPORTANT: Documentation Completeness Check
Before answering questions, Claude MUST:
- Read the relevant reference file(s) listed above
- 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
- Inform user: "本地文档不完整,建议运行
- 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 |
|---|---|---|
| Defines UI in DSL | |
| Entry point macro | |
| Derive live data | |
| Reference to UI tree | |
| Context for rendering | |
| Widget ID macro | |
Platform Setup
| Platform | Requirements |
|---|---|
| macOS | Works out of the box |
| Windows | Works out of the box |
| Linux | |
| Web | |
When Writing Code
- Always include required imports:
use makepad_widgets::*; - Use
macro for all UI definitionslive_design! - Implement
andLiveRegister
traitsAppMain - Use
macro for widget referencesid!() - Handle events through
methodhandle_event
When Answering Questions
- Emphasize live design - changes in DSL reflect instantly without recompilation
- Makepad is GPU-first - all rendering is shader-based
- Cross-platform: same code runs on Android, iOS, Linux, macOS, Windows, Web
- Recommend UI Zoo example for widget exploration
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.