[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-94f1b987-e5c6-40ac-bb36-977bea17245a":3,"$fu_NPferUHrsUn9FA0yGDuXfRGn79m7FacNmTiKZSMk8":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"94f1b987-e5c6-40ac-bb36-977bea17245a","makepad-splash","|","cat_life_career","mod_other","sickn33,other","---\nname: makepad-splash\ndescription: |\n  CRITICAL: Use for Makepad Splash scripting language. Triggers on:\n  splash language, makepad script, makepad scripting, script!, cx.eval,\n  makepad dynamic, makepad AI, splash 语言, makepad 脚本\nrisk: unknown\nsource: community\n---\n\n# Makepad Splash Skill\n\n> **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-01-19\n>\n> Check for updates: https:\u002F\u002Fcrates.io\u002Fcrates\u002Fmakepad-widgets\n\nYou are an expert at Makepad Splash scripting language. Help users by:\n- **Writing Splash scripts**: Dynamic UI and workflow automation\n- **Understanding Splash**: Purpose, syntax, and capabilities\n\n## When to Use\n- You need dynamic scripting inside Makepad using Splash.\n- The task involves `script!`, `cx.eval`, runtime-generated UI, or workflow automation in Makepad.\n- You want guidance on Splash syntax and purpose rather than static Rust-only patterns.\n\n## Documentation\n\nRefer to the local files for detailed documentation:\n- `.\u002Freferences\u002Fsplash-tutorial.md` - Splash language tutorial\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: \"本地文档不完整，建议运行 `\u002Fsync-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## What is Splash?\n\nSplash is Makepad's dynamic scripting language designed for:\n- AI-assisted workflows\n- Dynamic UI generation\n- Rapid prototyping\n- HTTP requests and async operations\n\n## Script Macro\n\n```rust\n\u002F\u002F Embed Splash code in Rust\nscript!{\n    fn main() {\n        let x = 10;\n        console.log(\"Hello from Splash!\");\n    }\n}\n```\n\n## Execution\n\n```rust\n\u002F\u002F Evaluate Splash code at runtime\ncx.eval(code_string);\n\n\u002F\u002F With context\ncx.eval_with_context(code, context);\n```\n\n## Basic Syntax\n\n### Variables\n\n```splash\nlet x = 10;\nlet name = \"Makepad\";\nlet items = [1, 2, 3];\nlet config = { width: 100, height: 50 };\n```\n\n### Functions\n\n```splash\nfn add(a, b) {\n    return a + b;\n}\n\nfn greet(name) {\n    console.log(\"Hello, \" + name);\n}\n```\n\n### Control Flow\n\n```splash\n\u002F\u002F If-else\nif x > 10 {\n    console.log(\"big\");\n} else {\n    console.log(\"small\");\n}\n\n\u002F\u002F Loops\nfor i in 0..10 {\n    console.log(i);\n}\n\nwhile condition {\n    \u002F\u002F ...\n}\n```\n\n## Built-in Objects\n\n### console\n\n```splash\nconsole.log(\"Message\");\nconsole.warn(\"Warning\");\nconsole.error(\"Error\");\n```\n\n### http\n\n```splash\n\u002F\u002F GET request\nlet response = http.get(\"https:\u002F\u002Fapi.example.com\u002Fdata\");\n\n\u002F\u002F POST request\nlet response = http.post(\"https:\u002F\u002Fapi.example.com\u002Fdata\", {\n    body: { key: \"value\" }\n});\n```\n\n### timer\n\n```splash\n\u002F\u002F Set timeout\ntimer.set(1000, fn() {\n    console.log(\"1 second passed\");\n});\n\n\u002F\u002F Set interval\nlet id = timer.interval(500, fn() {\n    console.log(\"tick\");\n});\n\n\u002F\u002F Clear timer\ntimer.clear(id);\n```\n\n## Widget Interaction\n\n```splash\n\u002F\u002F Access widgets\nlet button = ui.widget(\"my_button\");\nbutton.set_text(\"Click Me\");\nbutton.set_visible(true);\n\n\u002F\u002F Listen to events\nbutton.on_click(fn() {\n    console.log(\"Button clicked!\");\n});\n```\n\n## Async Operations\n\n```splash\n\u002F\u002F Async function\nasync fn fetch_data() {\n    let response = await http.get(\"https:\u002F\u002Fapi.example.com\");\n    return response.json();\n}\n\n\u002F\u002F Call async\nfetch_data().then(fn(data) {\n    console.log(data);\n});\n```\n\n## AI Workflow Integration\n\nSplash is designed for AI-assisted development:\n\n```splash\n\u002F\u002F Dynamic UI generation\nfn create_form(fields) {\n    let form = ui.create(\"View\");\n    for field in fields {\n        let input = ui.create(\"TextInput\");\n        input.set_label(field.label);\n        form.add_child(input);\n    }\n    return form;\n}\n\n\u002F\u002F AI can generate this dynamically\ncreate_form([\n    { label: \"Name\" },\n    { label: \"Email\" },\n    { label: \"Message\" }\n]);\n```\n\n## Use Cases\n\n1. **Rapid Prototyping**: Quickly test UI layouts without recompilation\n2. **AI Agents**: Let AI generate and modify UI dynamically\n3. **Configuration**: Runtime configuration of app behavior\n4. **Scripted Workflows**: Automate repetitive tasks\n5. **Plugin System**: Extend app functionality with scripts\n\n## When Answering Questions\n\n1. Splash is for dynamic\u002Fruntime scripting, not core app logic\n2. Use Rust for performance-critical code, Splash for flexibility\n3. Splash syntax is similar to JavaScript\u002FRust hybrid\n4. Scripts run in a sandboxed environment\n5. HTTP and timer APIs enable async operations\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.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,215,511,"2026-05-16 13:27:43",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"547b1830-6ccc-43a6-a8ac-8ca1469e300a","1.0.0","makepad-splash.zip",2393,"uploads\u002Fskills\u002F94f1b987-e5c6-40ac-bb36-977bea17245a\u002Fmakepad-splash.zip","6d567fdfae0b1db25f609970be63dababfc29f60c85cc3ccd50ecc1ba7bbabb0","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":4834}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]