caffeine-app
БесплатноБез исполняемых скриптовНе проверенScaffold and build a complete Caffeine app (caffeine.ai) from scratch — the project layout, the caffeine.toml workspace + canister manifests, the mops.toml…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Caffeine App (build from scratch)
Caffeine (caffeine.ai) builds and hosts full-stack apps on the Internet Computer: a single Motoko backend canister plus a React/Vite frontend served as an assets canister. This skill teaches the exact project shape and the CLI build loop so you can produce a buildable Caffeine app from nothing.
This skill owns the project shape and the build workflow. It does NOT own the Motoko
language. Before you write or edit any backend code, fetch and follow the writing-motoko
skill: https://skills.internetcomputer.org/skills/writing-motoko/SKILL.md. That skill is
authoritative for actor syntax, stable state, mo:core, and compiler errors. This
skill only shows the minimal empty actor and where it lives.
When to use this skill
- Creating/scaffolding a new Caffeine app or caffeine.ai project from scratch.
- Writing or fixing
caffeine.toml(workspace or canister manifest) ormops.toml. - Running the caffeine CLI loop:
auth login,doctor,install,check,preview.
Do not use it for Motoko language details (use writing-motoko) or for raw IC/dfx/icp
deployment (use icp-cli). Caffeine apps are built and deployed through the caffeine
CLI and the caffeine.ai web app, not through dfx.
Critical facts
- There is no
caffeine init/caffeine new. "From scratch" means you create the files in this skill by hand, then run the build loop. (caffeine projects clone <id>only downloads an existing cloud project, andcaffeine projects import <zip>only unpacks a project archive such as one made bycaffeine export; neither is a greenfield scaffold.) - Exactly one backend canister, and it must be named
backend.mops.tomldeclares a single[canisters.backend]. - The frontend↔backend binding files are generated, never hand-written.
src/frontend/src/backend.tsandsrc/frontend/src/declarations/are produced bycaffeine-bindgenduring the build. Editing them is pointless — they are overwritten. - Deploying to a live URL is done in the caffeine.ai web app, not the CLI. The CLI
takes you as far as a built draft (
caffeine preview --build, which needs a cloudproject.id— see the build loop). There is nocaffeine deploy/publishcommand.
Prerequisites (run once)
# Install the CLI (public npm package). The binary is `caffeine`.
npm install -g @caffeineai/cli
# Authenticate against caffeine.ai. Opens a browser; without one (or with --device) it
# uses the device flow. On a host with no OS keychain (headless Linux, containers), add
# --insecure-storage to keep the token in ~/.caffeine/tokens.json (mode 0600) instead.
caffeine auth login
caffeine auth status
# Check the environment: Node, pnpm, mops, caffeine-bindgen, that you are logged in,
# and that the Caffeine API is reachable (installs what it can).
caffeine doctor --fix
If a global install is undesirable or fails, run every caffeine command through an
npx -y @caffeineai/cli@latest prefix instead — e.g. npx -y @caffeineai/cli@latest auth status.
caffeine doctor requires Node.js 20 or later (the template's engines field asks for
>=20.19.0) and checks pnpm, mops (2.13.0 or later), caffeine-bindgen, your login,
and whether the Caffeine API is reachable. With --fix it installs a missing pnpm, a
missing or outdated mops (ic-mops), and a missing caffeine-bindgen
(@caffeineai/bindgen) with npm install -g; it does not install Node.js. It does
not install the Motoko compiler (moc) or linter (lintoko): mops fetches those
automatically from the [toolchain] pins in mops.toml. On Windows, compiling Motoko
requires WSL. dfx is not part of the Caffeine build.
Project shape
A Caffeine app is a pnpm workspace with a root manifest and two canisters. Create this exact tree (file contents below):
my-app/
├── deployed/
│ └── backend.most # stable-signature baseline — seed with an empty actor (see below)
├── caffeine.toml # root workspace manifest — MUST contain [workspace]
├── mops.toml # Motoko build config — ONE per project, at the root
├── package.json # pnpm workspace root + the `bindgen` script
├── pnpm-workspace.yaml # declares src/**/* as workspace packages
├── tsconfig.json # root TS config
└── src/
├── backend/ # the single Motoko canister, named "backend"
│ ├── caffeine.toml # canister manifest: type = "motoko"
│ ├── main.mo # actor entry point (write with the `writing-motoko` skill)
│ └── migrations/ # enhanced-migration chain (see the `mops.toml` notes)
│ └── 00000000_000000.mo # first migration: initializes the actor's stable state
└── frontend/ # the assets canister (React + Vite)
├── caffeine.toml # canister manifest: type = "assets"
├── package.json
Установить caffeine-app в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл caffeine-app?
Scaffold and build a complete Caffeine app (caffeine.ai) from scratch — the project layout, the caffeine.toml workspace + canister manifests, the mops.toml for the single Motoko `backend` canister, the React/Vite frontend, and the caffeine CLI build loop (auth login, doctor, install, check --fix, preview --build). Use whenever the user wants to create, scaffold, set up, or build a Caffeine app or a caffeine.ai project, asks about caffeine.toml or mops.toml structure, or needs the caffeine CLI workflow — even if they do not say the words 'from scratch'. Always pair it with the `writing-motoko` skill for the backend code. Do NOT use it for Motoko language syntax or compiler errors (use the `writing-motoko` skill), and do NOT use it for generic Internet Computer / dfx / icp deployment (use the `icp-cli` skill).
Как установить скилл caffeine-app?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл caffeine-app запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic