Creates Busabase-backed App-in-Skill packages with a canonical app project, Busabase-native setup, review/execution workflows, responsive UI, and AirApp-first delivery.
Ships in mr-kelly-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Turn a recurring human-and-Agent operation into a Busabase-backed skill with a canonical Hono project whose normal delivery target is Busabase AirApp. Own the product workflow and the App-in-Skill artifact contract; delegate Busabase resource implementation and AirApp deployment mechanics.
This skill is a taste layer over a format layer, and the split is what keeps both honest:
$busabase-app-creator (also published as busabase-skill-creator and
busabase-template-creator — one skill, three names) owns everything that
makes the artifact valid: the skill/template/package format, AirApp runtime
language, framework, server shape, dependency and SDK constraints, security
boundaries, validation, sync, and deployment mechanics. Its own contract says
it is "format and correctness, not taste" — it deliberately carries no visual
opinions, so this layer can.$kelly-app-skill-creator-tests owns repository-level conformance, process,
responsive browser, OSS Busabase, Cloud OAuth, persistence, and AirApp parity
tests for the generated app.$busabase-app-creator, and do not let a
runtime scaffold replace or weaken this skill's desktop or phone shell.Before creating or changing an app:
$busabase for connection, target Space, node discovery,
ChangeRequests, review, merge, and trusted mutations.$busabase-app-creator for resource modeling, native Views,
Vault boundaries, AirApp constraints, scaffolding, validation, sync, and
deployment. Creating an app-skill takes its package-first route — that
skill's own guidance already routes a skill there, because a skill carrying
an app is a template. The artifact is authored as a template package and
verified by installing it; this skill's UI contract governs what the app
inside it looks like.If a dependency is unavailable, preserve this skill's local artifact and product contracts, stop before the unavailable Busabase operation, and report the exact missing dependency. Do not invent a second data backend.
Before declaring a generated app complete, read and follow
$kelly-app-skill-creator-tests. Keep app-owned unit tests in <app-root>/test/
and delegate shared harness, external Busabase, OAuth, responsive browser, and
AirApp parity acceptance to that testing skill. If it is unavailable, run the
app's deterministic local checks and report the missing conformance suites rather
than claiming full completion.
Read the three UI references completely for every app creation or UI change —
editorial-visual-system.md first, since the other two defer to it for every
visual token. Read the other selected references completely before acting:
| Need | Reference |
|---|---|
| Busabase SDK, node selection, config, state, locks, readiness, secrets | references/busabase-data-contract.md |
| Runtime readiness, product onboarding, setup UX, reconfiguration | references/setup-onboarding.md |
| Human verdicts, Agent revision, claims, external execution, rehearsal, recovery | references/review-and-execution-contract.md |
| Product shape selection | references/app-types.md |
| Research/Plan/Action/Retrospective patterns | references/workflow-patterns.md |
| Type, colour families, layout register, dark mode, camera-ready rules | references/editorial-visual-system.md |
| Attention UI, review actions, routing, settings, i18n | references/ui-workflow-patterns.md |
| Desktop and mobile shell implementation | references/mobile-shell-layout.md |
| Large zero-build frontend module splits | references/frontend-modules.md |
| Large stylesheet splits with cascade layers | references/css-modules.md |
| Requested screenshots or demo recordings | references/demo-recording.md |
package.json, lockfile, server entry, browser files, and checks. It
lives at <skill-root>/content/<name>-app/ — the busabase template layout,
which is simply what an app-skill looks like: the same directory is a skill, a
template, and an installable package, with no second copy of anything.
kelly-email is the fleet's reference for this shape.<skill-root>/app/ predates that layout
and is awaiting migration — the fleet is being converted. Maintain such a
skill where it is; do not relocate one as a side effect of unrelated work,
because the move also rewrites harness paths, root scripts, and the scripts'
own relative imports, and each one needs its suite re-run. Migration is its
own task, not a by-product.pnpm --dir <that-root> dev,
but do not start it unless the user explicitly asks for local preview or local
debugging. The rest of this document calls whichever one applies the app
root.?demo=1 or any other Demo selector. The normal
launch path must exercise the Busabase connection and OAuth gate. Demo is an
explicit opt-in for a requested demo, screenshot, recording, or a separate UI
acceptance pass; never present its URL as the normally launched app.$busabase-app-creator.
Never restate or override those rules here or in a generated domain skill.busabase-sdk as the application data boundary. Persistent domain config,
workflow state, user decisions, locks/claims, and domain records belong in
Busabase, not local JSON, app/.data/, SQLite, or browser storage.BUSABASE_BASE_URL, BUSABASE_API_KEY, and BUSABASE_SPACE_ID. They are not a
parallel domain-config system.Use airapp-first unless the user explicitly asks for pnpm dev, a local URL,
local preview, or local debugging.
airapp-first, generate and keep the app root as the canonical
source, run its deterministic checks, and submit that same reviewed tree as a
Busabase AirApp ChangeRequest. Do not start a standalone local server merely
because the project supports one.local-preview only after an explicit user request. Then start pnpm dev,
apply the Connection UX Contract, report the bare non-Demo local URL as the
primary user-facing URL, and state plainly that the process is standalone and
has not uploaded or deployed an AirApp. When acceptance also requires Demo,
exercise it as a separate validation route rather than the launch default.airapp node and its merged version before saying it was
uploaded, deployed, or is running in Busabase.When local-preview was explicitly requested, every standalone App-in-Skill must
be usable without a CLI login or pasted API key. Only in that standalone
context, when no connection exists, show one focused setup screen with:
Busabase Cloud option using the canonical Cloud URL;Custom server option that reveals one URL field for self-hosted or
enterprise Busabase;Connect Busabase action that starts browser OAuth;Do not ask for an API key, device code, terminal command, provider selection, or
secret-storage choice. Cloud/custom is a hosting target choice, not a data
provider choice. Preserve the chosen server only as connection bootstrap; all
product configuration still comes from Busabase nodes through busabase-sdk.
After OAuth returns, distinguish successful authentication, Space targeting,
and resource readiness. Call Busabase auth verification without a Space header
to obtain every accessible Space. When Cloud or an enterprise host returns more
than one, show a native Space selector with names and safe ids; do not inspect,
initialize, or repair app resources until the operator confirms one. When it
returns exactly one, select it automatically. Open-source Busabase reports its
single local Space and never shows this selector.
Persist only the validated Space id as local connection bootstrap, separately
from domain configuration, and inject it as x-busabase-space on every proxied
SDK request. Changing server or signing out clears the selection. Show the
selected Space name/id on later setup and Help & Settings screens. An expired or
revoked session returns to the connection screen with a concise retry message.
Demo never impersonates a successful connection and remains explicitly labeled
read-only.
Use the canonical createBusabaseAirAppLocalGateway() exported by
busabase-sdk/airapp-node; do not copy PKCE, token refresh, Space persistence,
or proxy code into each server.js. Browser-provided x-busabase-space is
untrusted and must never override the gateway's validated server-side choice.
Treat SPACE_SELECTION_REQUIRED and SPACE_NOT_ALLOWED as stable reasons;
never parse a human error sentence to decide which setup screen to render.
Copy assets/runtime-detection/ — do not re-derive it. Three files, and
every generated App gets all three:
| Asset | Goes to | Role |
|---|---|---|
runtime.js | app/js/runtime.js | the only module that answers "where am I" |
server-route.js | into server.js, beside /health | hands the injected fact to the browser |
check-rules.mjs | into scripts/check.mjs assertions | fails the build if the rule is broken |
This is a copied asset rather than prose because prose did not hold: 65 generated Apps had each independently reinvented the same loopback-hostname test, and one App's own check script had gone as far as requiring it.
Busabase spawns the App's own process in every runtime it hosts and injects a
non-empty BUSABASE_AIRAPP_RUNTIME. Nobody else sets it, so its absence is
the positive fact "standalone". server.js must re-expose the result from
describeBusabaseAirAppRuntime() — the browser cannot read environment
variables, and the SDK keeps renamed and future runtime values compatible.
Never derive this from the URL — not the hostname, not window.self !== window.top, not a /api/airapp-preview/ path prefix. Every such test misfires
in both directions. A Busabase-hosted App is served from localhost on Desktop
and OSS (http://localhost:15419), so "loopback ⇒ standalone" is wrong; and a
standalone pnpm dev is routinely reached over a LAN IP or a signed dev tunnel
such as https://3111-t14e66e832aa5e6a.dev.budaapps.com, so "not loopback ⇒
hosted" is wrong. The second direction is the damaging one: the App hides its
own connect gate, calls /api/v1 with no credential, and reports an error the
operator cannot act on.
Browser code probes __airapp/runtime relatively (no leading slash — a
hosted App can be served from a sub-path of Busabase's origin)
and must verify the response is JSON, since a hosted origin's catch-all route
can answer 200 with an HTML shell.
runtime.js resolves the probe with a top-level await, so its two
predicates stay synchronous for their call sites. When a module both re-exports
one of them and calls it, use import + export, never
export { … } from "./runtime.js" — a re-export does not bind the name locally,
and the App dies at runtime with shouldUseLocalGateway is not defined while
every static check still passes.
Resolve three states, never two — hosted, standalone, unknown — and let
each decision fall to its own safe side when the runtime is undetermined:
| Decision | Safe default when unknown | Why |
|---|---|---|
| Show the connect gate | show it | An unnecessary gate is closed by the operator; a missing one strands them. |
| Merge writes instead of raising a ChangeRequest | do not merge | A reviewable write can still be approved; one that auto-merged has already crossed the review boundary. |
scripts/check.mjs must fail on location.hostname and iframe-nesting tests,
and must assert the server exposes /__airapp/runtime.
Apply references/setup-onboarding.md after authentication. Infrastructure
readiness and product onboarding are separate: a connected, materialized AirApp
may still need operator context, policies, sources, thresholds, schedules, or
approval rules before the workflow can act.
Never tell the operator to create Nodes/Bases, approve a list of unnamed
ChangeRequests, or copy materialized ids into deployment config. For an approved
lazy-provisioning blueprint, show one Initialize workspace action only after
Space selection and concise progress while $busabase-app-creator submits the
exact declared structure as an idempotent ChangeRequest in that Space. Continue
automatically when it materializes. If the viewer lacks write permission, show
the one pending CR id or the exact permission needed; the operator reviews that
request, not a manual schema recipe.
This screen must fit the same phone contract as the main app: one-column server
choices and full-width primary action at 390px and 360px, no horizontal overflow,
and no terminal instructions. A deployed AirApp uses the ambient Busabase
session and must not show the local OAuth gate, call /auth/status or
/auth/start, or navigate to a Busabase OAuth endpoint.
Delegate PKCE, callback validation, owner-only local credential registration,
refresh/revoke behavior, proxy injection, and AirApp ambient-session rules to
$busabase-app-creator. Browser JavaScript must never receive an OAuth access
token, refresh token, PKCE verifier, or Vault value.
Build an editorial desk for one workflow — not a landing page, not a generic
dashboard. Apply references/editorial-visual-system.md,
references/ui-workflow-patterns.md, and references/mobile-shell-layout.md
as hard implementation and acceptance gates.
Copy assets/editorial-theme/ — do not re-derive it. Four files, and
every generated App gets all four:
| Asset | Goes to | Role |
|---|---|---|
editorial.css | app/styles/editorial.css, loaded after base-ui.css, before app styles | the editorial profile over the shared base-ui tokens; the only file that knows a colour, font size, radius, or duration |
check-editorial.mjs | into scripts/check.mjs assertions | fails the build when a raw value slips into any other stylesheet |
style-picker.css / style-picker.js | app/styles/style-picker.css + a <script type="module"> tag | the Help & Settings control that lets the operator change family/register — see "Style: Family, Register, Accent" in ui-workflow-patterns.md |
This is a copied asset for the same reason runtime-detection/ is: prose did
not hold. Across the existing fleet, 67% of every declared font size sat in
8-12.5px, 31 distinct sizes were in use, and not one app defined a size through
a variable — each had re-derived its own scale from the same paragraph.
editorial.css is a profile over the fleet's shared scripts/base-ui.css,
not a replacement for it. base-ui keeps owning the shared components; the
profile only re-values the tokens they read.data-theme) and one layout register
(data-editorial) per app, from the seven and three the asset defines. The
default ink-paper — warm neutral paper, ink, one restrained indigo, and a
near-ink primary button — is the right answer for most desks; the louder
families are chosen, not inherited. Do not invent an eighth family in one
app's stylesheet; say which is closest and what is wrong with it instead.data-display="sans" turns the serif headline off in one attribute when a
subject matter makes it feel wrong. The scale and the rules carry the look;
the face does not have to.--text-xl and above. A CJK serif at body
size is harder to read than the sans it replaced, and these apps ship
localized copy.--ease-state, a one-shot
--ease-flash on a persisted verdict, and no 1px near-white line carrying
structure.minmax(360px, 38%) minmax(0, 1fr). Keep list and detail scrolling inside
their panes.Select nodes for their native strengths instead of putting everything in one JSON blob:
Create an explicit resource map before implementation. Record stable node ids or
slugs, purpose, schema/version, read/write behavior, mutation path, and the screens
or jobs that consume each resource. See references/busabase-data-contract.md.
Default to this four-stage operating loop.
Collect evidence on a schedule or on demand. Update an idempotent report for its period key and record source freshness, coverage, uncertainty, and findings.
Turn evidence into concrete, deduplicated work items linked back to their sources. Let humans opt out, block, reprioritize, reschedule, or request revision. Use an attention queue instead of forcing users to inspect every row.
Claim eligible work atomically, create reviewable deliverables or ChangeRequests, record progress and failures, and keep consequential side effects behind the trusted approval/execution path.
Compare outcomes with original evidence and decisions. Propose improvements to prompts, skills, thresholds, sources, schedules, resource schemas, or UI as new Plan items; do not silently rewrite production rules from one outcome.
Not every stage needs its own screen. State where each stage happens or why it is intentionally omitted.
Ask one question at a time. Learn enough to determine:
Do not ask the user to choose a provider, framework, schema mechanism, local config path, or secret-storage method.
Before creation, produce this concise overlay for $busabase-app-creator:
# Product Overlay
User and outcome: ...
App type: ...
Research: trigger, period key, evidence, freshness, idempotency
Plan: issue/recommendation rule, traceability, default eligibility, opt-out
Action: atomic claim, deliverable, review point, external side effects
Retrospective: outcome signals, cadence, skill/process feedback
Human attention states: ...
Agent responsibilities: ...
Product onboarding: required operating context and completion/version rule
Native Views needed: ...
AirApp screens and focused actions: ...
Busabase resource map: Folder/Node root, Bases, Docs, Drives/Files, Vault refs
Delivery mode: airapp-first unless the user explicitly requested local-preview
Guide copy in plain language: ...
Explicit exclusions: ...
The overlay describes product behavior. $busabase-app-creator translates it
into the complete resource graph, capability matrix, security model, canonical
app-root scaffold, AirApp-compatible implementation, validation, sync,
and deployment.
$busabase-app-creator validate the
technical blueprint.$busabase-app-creator create or update the complete canonical project at
the app root. Do not invent a second runtime layout in this skill.busabase-sdk.
Browser code calls Hono/AirApp routes; it does not hold credentials.references/setup-onboarding.md and
references/review-and-execution-contract.md; do not invent local markers,
locks, or a second provider.$kelly-app-skill-creator-tests for repository-level
contract, browser, OSS, and available Cloud suites. When the user explicitly
selected local-preview, also run pnpm --dir <app-root> dev and
complete local connection, workflow, recovery, desktop, and phone acceptance
before continuing.$busabase-app-creator; return its clickable Busabase review URL
and wait for the named merge authorization.local-preview was explicitly requested.Apply references/setup-onboarding.md. The app must remain startable in an
explicit local preview even when Busabase is not ready, and the hosted AirApp
must render one setup/onboarding gate rather than silently switching to local or
Demo data. Distinguish runtime readiness from product onboarding.
Runtime readiness states include:
Product onboarding separately covers the durable operating context, policies, sources, schedules, thresholds, and approval rules required by this workflow. Persist its fields and completion/version state in Busabase. Do not enable external reads or consequential actions whose product prerequisites are incomplete.
Declare an onboarding contract in the Product Overlay and machine-readable
blueprint with a positive integer version, explicit required fields, their
owning Base/Doc resource keys, validation rules, and the actions each field
unlocks. A product with no onboarding requirements must declare an explicit
empty contract and rationale; omission is not equivalent to “none.” Persist
onboarding_version, completion state, and materialized completion time in the
declared Busabase resource. A version mismatch enters needs_review or
migration_needed, never complete.
For missing or expired authentication, apply the Connection UX Contract above; do not replace its OAuth action with CLI instructions or a credential input.
Show sanitized connection and resource identifiers plus an actionable recovery step. Never accept or echo secret values in the browser. Provision or repair resources through reviewed ChangeRequests when required. A recovery step may ask the operator to initialize, retry, select a Space, or review one named CR; it must not delegate Node/Base construction or id wiring to them.
Finish only when:
pnpm --dir <app-root> dev remains supported, whether or not local
preview was requested;$busabase-app-creator runtime, SDK, security, validation, and deployment checks
pass without a conflicting local runtime contract;$kelly-app-skill-creator-tests required local and OSS suites pass, and its
Cloud/AirApp suites pass when their declared environment is available; skipped
external suites are reported explicitly;busabase-sdk and appropriate Busabase nodes;busabase-sdk/airapp-node, ignores inbound
Space headers, and branches on stable Space reasons;editorial.css is the app's first stylesheet, editorialAssertions is in
scripts/check.mjs and passes, and the declared data-theme /
data-editorial defaults are stated;Passing tests say the cases you thought of hold. Before reporting a change as verified, exercise it the way a real caller will:
node_modules produces failures that look
exactly like a regression in the change under review. Establish which it is
before concluding anything.Report what was actually executed and what was skipped. "Tests pass" without saying which environment they ran in is not a result.
Stop when a dependency is unavailable for the next required operation, the target Space or app root is ambiguous, node capabilities cannot support the intended model, a secret would cross into the browser, a side effect lacks a reviewed trusted-execution path, or local and AirApp implementations would require separate business logic.
README.md (opens in a new tab)README_CN.md (opens in a new tab)agents/openai.yaml (opens in a new tab)assets/editorial-theme/check-editorial.mjs (opens in a new tab)assets/editorial-theme/editorial.css (opens in a new tab)assets/editorial-theme/preview.html (opens in a new tab)assets/editorial-theme/style-picker.css (opens in a new tab)assets/editorial-theme/style-picker.js (opens in a new tab)assets/runtime-detection/check-rules.mjs (opens in a new tab)assets/runtime-detection/runtime.js (opens in a new tab)assets/runtime-detection/server-route.js (opens in a new tab)references/app-types.md (opens in a new tab)references/busabase-data-contract.md (opens in a new tab)references/css-modules.md (opens in a new tab)references/demo-recording.md (opens in a new tab)references/editorial-visual-system.md (opens in a new tab)references/frontend-modules.md (opens in a new tab)references/mobile-shell-layout.md (opens in a new tab)references/review-and-execution-contract.md (opens in a new tab)references/setup-onboarding.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/mr-kelly-skills:kelly-app-skill-creatorfrom mr-kelly-skills
npx claudepluginhub mr-kelly/skills --plugin mr-kelly-skills25 skills in this plugin
/agent-rulesAlign all AI coding agents to a single source of truth. AGENTS.md for rules, .agents/skills/ for skills, symlinks for everything else. Use when setting up a repo for multiple agents, or when links are missing, broken, or out of date./kelly-adsAd-campaign command desk (投放指挥台, Busabase App-in-Skill) for a cross-border e-commerce seller running Amazon Ads, Meta (FB/IG), TikTok Ads, and Google Ads. Use when the user invokes $kelly-ads or /kelly-ads, or asks about 投放, ad campaigns, ad spend, ACOS, ROAS, Amazon Ads, TikTok ads, Meta ads, Google Ads, search terms, negative keywords, bid adjustment, budget pacing, CPC spikes, rejected ads, ad anomaly detection, 广告优化, or reviewing agent-proposed adjustment cards (negative keyword, bid down/up, pause target, budget shift, creative refresh)./Other plugins' skills for the same job