feat(caffeine-app): add skill for building a Caffeine app from scratch#222
Merged
raymondk merged 2 commits intoJun 17, 2026
Conversation
New Integration-category skill teaching the Caffeine app shape and the caffeine CLI build loop, so an agent can produce a buildable caffeine.ai app from nothing. Complements and explicitly defers to the `motoko` skill for backend Motoko language details. Covers the pnpm-workspace layout, the workspace + canister caffeine.toml manifests, the mops.toml for the single `backend` canister, the React/Vite frontend, calling the backend via `useActor(createActor)` from @caffeineai/core-infrastructure, and the loop: pnpm install (first run) -> caffeine install -> build -> check --fix -> preview --build (going live is a web-app action; there is no CLI deploy). Aligned to the canonical build template (dfinity/skills-internal build-template-react): current toolchain pins (moc/lintoko/core), the @dfinity/* -> @icp-sdk/* frontend migration, core-infrastructure ^1.0.0, the data-viewer MixinViews backend default, and a drift note since the template manages these and bumps them over time. Validated end-to-end on @caffeineai/cli 0.1.0-dev.28: the canonical template plus a Motoko `getCurrentTime` query and a frontend button that calls it (via useActor) passes `caffeine check`, compiles via `caffeine build`, and deploys a working draft via `caffeine preview --build`. Every greenfield gotcha that surfaced (frozen-lockfile, check-stable skipIfMissing, preview project-id, build-before-check ordering, what `doctor` installs, the backend-call pattern) is documented with a pitfall and an eval. - skills/caffeine-app/SKILL.md - manifests inlined, build loop, 12 pitfalls, drift note - skills/caffeine-app/references/frontend-template.md - canonical frontend boilerplate + worked backend call - evaluations/caffeine-app.json - 20 output + 22 trigger eval cases
Skill Validation ReportValidating skill: /home/runner/work/icskills/icskills/skills/caffeine-appStructure
Frontmatter
Tokens
Markdown
Tokens
Content Analysis
References Content Analysis
Contamination Analysis
References Contamination Analysis
Result: 1 warning Project Checks |
Collaborator
Author
The frontend boilerplate (package.json, configs, main.tsx, the useActor backend-call example) lives in references/frontend-template.md, which the site serves at /skills/caffeine-app/references/frontend-template.md. Make the instruction to fetch it explicit and note it sits next to SKILL.md, so an agent that loaded only the SKILL.md URL reliably retrieves it.
raymondk
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
caffeine-appskill (category Integration) that teaches an agent the Caffeine app shape and the caffeine CLI build loop, so it can produce a buildable caffeine.ai app from nothing. It complements — and explicitly defers to — the existingmotokoskill, which owns the Motoko language.The skill covers:
src/backendMotoko canister +src/frontendReact/Vite assets canister).caffeine.toml([workspace]), the two canistercaffeine.tomls, and themops.tomlfor the singlebackendcanister (toolchain pins,[canisters.backend.check-stable]withskipIfMissing,[moc] args).pnpm install(first run) →caffeine install→build→check --fix→preview --build, plus the bindgen generation step and the fact that going live is a web-app action (no CLI deploy).references/frontend-template.mdwith the full frontend boilerplate and a workeduseActor(createActor)backend call.Common Pitfallssection (the highest-value content) — 12 pitfalls, each backed by an eval.It is aligned to the canonical build template (
build-template-react): current toolchain pins, the@dfinity/*→@icp-sdk/*frontend migration,@caffeineai/core-infrastructure@^1.0.0, and the data-viewerMixinViewsdefault — with a drift note, since the template manages and bumps these over time.Why
The
motokoskill teaches the language, not how a Caffeine project is laid out or built. An agent with only themotokoskill can write Motoko but cannot reliably produce a buildable Caffeine app from scratch. This skill is the missing greenfield piece, and it pairs withmotoko(which it requires for backend code) and points toicp-clifor non-Caffeine IC/dfx work.Validation
npm run validatepasses (skill-validator + project checks, 0 errors). One soft, non-blocking warning: the SKILL.md body is ~5.3k tokens vs the recommended < 5k — the content is intentionally dense (12 pitfalls + full inlined manifests).@caffeineai/cli: a from-scratch app authored solely from this skill — a MotokogetCurrentTimequery plus a frontend button that calls it viauseActor(createActor)and displays the result — passescaffeine check --fix, compiles viacaffeine build(backend.wasm+ the bindgen-generated client + built frontend), and deploys a working draft viacaffeine preview --build. Every greenfield gotcha that surfaced (the first-run--frozen-lockfile,check-stableskipIfMissing, preview needing a project id, build-before-check ordering, and whatcaffeine doctoractually installs) is documented as a pitfall and an eval.Evaluation results
Notes for reviewers
caffeine preview --builddraft).