$npx -y skills add molefrog/moi --skill moi-workspaceThe moi workspace — the web UI the user chats from, extended with agent-authored applets (widgets, views) plus theme & config. Read this FIRST in two cases. (a) A message carries a hidden <moi-context>…</moi-context> envelope: it was fired from a moi workspace, so you are running
| 1 | # Workspace |
| 2 | |
| 3 | You are working inside a **moi workspace**. It is a web UI that the user communicates with you |
| 4 | through. It has regular chat (this one), as well as custom UI elements that you can define, write, |
| 5 | and change to tailor the workspace to user needs. It starts with a simple chat, but evolves into a |
| 6 | personal app equipped with a copilot (you). Workspace is a two-way communication: you can build the |
| 7 | UI, user can interact with it, send feedback, modify state, then talk back to you. It's a shared UI |
| 8 | that you and user work together in. |
| 9 | |
| 10 | Workspace features/pages: |
| 11 | |
| 12 | - "Widgets" - small reusable full-stack components displayed on the widgets page (dashboard). For |
| 13 | overview, quick info, status or quick actions. |
| 14 | - "Scratchpad" - a shared low-fi canvas for prototyping, working on ideas together, visualising |
| 15 | concepts. Read `SCRATCHPAD.md` before building on or modifying it. |
| 16 | - "Views" - full-stack embedded apps for bigger work, consume more space, live in their own tab. |
| 17 | |
| 18 | User can switch between these, but can access the chat (this conversation and other chats) from |
| 19 | **any place in the app** (copilot mode), or on a dedicated page. |
| 20 | |
| 21 | Workspace settings and customisation: |
| 22 | |
| 23 | - "Config": set name, icon, change other settings. User can modify these from the UI and you can do |
| 24 | it via the `moi config` command. Call `moi config --help` for further docs. |
| 25 | - "Theme": customize workspace fonts, colors, visual appearance. User can modify these from the UI |
| 26 | and you can do it via the `moi theme` command. Call `moi theme --help` for further docs. |
| 27 | |
| 28 | # Glossary |
| 29 | |
| 30 | "Workspace" or "Moi Workspace" — the web UI that the user works in, talks/collaborates with you, |
| 31 | sees and interacts with "Applets". |
| 32 | |
| 33 | "Project" - the primary working folder _you_ (as an agent) work in. Managed by your harness; moi |
| 34 | does not have a clear definition, but assumes this is the root folder in which it stores its state |
| 35 | files. |
| 36 | |
| 37 | "Chat" — a workspace is driven through agent conversations (this chat is one). Depending on your |
| 38 | harness (Claude Code, openclaw, others differ in the details) there can be **multiple chats**, but |
| 39 | they all share **one** workspace **and one Project folder** — the same filesystem, the same `.moi` |
| 40 | folder, applets, config, and theme. Anything you build is visible to every chat, and another chat |
| 41 | may have changed the workspace or the Project files since you last looked. Treat `.moi` and the |
| 42 | Project folder as shared state, not yours alone. Internally, "chats" are sometimes aliased as |
| 43 | "threads" — "chat" is product language, while "thread" is reserved for internal SDK, session, and |
| 44 | persistence concepts. |
| 45 | |
| 46 | "Applets" are standalone full-stack components that _you_ write and maintain. They extend the |
| 47 | Workspace UI. |
| 48 | |
| 49 | "Applet Type" (one of) |
| 50 | |
| 51 | - "Widgets" (live in the dashboard page) |
| 52 | - "Views" are custom full-size pages that user can switch between. |
| 53 | |
| 54 | "Moi CLI" — the globally installed `moi` command that you use to build applets, customize, and send |
| 55 | events to "Workspace". |
| 56 | |
| 57 | # Where moi lives in filesystem |
| 58 | |
| 59 | Source of truth - `.moi` folder in the root of "Project" folder. Contains source code of all |
| 60 | Applets, bundled code, settings, etc. Can be committed to version control. Folder is partially |
| 61 | initialised when Workspace starts, you have full ownership of it. |
| 62 | |
| 63 | You _do have_ access to the files in the root of Project — you can reference and load them from the |
| 64 | "Applets" and elsewhere. |
| 65 | |
| 66 | Folder structure: |
| 67 | |
| 68 | ``` |
| 69 | my-agent-folder/ |
| 70 | .moi/ |
| 71 | widgets/ <- source code of Widget React components |
| 72 | total-users.tsx |
| 73 | rps-chart.tsx |
| 74 | server-metrics.server.ts <- Server-side async functions the widget can call (optional) |
| 75 | ... |
| 76 | views/ |
| 77 | users.tsx |
| 78 | crm.tsx |
| 79 | users-api.server.ts <- Server-side async functions the view can call (optional) |
| 80 | ... |
| 81 | package.json <- Applet dependencies that you manage |
| 82 | .workspace.json <- Auto-generated. Do NOT read, edit, or `cat` this file. Use Moi CLI instead. |
| 83 | .scratchpad.json <- Scratchpad canvas snapshot. Internal — inspect only via `moi scratch read`, never open it. |
| 84 | .scratchpad/ <- Scratchpad image files. Internal — pull pixels via `moi scratch read-image`, never open it. |
| 85 | ``` |
| 86 | |
| 87 | # Build environment |
| 88 | |
| 89 | - Bun is the required dependency of moi, so it must be installed |
| 90 | - For package management **always** use bun |
| 91 | - package.json is scaffolded during init. You are free to install/remove/do whatever with packages. |
| 92 | - |