agentleFS
SageV1SageV1/makepad-skills/CLAUDE.md

makepad-skills

CLAUDE.md1 starsChanged 10 months agoMITView on GitHub

IMPORTANT: When you see a message starting with [makepad-skills] in the conversation, you MUST: → Call Skill(makepad-widgets) then Skill(makepad-layout) FIRST, then answer the question. For Makepad/Robius/MolyKit questions, use context detection and skill dependencies to load multiple related skills. When user intent matches these contexts, load the entire skill bundle: When loading a skill, automatically include its dependencies: For specific questions, match keywords to individual skills: Note: Production patterns are integrated into robius-* skills: - Widget patterns (modal, collapsible, drag-drop) →…

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    IMPORTANT: When you see a message starting with [makepad-skills] in the conversation, you MUST:

    line 5
  2. Distinctive:

    When user intent matches these contexts, load the entire skill bundle:

    line 25
  3. Distinctive:

    When loading a skill, automatically include its dependencies:

    line 36
  4. Distinctive:

    When creating Makepad projects:

    line 154

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Makepad Skills - Claude Instructions

CRITICAL: Hook-Based Skill Loading

IMPORTANT: When you see a message starting with [makepad-skills] in the conversation, you MUST:

  1. Read the routing instruction - e.g., [makepad-skills] Routing to: makepad-widgets makepad-layout
  2. Immediately call the Skill tool for EACH skill listed before doing anything else
  3. Do not skip this step - the skills contain essential Makepad knowledge

Example:

[makepad-skills] Routing to: makepad-widgets makepad-layout

→ Call Skill(makepad-widgets) then Skill(makepad-layout) FIRST, then answer the question.


Skill Routing

For Makepad/Robius/MolyKit questions, use context detection and skill dependencies to load multiple related skills.

Context Detection (Load Skill Bundles)

When user intent matches these contexts, load the entire skill bundle:

ContextTrigger KeywordsLoad These Skills
Full App Development"build app", "create app", "从零", "完整应用", "app architecture"makepad-basics, makepad-dsl, makepad-layout, makepad-widgets, makepad-event-action, robius-app-architecture
UI Design"ui design", "界面设计", "design ui"makepad-dsl, makepad-layout, makepad-widgets, makepad-animation, makepad-shaders
Widget/Component Creation"create widget", "创建组件", "自定义组件", "custom component"makepad-widgets, makepad-dsl, makepad-layout, makepad-animation, makepad-shaders, makepad-font, makepad-event-action
Production Patterns"best practice", "robrix pattern", "实际项目", "production"robius-app-architecture, robius-widget-patterns, robius-state-management, robius-event-action

Skill Dependencies (Auto-Load Related Skills)

When loading a skill, automatically include its dependencies:

Primary SkillAlso Load
makepad-widgetsmakepad-layout, makepad-dsl
makepad-animationmakepad-shaders
makepad-shadersmakepad-widgets
makepad-fontmakepad-widgets
robius-app-architecturemakepad-basics, makepad-event-action
robius-widget-patternsmakepad-widgets, makepad-layout
robius-event-actionmakepad-event-action

Single Skill Keywords (Fallback)

For specific questions, match keywords to individual skills:

KeywordsSkill
getting started, live_design!, app_main!makepad-basics
DSL syntax, inheritance, <Widget>, Foo = { }makepad-dsl
layout, Flow, Walk, padding, center, alignmakepad-layout
View, Button, Label, widgetmakepad-widgets
event, action, Hit, FingerDown, handle_eventmakepad-event-action
animator, state, transition, hovermakepad-animation
shader, draw_bg, Sdf2d, gradient, glowmakepad-shaders
platform, macOS, Android, iOS, WASMmakepad-platform
font, text, glyph, typographymakepad-font
splash, script, cx.evalmakepad-splash
Tokio, async, submit_async_requestrobius-app-architecture
apply_over, modal, collapsible, pagefliprobius-widget-patterns
custom action, MatchEvent, post_actionrobius-event-action
AppState, persistence, Scope::with_datarobius-state-management
Matrix SDK, sliding sync, MatrixRequestrobius-matrix-integration
BotClient, OpenAI, SSE streamingmolykit
deploy, package, APK, IPAmakepad-deployment
troubleshoot, error, debugmakepad-reference

Extended Skills

Note: Production patterns are integrated into robius-* skills:

  • Widget patterns (modal, collapsible, drag-drop) → robius-widget-patterns/_base/
  • State patterns (theme switching, state machine) → robius-state-management/_base/
  • Async patterns (streaming, tokio) → robius-app-architecture/_base/

Usage Examples

Full App Development (Bundle)

User: "我想从零开发一个 Makepad 应用"
-> Detect: Full app context
-> Load: makepad-basics, makepad-dsl, makepad-layout, makepad-widgets,
         makepad-event-action, robius-app-architecture
-> Answer with complete app structure, widgets, events, and async patterns

Widget Creation (Bundle)

User: "帮我创建一个自定义按钮组件"
-> Detect: Widget creation context
-> Load: makepad-widgets, makepad-dsl, makepad-layout, makepad-animation,
         makepad-shaders, makepad-font, makepad-event-action
-> Answer with widget structure, styling, animations, and event handling

Simple Question (Single + Dependencies)

User: "如何设置字体大小"
-> Match: makepad-font
-> Auto-load dependency: makepad-widgets
-> Load: makepad-font, makepad-widgets
-> Answer with text_style, font_size, and widget context

Production App (Bundle)

User: "参考 Robrix 的最佳实践"
-> Detect: Production context
-> Load: robius-app-architecture, robius-widget-patterns,
         robius-state-management, robius-event-action
         + dependencies: makepad-basics, makepad-widgets, makepad-layout, makepad-event-action
-> Answer with production-ready patterns from Robrix/Moly codebases

Key Patterns

Makepad Widget Definition

#[derive(Live, LiveHook, Widget)]
pub struct MyWidget {
    #[deref] view: View,
    #[live] property: f64,
    #[rust] internal_state: State,
    #[animator] animator: Animator,
}

Robius Async Pattern

// UI -> Async
submit_async_request(MatrixRequest::SendMessage { ... });

// Async -> UI
Cx::post_action(MessageSentAction { ... });
SignalToUI::set_ui_signal();

MolyKit Cross-Platform Async

// Platform-agnostic spawning
spawn(async move {
    let result = fetch_data().await;
    Cx::post_action(DataReady(result));
    SignalToUI::set_ui_signal();
});

Default Project Settings

When creating Makepad projects:

[package]
edition = "2024"

[dependencies]
makepad-widgets = { git = "https://github.com/makepad/makepad", branch = "dev" }

[features]
default = []
nightly = ["makepad-widgets/nightly"]

Source Codebases

For deeper reference, check these codebases:

  • Makepad: /path/to/makepad - Framework source
  • Robrix: /path/to/robrix - Matrix client example
  • Moly: /path/to/moly - AI chat example
  • MolyKit: /path/to/moly/moly-kit - AI chat toolkit

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.