makepad-splash
它能做什么
Splash 是一种脚本语言,用于在 Makepad 环境中创建动态用户界面和自动化任务。它让 AI 能够实时生成和修改界面元素与工作流程。
适用场景
- ✓当你需要创建可以自动变化的用户界面脚本时。
- ✓用于在 Makepad 中自动完成重复性任务。
- ✓当你使用 `script!` 或 `cx.eval` 等命令动态运行代码时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/makepad-splash/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个 Splash 脚本,在屏幕上显示 “Hello, World!” 消息。”
每周 5 个新技能,1 分钟读完。
工作原理
Makepad 会直接在应用程序中执行 Splash 代码。你可以在 Rust 代码中使用 `script!` 将它嵌入其中,也可以用 `cx.eval` 实时运行它,从而创建或修改界面。
技术内容(原始 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/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:
- 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
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" },
…
常见问题
什么是 Makepad?
Makepad 是一个使用 Rust 编程语言构建应用程序的框架,可以帮你做出美观、快速的用户界面。
Rust 和 Splash 有什么区别?
Rust 是构建整个应用程序的主要语言,注重性能和安全性。Splash 则是一种更简单的语言,用于在 Makepad 中进行动态脚本编写和自动化,可以把它理解为应用里的“迷你程序”。
Splash 教程在哪里?
详细教程位于本地文件中,例如 `./references/splash-tutorial.md`。如果找不到,你可能需要更新 Makepad 的文档。
详情
作者的原始描述
CRITICAL: Use for Makepad Splash scripting language. Triggers on: splash language, makepad script, makepad scripting, script!, cx.eval, makepad dynamic, makepad AI, splash 语言, makepad 脚本
热度
- GitHub 星标
- 48k
- 排名
- #5155
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。