본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)48k · #5147

makepad-dsl

하는 일

이 도구는 Makepad 프레임워크에서 인터페이스를 만들 때 사용하는 특별한 언어(DSL)를 작성하고 이해하는 데 도움을 줍니다. 시각 요소가 어떻게 보이고 작동할지 정의할 수 있게 합니다.

사용하는 경우

  • ✓Makepad에서 특정 스타일의 새 버튼을 만들어야 할 때.
  • ✓Makepad의 시각 구성 요소가 다른 구성 요소의 특성을 어떻게 상속받는지 이해하려 할 때.
  • ✓Makepad 앱의 여러 요소에 재사용 가능한 패턴을 정의하고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-dsl/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“기본 Makepad 버튼을 상속받지만 글자는 흰색인 파란색 버튼을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 코드 예제와 문법 규칙을 사용해 Makepad DSL 코드를 생성하거나 설명합니다. 객체를 정의하는 방법, 다른 객체로부터 상속받는 방법, 그리고 이런 스타일을 Rust 코드와 연결하는 방법을 이해합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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/dsl-syntax.md
  • ./references/inheritance.md

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. 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 DSL 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 DSL. Help users by:

  • Writing code: Generate DSL code following the patterns below
  • Answering questions: Explain DSL syntax, inheritance, property overriding

When to Use

  • You need help with Makepad live_design! syntax, object definitions, or inheritance patterns.
  • The task involves widget declarations, property overrides, prototypes, or DSL composition rules.
  • You want Makepad DSL-specific examples rather than generic Rust syntax advice.

Documentation

Refer to the local files for detailed documentation:

  • ./references/dsl-syntax.md - Complete DSL syntax reference
  • ./references/inheritance.md - Inheritance patterns and examples

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. Anonymous Object

{
    width: 100.0
    height: 50.0
    color: #FF0000
}

2. Named Object (Prototype)

MyButton = {
    width: Fit
    height: 40.0
    padding: 10.0
    draw_bg: { color: #333333 }
}

3. Inheritance with Override

PrimaryButton = <MyButton> {
    draw_bg: { color: #0066CC }  // Override parent color
    draw_text: { color: #FFFFFF }  // Add new property
}

4. Widget Instantiation

<View> {
    // Inherits from View prototype
    width: Fill
    height: Fill

    <Button> { text: "Click Me" }  // Child widget
    <Label> { text: "Hello" }      // Another child
}

5. Linking Rust Struct to DSL

// In live_design!
MyWidget = {{MyWidget}} {
    // DSL properties
    width: 100.0
}

// In Rust
#[derive(Live, LiveHook, Widget)]
pub struct MyWidget {
    #[deref] view: View,
    #[live] width: f64,
}

DSL Syntax Reference

Syntax Description Example
{ ... } Anonymous object { width: 100.0 }
Name = { ... } Named prototype MyStyle = { color: #FFF }
<Name> { ... } Inherit from prototype <MyStyle> { size: 10.0 }
{{RustType}} Link to Rust struct App = {{App}} { ... }
name = <Widget> Named child widget btn = <Button> { }
dep("...") Resource dependency dep("crate://self/img.png")

Property Types

Type Example Description
Number width: 100.0 Float value
Color color: #FF0000FF RGBA hex color
String text: "Hello" Text string
Enum flow: Down Enum variant
Size width: Fit Fit, Fill, or numeric
Object padding: { top: 10.0 } Nested object
Array labels: ["A", "B"] List of values

Inheritance Rules

  1. Eager Copy: All parent properties are copied immediately
  2. Override: Child can override any parent property
  3. Extend: Child can add new properties
  4. Nested Override: Override nested objects partially
Parent = {
    a: 1
    nested: { x: 10, y: 20 }
}

Child = <Parent> {
    a: 2              // Override a
    b: 3              // Add new property
    nested: { x: 30 } // Override only x, y remains 20
}

…

자주 묻는 질문

‘live_design!’이란 무엇인가요?

Makepad DSL 코드를 프로젝트에 직접 넣을 수 있게 하는 Rust 매크로로, 시각 인터페이스를 더 쉽게 만들도록 합니다.

Makepad DSL에서 상속은 어떻게 작동하나요?

다른 언어와 비슷합니다. 새 스타일은 기존 스타일로부터 ‘상속’받아 그 속성을 복사하고, 이를 수정하거나 새 속성을 추가할 수 있습니다.

기존 요소의 색상을 바꿀 수 있나요?

네, 상위 스타일의 속성을 ‘오버라이드’해서 모습이나 동작을 바꿀 수 있습니다.

상세 정보

작성자의 원본 설명

CRITICAL: Use for Makepad DSL syntax and inheritance. Triggers on: makepad dsl, live_design, makepad inheritance, makepad prototype, "<Widget>", "Foo = { }", makepad object, makepad property, makepad DSL 语法, makepad 继承, makepad 原型, 如何定义 makepad 组件

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5147
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬