AI Skill v1.2.0

Create XApp: Claude Code Skill to Scaffold and Build Mini Apps

Creates a ready-to-run xapp from the xapplaxy starter template, as a new project or flat inside your pnpm monorepo, then builds its UI, logic and docs from a domain model JSON, a reference web page or a markdown spec.

Works with Claude Code License MIT Updated Nov 20, 2026 By xapplaxy

Your agent uses it when you say

  • create a new xapp
  • scaffold an xapp called …
  • start a new xapp from this model
  • build an xapp from this spec
  • add a new xapp to this monorepo

Try these prompts

  • Create a new xapp called dog-age-calculator from ./models/dog-age.model.json
  • Scaffold an xapp named tip-splitter in this monorepo using ./specs/tip-splitter.md as the spec
  • Create a loan-comparison xapp in English and German from ./specs/loan-comparison.md

Example

You ask
Create a new xapp called dog-age-calculator
from ./models/dog-age.model.json
You get
dog-age-calculator/
└── apps/xapp/
    ├── src/lib/XAPP.svelte       built UI
    ├── src/lib/utils.ts          formulas
    ├── doc/en/dog-age-calculator.md
    └── migration/migration.yaml

pnpm install && pnpm --filter dog-age-calculator dev

Install

Claude Code
git clone https://github.com/xapplaxy/xapp-ai.git
cp -r xapp-ai/skills/create-xapp ~/.claude/skills/
cp xapp-ai/skills/create-xapp/agents/xapp-builder.md ~/.claude/agents/

Configuration

--languages en,de
Only for a multi-language xapp. BCP 47 codes, first = default. Two or more turn on i18n.
--layout auto|standalone|monorepo
Where the app goes. auto uses monorepo when a pnpm workspace with apps/* is found.
--dest DIR
Destination folder, or the workspace root or its apps/ in a monorepo. Defaults to the current folder.
--title "Title"
Page title. Defaults to a title made from the xapp name.
--description "…"
Short description used in the page metadata.

What's inside

  • SKILL.md 7.9 KB
  • agents/xapp-builder.md 14.9 KB
  • scripts/scaffold.py 16.1 KB
  • templates/i18n.svelte.ts 2.7 KB
Browse the source →

Guide

Create XApp is a Claude Code skill that creates a new xapp from the official xapplaxy starter template and then writes the xapp’s real interface and logic for you. You give it a name and one description of what the xapp should do. Two jobs then run at the same time: a script copies and renames the template, while a builder subagent reads your description and plans the xapp. The builder waits for the copy to finish before it edits any file.

The part people usually get wrong is where the xapp ends up. The skill doesn’t always create a new project. If you run it inside an existing xapps monorepo, it adds the app flat at apps/<name>/ and leaves the rest of the repository alone.

Your description + xapp-starter template → a built, documented xapp ready for pnpm dev

What you get depends on three choices: the source you give (model, page or spec), the layout (new project or existing monorepo), and the languages (one, or several with translations).

What the skill needs from you

Input Required Example Notes
Name yes dog-age-calculator Kebab-case. A phrase like “dog age calculator” is converted, and you’re asked to confirm.
Domain model (JSON) one source ./models/dog-age.model.json Most precise. If you give one, it’s the source of truth.
Reference URL one source a page that explains the tool Read for purpose, inputs, outputs, formulas and edge cases.
Markdown spec one source ./specs/tip-splitter.md Your own description of the xapp.
Languages no en,de Only when you ask for more than one language. The first code is the default.
Destination no ~/Workspace/xapps Defaults to the current folder.
Layout no monorepo auto (default), standalone or monorepo.
Title, description no “Dog Age Calculator” The default title is made from the name.

You need one source. If you give a model, a URL or spec only adds context. Without a model, a URL or spec is required, and the skill asks for one instead of guessing the domain.

To run it you need Claude Code with the skill and its xapp-builder subagent installed, Python 3 (standard library only), Node.js and pnpm, and internet access to download the starter template from GitHub.

Step by step: from your request to a running xapp

  1. Check the target: a dry run of scaffold.py works out the layout and the exact folder, and changes nothing. If that folder already exists, the skill stops and asks you.
  2. Scaffold (script): downloads xapplaxy/xapp-starter (main.zip), places it, and renames the template for your xapp. That covers the package name, the container ID #wg-<name>, the .env key, the CSS layer, index.html, the doc and API file names, and migration/migration.yaml with a new random pathKey. When it’s done, it writes a .xapp-scaffold.json marker.
  3. Plan (builder, in parallel with step 2): reads your source and works out the entities, which values are inputs and which are calculated, the formulas, the screen layout, and whether the xapp needs server data. Without a model, it derives one in the same shape.
  4. Build (builder, after the marker appears): writes the types (src/lib/types.ts), the formulas as pure functions (src/lib/utils.ts) and the interface (src/lib/XAPP.svelte). It uses Svelte 5 runes, the @xapplaxy/xy-ui components, and xa- classes in the xapp’s own CSS layer.
  5. API decision: if the xapp needs server data, the builder implements api/<name>.py and adds sample data to index.html. If not, it deletes the API folder and the xapp runs fully in the browser.
  6. Document: writes doc/<lang>/<name>.md in a plain-language explainer style. It covers the formula, a step-by-step calculation in the same order as the code, and worked examples whose numbers come from the xapp’s own functions. It also fills the SEO title, description, tags, excerpt and category in migration/migration.yaml.
  7. Verify: runs pnpm install and pnpm --filter <name> build from the workspace root, and fixes any errors it introduced.
  8. Report: the skill checks the result for leftover placeholders, deletes the marker, and tells you where the app is, what was built, the build result, and the builder’s open questions.

Two layouts: a new project or an app inside your monorepo

The auto layout picks for you. It looks for a pnpm workspace whose pnpm-workspace.yaml lists apps/*, in the destination or in its parent when the destination is the workspace’s apps/ folder.

Layout When it’s used Where the app goes
standalone no workspace found the whole starter repo at <dest>/<name>/, with the app in <dest>/<name>/apps/xapp
monorepo a workspace with apps/* is found only the starter’s app, placed flat at <workspace>/apps/<name>/

In monorepo mode the starter’s shared package names are renamed to your workspace’s names with the same suffix. For example, @xapputils/utils becomes @onlineutils/utils. Your workspace’s root files aren’t touched, and the builder only edits files inside the new app folder. It also looks at a sibling app for local conventions.

Running the skill inside an existing xapps monorepo never creates a nested apps/xapp.

Languages: single-language by default, translations only when you ask

By default the xapp is single-language English (en). The skill doesn’t ask about languages and doesn’t add translation code.

One language → text written directly in that language. Two or more → full i18n.

  • One non-English language, for example de: all text is written in German, there’s one doc at doc/de/<name>.md, and still no i18n.
  • Two or more languages, for example en,de: the first code is the default and fallback. The scaffold adds one translation file per language at public/cdn/miniapps/<name>/locale/<lang>/i18n.json, plus the src/lib/i18n.svelte.ts runtime. The builder writes every label, message and copy text as a translation key, translates every file with exactly the same keys, and writes a fully translated doc per language.

At runtime the xapp reads the page’s <html lang>. It uses an exact match first, then the base language (pt-BR → pt), then the default. Numbers, currency and dates are formatted for that language, and right-to-left languages (ar, he, fa, ur) get dir="rtl". To preview another language locally, change <html lang> in index.html.

Worked examples

1. Standalone xapp from a domain model: you ask to create a new xapp called dog-age-calculator from ./models/dog-age.model.json in a folder that isn’t a monorepo.

  • Layout: standalone (no workspace found)
  • Project: dog-age-calculator/, app in dog-age-calculator/apps/xapp/
  • Doc: apps/xapp/doc/en/dog-age-calculator.md
  • Run: cd dog-age-calculator && pnpm install && pnpm --filter dog-age-calculator dev

2. New app inside an existing monorepo: you run scaffold an xapp named tip-splitter using ./specs/tip-splitter.md from the root of a workspace whose packages are @onlineutils/*.

  • Layout: monorepo, so the app goes to apps/tip-splitter/
  • Package rename: @xapputils/utils → @onlineutils/utils
  • Root files of the workspace: unchanged
  • Run from the workspace root: pnpm --filter tip-splitter dev

3. Multi-language xapp: you ask for a loan-comparison xapp in English and German, so the languages are en,de.

  • Default and fallback language: en
  • Docs: doc/en/loan-comparison.md and a translated doc/de/loan-comparison.md
  • Translations: public/cdn/miniapps/loan-comparison/locale/en/i18n.json and …/de/i18n.json
  • Runtime: src/lib/i18n.svelte.ts added, <html lang="en">

4. German only: the same request with just de.

  • One doc, doc/de/loan-comparison.md, written in German
  • No translation files and no i18n runtime

Edge cases

  • Folder already exists: the dry run reports it and the skill stops and asks before writing anything.
  • No model and no URL or spec: the skill asks you for a source. It doesn’t invent the domain.
  • Inline JSON model: saved to a temporary file and checked that it parses before the scaffold starts.
  • Invalid language code: the scaffold stops with an error. Codes follow BCP 47, for example en, pt-BR, zh-Hans or es-419.
  • Scaffold fails: the builder is stopped and nothing is retried over a partly created folder without asking you.
  • Monorepo package without a match: a starter package is renamed only when your workspace has a package with the same suffix. Others keep their starter name.

Important notes

  • The skill needs Claude Code, because it runs the scaffold and the builder subagent in parallel.
  • Read the builder’s open questions before publishing. They list the values and rules it had to assume where your source was unclear.
  • The generated doc’s worked examples are computed with the xapp’s own functions. If you change a formula later, update the doc too.
  • The generated project keeps the starter’s structure (App.svelte → XAPPContainer.svelte → XAPP.svelte), so it stays compatible with the xapplaxy publishing pipeline.

Changelog

  1. 1.2.0 2026-11-20

    Generated docs follow a plain-language explainer style, with worked examples computed from the xapp's own functions.

  2. 1.1.0 2026-11-16

    Multi-language xapps with per-language docs, translation files and an i18n runtime.

  3. 1.0.0 2026-11-13

    First release. Scaffold and builder run in parallel.