/major:app-builderfrom major
Creates and edits full-stack Major apps with Vite + React frontend, Hono backend under /api, and live preview. Covers app lifecycle, sandbox management, and workspace editing.
Ships in major. 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.
An app is a full-stack app deployed and hosted by Major. Apps can use any connector; agents and workflows call a deployed app's API directly (Major handles auth and plumbing). Treat apps as compute: whenever you need to run code, use an app. Apps also visualize results for the user. Offload deterministic behavior into the app; agents and workflows call it.
New apps start from the Vite-Hono template, a pnpm workspace:
frontend/ Vite + React single-page app, served from /
backend/ Hono API, every route under /api
shared/ types used by both
fetch("/api/...")). Never put secrets in VITE_* variables: they ship in the public bundle.createRoute + zod from @hono/zod-openapi in backend/src/routes/ and registered in backend/src/app.ts. The OpenAPI document at /api/openapi.json is what agents and workflows read to call the app.GET /api/healthz; the platform health-checks it.CLAUDE.md at the repo root) has the full rules; read it before the first edit.Older apps are Next.js (App Router, API routes in app/api/**/route.ts, clients in clients/). Check for frontend/ and backend/ at the repo root to tell which stack you are editing, and follow that app's agent guide.
Below, sandbox_* means mcp__plugin_major_major__sandbox_*.
mcp__plugin_major_major__*: list / create (with target_type: "app"), list_sandboxes (what is mounted), start_sandbox, stop_sandbox, and the branch tools list_branches, create_branch, merge_branch, delete_branch.sandbox_*; an app's target arguments are target_type: "app" and target_id: "<applicationId>", plus branch for a branch sandbox (omit it for main). The "Working with sandboxes" section of your system prompt covers the tools, argument conventions, provisioning, shared-sandbox etiquette, and local-file uploads.major CLI — run through sandbox_bash inside the mounted app workspace; it infers the app from the working directory. Never pass an app ID or run it in the agent's local filesystem.You are in general chat: nothing is bound to this thread, and a sandbox is not always mounted. Only use an applicationId returned by list or create (target_type: "app") — never invent one. Every sandbox_* call, start_sandbox, and stop_sandbox takes target_type: "app" and target_id: "<applicationId>". If the app is not in list_sandboxes, start it (start_sandbox({target_type: "app", target_id: "<applicationId>"})) or create it before using sandbox_* tools.
Exception: if this chat is pinned to an app (the "Working with this app" section of your system prompt), its sandbox is auto-mounted — skip create/mount and edit it through sandbox_* with its slug.
If a request is ambiguous (you can't tell which app it maps to, or lack the detail to mount it), ask one or two clarifying questions first.
list({target_type: "app"}), then start_sandbox({target_type: "app", target_id: "<applicationId>"}) — wakes the sandbox, attaches it to this chat, starts a live preview. A locked result means another user holds the app: tell the user who; do not retry in a loop.create({target_type: "app", name, description}) with a short name and one-sentence description. Returns the applicationId and auto-mounts the sandbox — do not call start_sandbox. For a brand-new app's first iteration, load the new-project skill and follow it before writing code.main, or the branch of a branch sandbox) via the sandbox shell. Stage only files you changed (git add <paths>) — never git add -A / git add . (other chat sessions may edit the same workspace). Never git stash in any form (push/pop/apply). Never create, switch, or check out git branches yourself — use create_branch and a branch sandbox (see below).major publish --yes unless the user asked to deploy/publish/ship in this conversation. Otherwise, finishing an edit = commit + push, then tell the user it is ready to deploy. Publish only ships main: run it in the main sandbox, never in a branch sandbox (merge the branch first). When asked, batch all finished changes into one deploy: major publish --yes in /workspace/app (an app's first deploy needs --slug <slug> to choose its URL). The build takes ~2 minutes — tell the user it is building and end your turn; never poll major app info in a loop.Use branches when independent changes should be built in parallel, or the user asks for one. An app has main plus zero or more branches; each branch is a git branch with its own sandbox, preview, and workspace. All branches share the app's database and env vars.
list_branches(applicationId), create_branch(applicationId, name), merge_branch(applicationId, branch), delete_branch(applicationId, branch). start_sandbox, stop_sandbox, and every sandbox_* tool take target_type: "app", target_id and an optional branch argument; omit branch for main.- and /, max 60 chars. main is reserved.major push in a branch sandbox pushes that branch and does not touch main.major publish deploys main only. In a branch sandbox it is refused with "Merge into main". To ship a branch, call merge_branch, then publish from the main sandbox.create_branch({applicationId, name}) per piece of work. It branches from the current main; it does not start a sandbox.start_sandbox({target_type: "app", target_id, branch}), then edit with sandbox_*({target_type: "app", target_id, branch, ...}). Give each subagent exactly one (applicationId, branch) pair. Commit and push in each branch sandbox as usual.merge_branch({applicationId, branch}). It saves the live branch sandbox and merges into main with plain git rules. On success it deletes the branch and stops its sandbox.merge_branch changes nothing and returns steps. In that branch sandbox: git fetch origin main && git merge origin/main, fix the conflicts, commit, major push, then call merge_branch again.delete_branch({applicationId, branch}) discards the branch and loses its unsaved work - only when the user asks.list_branches({applicationId}) shows the open branches and who holds each sandbox. If another user holds the branch sandbox, merge_branch, delete_branch, and start_sandbox return locked: tell the user who, do not retry in a loop.
Never git checkout main in a branch sandbox.
The preview dev server is ALREADY running in the sandbox and hot-reloads on save; the preview is what the user sees. No build needed to see changes.
pnpm build, vite build, next build, npm run build, or yarn build — unless specifically debugging a build issue.node_modules or, in a Next.js app, the .next directory — it crashes the preview server and the entire session.pnpm lint via sandbox_bash: oxlint plus a type check of every package), not a build. After you finish editing, always lint and fix what it reports — lint failures fail a deploy. Lint ONCE per finished change, not per file edit.Sandbox env vars (use with curl via sandbox_bash to hit the APIs you write): MAJOR_API_BASE_URL (Major API base URL), MAJOR_JWT_TOKEN (Major API JWT), APPLICATION_ID (the application's id).
Every tool result is re-read on each later step, so keep results small:
sandbox_read_file offset/limit.Playwright/browser verification is costly. Never open the browser, take screenshots/snapshots, check console via browser tools, or dispatch browser-qa unless the user explicitly asked for visual verification in this conversation (e.g. "check the UI", "take a screenshot", "verify it looks right", "does the page render?"). Editing React/UI code, changing props, finishing a feature, or "making sure it works" do NOT count — lint is enough.
When asked, dispatch the browser-qa subagent with the app slug, route, and specific things to verify. Never drive browser tools from the main chat — snapshots permanently bloat the conversation.
AGENTS.md, or CLAUDE.md if that's all that exists) — it carries vital app information — and to NOT call exit-plan-mode; only the main agent exits./tmp/plan.md) — NOT the sandbox file tools; it's not app code and exit-plan-mode must read it locally. Then call mcp__plan-mode__exit-plan-mode with planFilePath set to that path.Before frontend work, run major app theme get in the app workspace. It returns the design system: colors, font, border radius, logo (full and/or small, when provided). Use only those parameters unless the user explicitly asks for a custom design. If it reports no theme, none is configured yet: major app theme list to discover themes, major app theme apply <themeId> to select one (also writes theme files into the checkout).
debug-issue skill before investigating any failure, regression, or broken/blank/errored behavior (covers preview, app errors, logs, browser inspection).app-performance skill when the app is slow or the user asks to speed it up, add caching, or give it more CPU or memory.sandbox_add-agent-client generates the typed client (same pattern as resource clients).major app xserver add --id <appId> (ids from major app list; major app xserver list shows each callable app's URL), deploy, then from backend code fetch("<target app url><path>", { headers: { "x-major-jwt": <the incoming request's x-major-user-jwt header> }, redirect: "manual" }); redirect: "manual" keeps the token from following a redirect to another host.cron.json is not read. Load the workflow-builder skill and build a workflow with a cron trigger and an app_call node.PostgresResourceClient, SlackResourceClient, createProxyFetch, or any resource client by hand. Import the generated client from backend/src/clients/ (clients/ in a Next.js app) — it already copies the incoming x-major-user-jwt.x-major-user-jwt. A hand-rolled client that only sets MAJOR_JWT_TOKEN fails, including from a webhook or workflow app_call.app_calls are real requests: ingress already set x-major-user-jwt, and the generated client reads it from the request (hono/context-storage in a Hono backend, headers() in Next.js). Do not drop getHeaders to make those routes run.contextStorage() must stay registered in backend/src/app.ts before every route; without it the clients cannot see the request.MAJOR_JWT_TOKEN alone is only for the runner and code outside a request (current-build and the error reporter keep using it).Use Major's AI proxy — no API key needed; spend is metered per app. Check major app ai-proxy status first; with the user's go-ahead, run major app ai-proxy enable (sets a default $10/month limit).
Run in the mounted app workspace via sandbox_bash; use each command's --help for filters and pagination.
major app info --json — deployment status, deployed URL, visibilitymajor app logs --preview — preview/dev-server output; major app logs — deployed app logsmajor app errors list / get <errorId> — inspect runtime errors; resolve <errorId> — after committing a fix for a confirmed runtime errormajor app errors enable — after adding the Major error-reporter scaffolding to the repomajor resource invocations --slow [--environment coding-session] [--days 30] — resource operations over 500 ms p95, ranked by total time, with call site; omit --slow to include faster onesmcp__plugin_major_major__request_app_environment_variables. The user supplies values through the frontend — never ask them to paste secrets into chat. If you get a setup URL, share it in one short sentence and wait for the user's confirmation. Use major vars set KEY=VALUE only for known values the user explicitly wants you to configure.mcp__plugin_major_major__request_resource_setup; load using-connectors for that flow. An existing connector can be added to app code separately.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
React, Vite, Hono, TypeScript, Zod
npx claudepluginhub major-technology/cli --plugin major13 skills in this plugin
/agent-builderCreate and configure a Major agent — a versioned two-file bundle (agent.jsonc + prompt.md) edited on a sandbox — what each field means, how to research connectors and applications before writing the prompt, and the edit/validate/save/publish lifecycle./app-performanceUse this skill when the user says a Major app is slow, laggy, sluggish, takes a long time to load, hangs, spins, or times out, or asks to speed up, optimize, tune, cache, or scale an app, page, query, or API route. Covers measuring where the time goes (resource-call timings, CPU and memory usage), fixing slow and chatty queries, choosing a cache and agreeing its staleness with the user, and resizing the app's CPU and memory. Do not use it for failures that are not about speed — that is debug-issue./Other plugins' skills for the same job