← Browse

@the-agency-ai/ui-add

B

Add a frontend app (Next.js) to an existing workstream using a SPEC-PROVIDER starter pack

skillclaude

Install

agr install @the-agency-ai/ui-add --target claude

Writes 1 file into .claude/skills/, pinned to git-8e50a6fb.

  • .claude/skills/ui-add/SKILL.md

Document


description: Add a frontend app (Next.js) to an existing workstream using a SPEC-PROVIDER starter pack

UI Add

Add a frontend app to an existing workstream. Fills the gap where a workstream exists but needs a new UI — a payment UI for the payments workstream, an admin panel for ops, etc.

Uses the SPEC-PROVIDER pattern: the SPEC is the skill invocation (name + workstream + port), the PROVIDER is the starter pack at claude/starter-packs/<type>/.

Arguments

  • $ARGUMENTS: <name> — kebab-case app name (becomes apps/<name>/). Followed by:
    • --workstream <ws> — existing workstream name [required]
    • --type <provider> — starter pack [default: nextjs-app]
    • --port <num> — host port [default: next free in 4100–4199]
    • --base-path <path> — Next.js basePath [default: /<name>]
    • --dry-run — preview all writes without making changes

Examples

/ui-add payments-ui --workstream payments --dry-run
/ui-add admin --workstream ops --port 4150
/ui-add marketing --workstream marketing --base-path /mkt

What it does

  1. Validates name (kebab-case, not reserved), workstream (exists), starter pack (exists), no collision (apps/<name>/ must not exist)
  2. Allocates a free port in the frontend range (4100–4199) by scanning docker-compose.dev.yml, unless --port is provided
  3. Invokes the starter pack's install.sh which scaffolds the app files
  4. Updates agency/config/topology.yaml — adds a frontend service entry with wires_from: [backend]
  5. Reports next steps (e.g. pnpm install, pnpm dev — actual commands depend on your configured package manager)

What it does NOT do (v1)

  • Does not edit docker-compose.dev.yml — add the service block manually if needed for the full stack
  • Does not install deps (run your package manager's install at repo root, e.g. pnpm install)
  • Does not init shadcn/Tailwind (uses @of/ui workspace package instead)
  • Does not wire Vercel / Fly.io (cloud providers are separate)
  • Does not update agency.yaml

Idempotency

  • Safe to re-run on --dry-run
  • Refuses to write over existing files (non-zero exit if apps/<name>/ exists)
  • Topology patch is idempotent: reports "already present" if the service is in topology.yaml with matching fields

Available starter packs

  • nextjs-app (v1 default) — Next.js 16 + React 19 + @of/ui workspace, Dockerfile, basePath: /<name>

Instructions

Step 1: Parse and validate

Run ./agency/tools/ui-add $ARGUMENTS and relay the output.

The tool handles validation. If it fails, relay the error verbatim.

Step 2: Report

On success, the tool prints a "Next steps" block. Relay it to the user.

Step 3: Report changed files

List the files the scaffold created/modified so the principal can review before committing. Do NOT auto-commit — commit policy is the principal's decision, consistent with /workstream-create which ends at a report + hand-off.

Changed files for a non-dry-run:

  • apps/<name>/ (new directory, 9 files)
  • agency/config/topology.yaml (modified — new frontend entry)

The principal decides whether to run /iteration-complete immediately, extend docker-compose.dev.yml to include the new app first, or fold the scaffold into a larger iteration.

Trustgrade B

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • passType matchnot applicable to this artifact type

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • warnLicenseno SPDX license detected

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-8e50a6fbe9632026-07-31