---
name: ibgib-create-client-app
description: Coordinator skill for scaffolding an ibgib client application (SPA, browser extension, or client frontend of a fullstack project).
---

# Skill: ibgib-create-client-app

## What This Skill Does

Coordinates the modular sub-skills required to scaffold a fully functional, type-safe, and buildable `ibgib` client application.

For architectural foundations, refer to [`docs/IBGIB_CLIENT_APPS_GUIDE.md`](../../../docs/IBGIB_CLIENT_APPS_GUIDE.md).

---

## Coordinated Sub-Skills

1. **`ibgib-create-client-app-core`**: Foundation (Three-tier Bootstrap, Metaspace, Local IndexedDB Storage, Types).
2. **`ibgib-create-client-app-witness`**: Domain Logic (App Witness class, commands, helpers).
3. **`ibgib-create-client-shell`**: UI Shell (Shell service, window event listeners).
4. **`ibgib-create-component`**: Main Application Web Component.
5. **`ibgib-create-client-identity`**: Keystone Identity Components & Remote Hub Sync wiring.
6. **`ibgib-create-client-workspace`**: Unified `CosmologyWorkspaceService` / `WebCosmologyWorkspaceService` data & branching management.

---

## Parameters (Shared Tokens)

Confirm or generate these tokens:
- `{{APP_NAME}}`: kebab-case (e.g. `my-app`)
- `{{APP_DIR_NAME}}`: folder name (e.g. `my-app`)
- `{{APP_CLASSNAME_PREFIX}}`: PascalCase (e.g. `MyApp`)
- `{{APP_CLASSNAME}}`: Full class name (e.g. `MyAppApp_V1`)
- `{{APP_HUMAN_NAME}}`: Natural language (e.g. `My App`)
- `{{APP_VAR_NAME}}`: camelCase (e.g. `myApp`)
- `{{APP_NAME_UPPER}}`: SCREAMING_SNAKE_CASE (e.g. `MY_APP`)
- `{{DB_NAME}}`: IndexedDB name (e.g. `my_app_db`)
- `{{APP_UUID}}`: Generated fresh via `node .agents/skills/ibgib-create-client-app-core/generate-id.js`

---

## Workflow for Greenfield (Fresh Client App)

1. **Prepare Tokens**: Generate fresh `{{APP_UUID}}` and confirm tokens.
2. **Core Engine**: Call `ibgib-create-client-app-core` to scaffold foundational bootstrap files.
3. **App Witness**: Call `ibgib-create-client-app-witness` to scaffold domain logic.
4. **UI Shell**: Call `ibgib-create-client-shell` to scaffold the shell service.
5. **Main Component**: Call `ibgib-create-component` to create the initial app view.
6. **Identity Wiring**: Call `ibgib-create-client-identity` to register Keystone identity components.
7. **Hook Up**:
   - Verify `bootstrap.mts` invokes shell `onEngineReady()` and registers identity components.
   - Configure build script (`build-[app].mts` in monorepo, or local build script if standalone).
