Chuyển đến nội dung
Skillpedia
Lập trình chung48k · #5155

makepad-splash

Skill này làm gì

Splash là ngôn ngữ kịch bản để tạo giao diện người dùng động và tự động hóa tác vụ trong môi trường Makepad. Nó cho phép AI tạo và chỉnh sửa các phần tử hình ảnh và quy trình theo thời gian thực.

Khi nào nên dùng

  • ✓Khi bạn cần script để tạo giao diện tự thay đổi.
  • ✓Khi bạn muốn tự động hóa các tác vụ lặp lại trong Makepad.
  • ✓Khi bạn dùng các lệnh như `script!` hoặc `cx.eval` để chạy mã động.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-splash/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một script Splash hiển thị dòng chữ 'Hello, World!' trên màn hình.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Makepad chạy mã Splash trực tiếp trong ứng dụng. Mã có thể được nhúng vào mã Rust bằng `script!`, hoặc chạy theo thời gian thực bằng `cx.eval` để tạo hoặc thay đổi giao diện.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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/splash-tutorial.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 Splash 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 Makepad Splash scripting language. Help users by:

  • Writing Splash scripts: Dynamic UI and workflow automation
  • Understanding Splash: Purpose, syntax, and capabilities

When to Use

  • You need dynamic scripting inside Makepad using Splash.
  • The task involves script!, cx.eval, runtime-generated UI, or workflow automation in Makepad.
  • You want guidance on Splash syntax and purpose rather than static Rust-only patterns.

Documentation

Refer to the local files for detailed documentation:

  • ./references/splash-tutorial.md - Splash language tutorial

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

What is Splash?

Splash is Makepad's dynamic scripting language designed for:

  • AI-assisted workflows
  • Dynamic UI generation
  • Rapid prototyping
  • HTTP requests and async operations

Script Macro

// Embed Splash code in Rust
script!{
    fn main() {
        let x = 10;
        console.log("Hello from Splash!");
    }
}

Execution

// Evaluate Splash code at runtime
cx.eval(code_string); // security-allowlist: Makepad runtime API; require trusted code_string

// With context
cx.eval_with_context(code, context);

Basic Syntax

Variables

let x = 10;
let name = "Makepad";
let items = [1, 2, 3];
let config = { width: 100, height: 50 };

Functions

fn add(a, b) {
    return a + b;
}

fn greet(name) {
    console.log("Hello, " + name);
}

Control Flow

// If-else
if x > 10 {
    console.log("big");
} else {
    console.log("small");
}

// Loops
for i in 0..10 {
    console.log(i);
}

while condition {
    // ...
}

Built-in Objects

console

console.log("Message");
console.warn("Warning");
console.error("Error");

http

// GET request
let response = http.get("https://api.example.com/data");

// POST request
let response = http.post("https://api.example.com/data", {
    body: { key: "value" }
});

timer

// Set timeout
timer.set(1000, fn() {
    console.log("1 second passed");
});

// Set interval
let id = timer.interval(500, fn() {
    console.log("tick");
});

// Clear timer
timer.clear(id);

Widget Interaction

// Access widgets
let button = ui.widget("my_button");
button.set_text("Click Me");
button.set_visible(true);

// Listen to events
button.on_click(fn() {
    console.log("Button clicked!");
});

Async Operations

// Async function
async fn fetch_data() {
    let response = await http.get("https://api.example.com");
    return response.json();
}

// Call async
fetch_data().then(fn(data) {
    console.log(data);
});

AI Workflow Integration

Splash is designed for AI-assisted development:

// Dynamic UI generation
fn create_form(fields) {
    let form = ui.create("View");
    for field in fields {
        let input = ui.create("TextInput");
        input.set_label(field.label);
        form.add_child(input);
    }
    return form;
}

// AI can generate this dynamically
create_form([
    { label: "Name" },

…
Câu hỏi thường gặp

Makepad là gì?

Makepad là framework để xây dựng ứng dụng với giao diện đẹp và nhanh, dùng ngôn ngữ lập trình Rust.

Khác nhau giữa Rust và Splash là gì?

Rust là ngôn ngữ chính để xây dựng toàn bộ ứng dụng, tập trung vào hiệu năng và độ an toàn. Splash là ngôn ngữ đơn giản hơn, dùng cho kịch bản động và tự động hóa bên trong Makepad, giống như một 'chương trình nhỏ' nằm trong ứng dụng.

Các hướng dẫn Splash ở đâu?

Hướng dẫn chi tiết nằm trong các file cục bộ như `./references/splash-tutorial.md`. Nếu không tìm thấy, bạn có thể cần cập nhật tài liệu Makepad.

Chi tiết

Mô tả gốc của tác giả

CRITICAL: Use for Makepad Splash scripting language. Triggers on: splash language, makepad script, makepad scripting, script!, cx.eval, makepad dynamic, makepad AI, splash 语言, makepad 脚本

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5155
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự