From acss-app-builder
Scaffold React apps with the @fpkit/acss design system — layouts, pages, themes, forms, and common UI patterns. Use when the developer wants to bootstrap a Vite+React+TS app, generate an app shell, stamp a page template, set up a theme, build a form from a schema, or insert a common pattern like a data table or empty state. Also handles composition and extension of fpkit components (absorbs the deprecated fpkit-developer workflow). Works with either the @fpkit/acss npm package or components generated by the companion acss-kit-builder plugin; prefers generated source on tie.
How this skill is triggered — by the user, by Claude, or both
Slash command
/acss-app-builder:acss-app-builderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A single-skill workflow for scaffolding apps with the **@fpkit/acss** design system. Each slash command corresponds to one section below.
A single-skill workflow for scaffolding apps with the @fpkit/acss design system. Each slash command corresponds to one section below.
/app-init)scripts/detect_vite_project.py. Halt if not detected.scripts/detect_component_source.py. Returns generated | npm | none. Generated wins on tie. On none, halt with install hints.src/styles/theme/base.css is missing, prompt the developer to run /app-theme light first.Safety contract — applied to every command:
git status --porcelain is non-empty, halt unless --force.--force.src/main.tsx mutation uses sentinel-bounded blocks (// @acss-app-builder:begin ... :end). Re-runs update in place./app-init [--with=theme,layout] [--force]Purpose: Bootstrap project folders and wire theme imports into the entry file.
Preflight exemption: skips step 3 of the shared preflight (it creates base.css).
detect_vite_project.py. Read the entry file path from its output (usually src/main.tsx).sass or sass-embedded is in devDependencies. If missing, print npm install -D sass and halt.src/app/
src/pages/
src/styles/theme/
Refuse if any exists with non-empty content (unless --force).assets/themes/base.css → src/styles/theme/base.css..acss-target.json exists at project root, read componentsDir from it. Else prompt (default src/components/fpkit) and write .acss-target.json.^import .* from ['"].*['"];?$ line in the entry file. Append the sentinel block after it:
// @acss-app-builder:begin theme imports
import './styles/theme/base.css'
// @acss-app-builder:end
If no imports exist, halt with instructions.--with=theme, run /app-theme light workflow inline. If --with=layout, run /app-layout sidebar inline./app-page dashboard, /kit-add button).references/app-architecture.md — entry mutation contract, project-root definition.references/component-source.md — import-map semantics for later commands./app-layout <holy-grail|sidebar|centered> [--force]Purpose: Generate src/app/AppShell.tsx + src/app/AppShell.scss with grid-area CSS variables.
assets/layouts/app-shell-<shell>.tsx.{{IMPORT_SOURCE:...}} tokens via detect_component_source.py.src/app/AppShell.tsx depth (../components/fpkit/... for generated).src/app/AppShell.tsx + src/app/AppShell.scss. Refuse on existing non-empty content without --force.src/App.tsx.references/layouts.md — shell catalog, grid areas, responsive rules.references/component-source.md./app-page <template> [name] [--force]Templates: dashboard, auth-login, auth-signup, settings, list-detail, landing, error-404, error-500.
name omitted, derive PascalCase from template (e.g. auth-login → AuthLogin).assets/pages/<template>.tsx. If template file uses specific fpkit components, verify each against the active source:
generated: check <componentsDir>/<component>/<component>.tsx exists. If missing, print /kit-add <component> hint and halt.npm: assume the package exports from packages/fpkit/src/index.ts.{{IMPORT_SOURCE:...}}, {{NAME}}, {{ROUTE}} tokens.src/pages/<Name>.tsx (refuse without --force on conflict).src/App.tsx or the developer's router.references/pages.md — catalog, accessibility requirements, tab-pattern clarification.references/layouts.md — for shell composition.references/patterns.md — patterns a page template may include.references/composition.md — when the page requires composing multiple fpkit primitives./app-theme <light|dark|both|brand-neutral|brand-vibrant> [--mode=light|dark|both]/app-theme light or both because the command is about to create it — exempt this command from step 3 of preflight).assets/themes/*.css to src/styles/theme/.scripts/validate_theme.py src/styles/theme/. Report WCAG contrast failures as warnings; the command continues unless the developer passes --strict-contrast.Note: scripts/validate_css_vars.py is NOT run on theme files. That validator enforces the --{component}-{property} pattern, which is correct for component SCSS (--btn-bg) but a category mismatch for primitive design tokens (--fs-xs, --space-1) and semantic role tokens (--color-primary). Use validate_css_vars.py only on files under src/components/ (invoked by /app-compose and by developers directly).
references/themes.md.references/css-variables.md./app-form <schema.json> [--name=FormName] [--force]name, fields). Each field must have name, label, type.--name or fall back to schema.name.assets/forms/form-from-schema.tsx.tmpl and assets/forms/field-renderers.tsx.references/forms.md). Generate unique ids (<FormName>-<fieldName>).{{IMPORT_SOURCE:Field,Input,Checkbox,Button}} and the rendered field list.src/forms/<FormName>.tsx. Refuse without --force on conflict.references/forms.md — verified Field API, schema shape.references/accessibility.md.references/composition.md./app-pattern <pattern> [--into=<file>] [--force]Patterns: data-table, empty-state, loading-skeleton, hero, pricing-grid, notification-toast.
assets/patterns/<pattern>.tsx.--into absent: write to src/patterns/<Name>.tsx (PascalCase from pattern name).--into present:
a. Read the target file.
b. Find the first {/* @acss-app-builder:insert */} marker. If absent, print the exact comment to add and halt.
c. Substitute imports (merge with existing imports in the target file; dedupe).
d. Replace the marker with the pattern's JSX body.
e. Write the modified file..scss, write it alongside the .tsx or ensure it's imported into the target file.references/patterns.md.references/component-source.md./app-compose <name> [description]Migrated from the deprecated fpkit-developer plugin. Guides composition and extension of fpkit components.
src/components/<Name>.tsx importing multiple fpkit primitives; extend their prop types with TypeScript; spread ...props. Keep depth ≤ 3.
b. Extend — wrap one fpkit primitive, extend its prop type (not replace), preserve aria-disabled + focus behavior.
c. Custom — use semantic HTML, rem units, CSS variables following the naming standard. Run scripts/validate_css_vars.py before finishing.<button>, not <div role="button">),vitest-axe (NOT jest-axe — Vitest environment).references/composition.md — decision tree, 5 compose patterns, anti-patterns.references/accessibility.md — WCAG AA requirements.references/architecture.md — polymorphic UI, as prop.references/testing.md — Vitest + RTL patterns.@/ import aliases — use relative imports.<componentsDir>/ui.tsx exists, never import from @fpkit/acss.packages/fpkit/src/index.ts. Do not import FieldLabel, FieldInput, Select, or Textarea as named exports (they are not there).--force for any non-empty target.src/main.tsx..acss-target.json is committed — both plugins read and write it; it is the single source of truth for the components directory.Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub shawn-sandy/acss --plugin acss-app-builder