Skip to content
Skillpedia
General coding48k · #4027

robius-app-architecture

Helps your agent understand the structure of Robius applications. It recognizes specific architecture and code patterns.

What it does

This skill helps organize the code for applications built with the Makepad tool, especially those that need to handle time-consuming tasks (asynchronous). It teaches how to structure the application so the user interface remains responsive.

When to use it

  • ✓When building a Makepad application that connects to a server.
  • ✓When planning how different parts of the application will communicate.
  • ✓When following examples from applications like Robrix or Moly.

Example of what to ask your AI

“How can I structure my Makepad application to handle network requests efficiently?”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/robius-app-architecture/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/robius-app-architecture/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It defines a pattern where the user interface sends requests to a background processing area (using channels and Tokio). This area performs the time-consuming tasks and sends the results back to the user interface for updates.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill robius-app-architecture

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/robius-app-architecture/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from 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:

  • <support-root>/references/tokio-integration.md
  • <support-root>/references/channel-patterns.md
  • <support-root>/references/moly-async-patterns.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.

Robius App Architecture Skill

Best practices for structuring Makepad applications based on the Robrix and Moly codebases - production applications built with Makepad and Robius framework.

Source codebases:

  • Robrix: Matrix chat client - complex sync/async with background subscriptions
  • Moly: AI chat application - cross-platform (native + WASM) with streaming APIs

When to Use

Use this skill when:

  • Building a Makepad application with async backend integration
  • Designing sync/async communication patterns in Makepad
  • Structuring a Robius-style application
  • Keywords: robrix, robius, makepad app structure, async makepad, tokio makepad

Production Patterns

For production-ready async patterns, see the _base/ directory:

Pattern Description
08-async-loading Async data loading with loading states
09-streaming-results Incremental results with SignalToUI
13-tokio-integration Full tokio runtime integration

Core Architecture Pattern

┌─────────────────────────────────────────────────────────────┐
│                     UI Thread (Makepad)                     │
│  ┌─────────┐     ┌──────────┐     ┌──────────────────────┐ │
│  │   App   │────▶│ WidgetRef │────▶│ Widget Tree (View)  │ │
│  │ State   │     │    ui     │     │ Scope::with_data()  │ │
│  └────┬────┘     └──────────┘     └──────────────────────┘ │
│       │                                                     │
│       │ submit_async_request()                              │
│       ▼                                                     │
│  ┌─────────────────┐          ┌─────────────────────────┐  │
│  │ REQUEST_SENDER  │─────────▶│  Crossbeam SegQueue     │  │
│  │ (MPSC Channel)  │          │  (Lock-free Updates)    │  │
│  └─────────────────┘          └─────────────────────────┘  │
└───────────────────────────────────┬─────────────────────────┘
                                    │
                    SignalToUI::set_ui_signal()
                                    │
┌───────────────────────────────────┴─────────────────────────┐
│                   Tokio Runtime (Async)                      │
│  ┌──────────────────────────────────────────────────────┐   │
│  │           worker_task (Request Handler)               │   │
│  │  - Receives Request from UI                           │   │
│  │  - Spawns async tasks per request                     │   │
│  │  - Posts actions back via Cx::post_action()           │   │
│  └──────────────────────────────────────────────────────┘   │
│  ┌──────────────────────────────────────────────────────┐   │
│  │         Per-Item Subscriber Tasks                     │   │
│  │  - Listens to external data stream                    │   │
│  │  - Sends Update via crossbeam channel                 │   │
│  │  - Calls SignalToUI::set_ui_signal() to wake UI       │   │
│  └──────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘

App Structure

Top-Level App Definition

use makepad_widgets::*;

live_design! {
    use link::theme::*;
    use link::widgets::*;

    App = {{App}} {
        ui: <Root>{
            main_window = <Window> {
                window: {inner_size: vec2(1280, 800), title: "MyApp"},
                body = {
                    // Main content here
                }
            }
        }
    }
}

app_main!(App);

#[derive(Live)]
pub struct App {
    #[live] ui: WidgetRef,

…
FAQ

What are asynchronous tasks?

These are tasks that a program can start and then continue doing other things while waiting for them to finish, instead of freezing while waiting.

What is Makepad?

It is a tool for creating user interfaces for applications, particularly focused on performance and cross-platform compatibility.

Why does the user interface need to remain responsive?

So that the user can continue interacting with the application (clicking buttons, scrolling) while other longer tasks are being processed in the background.

Details

Original description by the author

CRITICAL: Use for Robius app architecture patterns. Triggers on: Tokio, async, submit_async_request, 异步, 架构, SignalToUI, Cx::post_action, worker task, app structure, MatchEvent, handle_startup

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#4027
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills