{"id":"38656fce-1930-45fa-a9a3-bf6308193198","shortId":"mg2BgV","kind":"skill","title":"makepad-dsl","tagline":"CRITICAL: Use for Makepad DSL syntax and inheritance. Triggers on:\nmakepad dsl, live_design, makepad inheritance, makepad prototype,\n\"<Widget>\", \"Foo = { }\", makepad object, makepad property,\nmakepad DSL 语法, makepad 继承, makepad 原型, 如何定义 makepad 组件","description":"# Makepad DSL Skill\n\n> **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-01-19\n>\n> Check for updates: https://crates.io/crates/makepad-widgets\n\nYou are an expert at the Rust `makepad-widgets` crate DSL. Help users by:\n- **Writing code**: Generate DSL code following the patterns below\n- **Answering questions**: Explain DSL syntax, inheritance, property overriding\n\n## When to Use\n- You need help with Makepad `live_design!` syntax, object definitions, or inheritance patterns.\n- The task involves widget declarations, property overrides, prototypes, or DSL composition rules.\n- You want Makepad DSL-specific examples rather than generic Rust syntax advice.\n\n## Documentation\n\nRefer to the local files for detailed documentation:\n- `./references/dsl-syntax.md` - Complete DSL syntax reference\n- `./references/inheritance.md` - Inheritance patterns and examples\n\n## IMPORTANT: Documentation Completeness Check\n\n**Before answering questions, Claude MUST:**\n\n1. Read the relevant reference file(s) listed above\n2. If file read fails or file is empty:\n   - Inform user: \"本地文档不完整，建议运行 `/sync-crate-skills makepad --force` 更新文档\"\n   - Still answer based on SKILL.md patterns + built-in knowledge\n3. If reference file exists, incorporate its content into the answer\n\n## Key Patterns\n\n### 1. Anonymous Object\n\n```rust\n{\n    width: 100.0\n    height: 50.0\n    color: #FF0000\n}\n```\n\n### 2. Named Object (Prototype)\n\n```rust\nMyButton = {\n    width: Fit\n    height: 40.0\n    padding: 10.0\n    draw_bg: { color: #333333 }\n}\n```\n\n### 3. Inheritance with Override\n\n```rust\nPrimaryButton = <MyButton> {\n    draw_bg: { color: #0066CC }  // Override parent color\n    draw_text: { color: #FFFFFF }  // Add new property\n}\n```\n\n### 4. Widget Instantiation\n\n```rust\n<View> {\n    // Inherits from View prototype\n    width: Fill\n    height: Fill\n\n    <Button> { text: \"Click Me\" }  // Child widget\n    <Label> { text: \"Hello\" }      // Another child\n}\n```\n\n### 5. Linking Rust Struct to DSL\n\n```rust\n// In live_design!\nMyWidget = {{MyWidget}} {\n    // DSL properties\n    width: 100.0\n}\n\n// In Rust\n#[derive(Live, LiveHook, Widget)]\npub struct MyWidget {\n    #[deref] view: View,\n    #[live] width: f64,\n}\n```\n\n## DSL Syntax Reference\n\n| Syntax | Description | Example |\n|--------|-------------|---------|\n| `{ ... }` | Anonymous object | `{ width: 100.0 }` |\n| `Name = { ... }` | Named prototype | `MyStyle = { color: #FFF }` |\n| `<Name> { ... }` | Inherit from prototype | `<MyStyle> { size: 10.0 }` |\n| `{{RustType}}` | Link to Rust struct | `App = {{App}} { ... }` |\n| `name = <Widget>` | Named child widget | `btn = <Button> { }` |\n| `dep(\"...\")` | Resource dependency | `dep(\"crate://self/img.png\")` |\n\n## Property Types\n\n| Type | Example | Description |\n|------|---------|-------------|\n| Number | `width: 100.0` | Float value |\n| Color | `color: #FF0000FF` | RGBA hex color |\n| String | `text: \"Hello\"` | Text string |\n| Enum | `flow: Down` | Enum variant |\n| Size | `width: Fit` | Fit, Fill, or numeric |\n| Object | `padding: { top: 10.0 }` | Nested object |\n| Array | `labels: [\"A\", \"B\"]` | List of values |\n\n## Inheritance Rules\n\n1. **Eager Copy**: All parent properties are copied immediately\n2. **Override**: Child can override any parent property\n3. **Extend**: Child can add new properties\n4. **Nested Override**: Override nested objects partially\n\n```rust\nParent = {\n    a: 1\n    nested: { x: 10, y: 20 }\n}\n\nChild = <Parent> {\n    a: 2              // Override a\n    b: 3              // Add new property\n    nested: { x: 30 } // Override only x, y remains 20\n}\n```\n\n## When Writing Code\n\n1. Use `<Widget>` syntax to inherit from built-in widgets\n2. Define reusable styles as named prototypes\n3. Use `{{RustType}}` to link DSL to Rust structs\n4. Override only properties that need to change\n5. Use meaningful names for child widget references\n\n## When Answering Questions\n\n1. Explain inheritance as \"eager copy\" - properties are copied at definition time\n2. Emphasize that DSL is embedded in Rust via `live_design!` macro\n3. Highlight that changes to DSL are live-reloaded without recompilation\n4. Distinguish between named objects (prototypes) and widget instances\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.","tags":["makepad","dsl","antigravity","awesome","skills","sickn33","agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows"],"capabilities":["skill","source-sickn33","skill-makepad-dsl","topic-agent-skills","topic-agentic-skills","topic-ai-agent-skills","topic-ai-agents","topic-ai-coding","topic-ai-workflows","topic-antigravity","topic-antigravity-skills","topic-claude-code","topic-claude-code-skills","topic-codex-cli","topic-codex-skills"],"categories":["antigravity-awesome-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/sickn33/antigravity-awesome-skills/makepad-dsl","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add sickn33/antigravity-awesome-skills","source_repo":"https://github.com/sickn33/antigravity-awesome-skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 34726 github stars · SKILL.md body (4,490 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-23T12:51:12.451Z","embedding":null,"createdAt":"2026-04-18T21:40:23.516Z","updatedAt":"2026-04-23T12:51:12.451Z","lastSeenAt":"2026-04-23T12:51:12.451Z","tsv":"'-01':49 '-19':50 '/crates/makepad-widgets':56 '/references/dsl-syntax.md':139 '/references/inheritance.md':144 '/sync-crate-skills':180 '0066cc':242 '1':158,207,391,425,453,498 '10':428 '10.0':228,325,379 '100.0':212,289,314,350 '2':167,217,400,433,463,510 '20':430,449 '2026':48 '3':194,233,408,437,470,522 '30':443 '333333':232 '4':253,415,479,534 '40.0':226 '5':274,487 '50.0':214 'add':250,412,438 'advic':129 'anonym':208,311 'anoth':272 'answer':81,154,185,204,496 'app':331,332 'array':382 'ask':576 'b':385,436 'base':186 'bg':230,240 'boundari':584 'branch':45 'btn':337 'built':191,460 'built-in':190,459 'chang':486,525 'check':51,152 'child':268,273,335,402,410,431,492 'clarif':578 'claud':156 'clear':551 'click':266 'code':73,76,452 'color':215,231,241,245,248,319,353,354,358 'complet':140,151 'composit':115 'content':201 'copi':393,398,503,506 'crate':67 'crates.io':55 'crates.io/crates/makepad-widgets':54 'criteria':587 'critic':4 'declar':109 'defin':464 'definit':101,508 'dep':338,341 'depend':340 'deref':299 'deriv':292 'describ':555 'descript':309,347 'design':17,98,283,520 'detail':137 'dev':44 'distinguish':535 'document':130,138,150 'draw':229,239,246 'dsl':3,8,15,28,38,68,75,84,114,121,141,279,286,305,475,513,527 'dsl-specif':120 'eager':392,502 'embed':515 'emphas':511 'empti':175 'enum':364,367 'environ':567 'environment-specif':566 'exampl':123,148,310,346 'exist':198 'expert':60,572 'explain':83,499 'extend':409 'f64':304 'fail':171 'ff0000':216 'ff0000ff':355 'fff':320 'ffffff':249 'file':135,163,169,173,197 'fill':262,264,373 'fit':224,371,372 'float':351 'flow':365 'follow':77 'foo':22 'forc':182 'generat':74 'generic':126 'height':213,225,263 'hello':271,361 'help':69,94 'hex':357 'highlight':523 'immedi':399 'import':149 'incorpor':199 'inform':176 'inherit':11,19,86,103,145,234,257,321,389,457,500 'input':581 'instanc':542 'instanti':255 'involv':107 'key':205 'knowledg':193 'label':383 'last':46 'limit':543 'link':275,327,474 'list':165,386 'live':16,97,282,293,302,519,530 'live-reload':529 'livehook':294 'local':134 'macro':521 'makepad':2,7,14,18,20,23,25,27,30,32,35,37,42,65,96,119,181 'makepad-dsl':1 'makepad-widget':41,64 'match':552 'meaning':489 'miss':589 'must':157 'mybutton':222 'mystyl':318 'mywidget':284,285,298 'name':218,315,316,333,334,468,490,537 'need':93,484 'nest':380,416,419,426,441 'new':251,413,439 'number':348 'numer':375 'object':24,100,209,219,312,376,381,420,538 'output':561 'overrid':88,111,236,243,401,404,417,418,434,444,480 'pad':227,377 'parent':244,395,406,423 'partial':421 'pattern':79,104,146,189,206 'permiss':582 'primarybutton':238 'properti':26,87,110,252,287,343,396,407,414,440,482,504 'prototyp':21,112,220,260,317,323,469,539 'pub':296 'question':82,155,497 'rather':124 'read':159,170 'recompil':533 'refer':131,143,162,196,307,494 'relev':161 'reload':531 'remain':448 'requir':580 'resourc':339 'reusabl':465 'review':573 'rgba':356 'rule':116,390 'rust':63,127,210,221,237,256,276,280,291,329,422,477,517 'rusttyp':326,472 'safeti':583 'scope':554 'self/img.png':342 'size':324,369 'skill':39,546 'skill-makepad-dsl' 'skill.md':188 'source-sickn33' 'specif':122,568 'still':184 'stop':574 'string':359,363 'struct':277,297,330,478 'style':466 'substitut':564 'success':586 'syntax':9,85,99,128,142,306,308,455 'task':106,550 'test':570 'text':247,265,270,360,362 'time':509 'top':378 'topic-agent-skills' 'topic-agentic-skills' 'topic-ai-agent-skills' 'topic-ai-agents' 'topic-ai-coding' 'topic-ai-workflows' 'topic-antigravity' 'topic-antigravity-skills' 'topic-claude-code' 'topic-claude-code-skills' 'topic-codex-cli' 'topic-codex-skills' 'treat':559 'trigger':12 'type':344,345 'updat':47,53 'use':5,91,454,471,488,544 'user':70,177 'valid':569 'valu':352,388 'variant':368 'version':40 'via':518 'view':259,300,301 'want':118 'widget':43,66,108,254,269,295,336,462,493,541 'width':211,223,261,288,303,313,349,370 'without':532 'write':72,451 'x':427,442,446 'y':429,447 '原型':33 '如何定义':34 '建议运行':179 '更新文档':183 '本地文档不完整':178 '组件':36 '继承':31 '语法':29","prices":[{"id":"68952938-fdcc-4b49-b139-1b0e2d1fb5af","listingId":"38656fce-1930-45fa-a9a3-bf6308193198","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"sickn33","category":"antigravity-awesome-skills","install_from":"skills.sh"},"createdAt":"2026-04-18T21:40:23.516Z"}],"sources":[{"listingId":"38656fce-1930-45fa-a9a3-bf6308193198","source":"github","sourceId":"sickn33/antigravity-awesome-skills/makepad-dsl","sourceUrl":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/makepad-dsl","isPrimary":false,"firstSeenAt":"2026-04-18T21:40:23.516Z","lastSeenAt":"2026-04-23T12:51:12.451Z"}],"details":{"listingId":"38656fce-1930-45fa-a9a3-bf6308193198","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"sickn33","slug":"makepad-dsl","github":{"repo":"sickn33/antigravity-awesome-skills","stars":34726,"topics":["agent-skills","agentic-skills","ai-agent-skills","ai-agents","ai-coding","ai-workflows","antigravity","antigravity-skills","claude-code","claude-code-skills","codex-cli","codex-skills","cursor","cursor-skills","developer-tools","gemini-cli","gemini-skills","kiro","mcp","skill-library"],"license":"mit","html_url":"https://github.com/sickn33/antigravity-awesome-skills","pushed_at":"2026-04-23T06:41:03Z","description":"Installable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.","skill_md_sha":"7864d3dce07be93fb0b42f051f85dde8ef4f01e8","skill_md_path":"skills/makepad-dsl/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/makepad-dsl"},"layout":"multi","source":"github","category":"antigravity-awesome-skills","frontmatter":{"name":"makepad-dsl","description":"CRITICAL: Use for Makepad DSL syntax and inheritance. Triggers on:\nmakepad dsl, live_design, makepad inheritance, makepad prototype,\n\"<Widget>\", \"Foo = { }\", makepad object, makepad property,\nmakepad DSL 语法, makepad 继承, makepad 原型, 如何定义 makepad 组件"},"skills_sh_url":"https://skills.sh/sickn33/antigravity-awesome-skills/makepad-dsl"},"updatedAt":"2026-04-23T12:51:12.451Z"}}