Setup TypeScript Repository

This documentation was generated with the assistance of AI. Please report any inaccuracies.

End-to-end bootstrap for an npm/TypeScript repository of any of seven flavors. It collects the flavor, the project’s identity, and the shared pipeline parameters once, announces whether it is setting up from scratch or updating an existing repository, then orchestrates six other skills in a fixed order so nothing is asked twice.

Purpose

iru-setup-typescript-repository is the front door for starting (or catching up) a brand-new npm/TypeScript repository, whatever its shape — a published library, a React, Next.js or Angular web app, a NestJS backend service, or a React Native or Ionic mobile app. Rather than duplicating each flavor’s scaffold logic, documentation setup, .gitignore rules, CI workflows, changelog bootstrapping, or README generation, it resolves the flavor and mode, gathers the project’s identity and the shared pipeline parameters (open-source, publish/distribution, Sonar, integration branch, Node version, package manager, repository visibility, CI, CI test scope, GitHub Pages) plus the flavor-specific choices that shape later steps (React Native toolchain Expo or Metro, NestJS orm/database, Next.js output/e2e) once, and passes each downstream skill only the args keys it actually accepts. It opens with a "Setup mode" statement and an inventory of every component it owns (absent / present / partial); the keep/update/replace question for pre-existing files is asked by each sub-skill, never by this orchestrator, and the final report lists the action taken per component. For private or internal repositories it states the cost context (included Actions minutes per plan, macOS minutes roughly 10x Linux for the iOS release job and the Metro iOS simulator build, SonarCloud being free only for public open-source projects, GitHub Pages requiring a paid plan) and recommends accordingly.

Plugin

Shipped by the iru-typescript plugin of the ai-catalog marketplace (install with /plugin install iru-typescript@ai-catalog; see Plugins).

Invocation

/iru-setup-typescript-repository

Optionally followed by args (key: value lines, one per line) to pre-resolve any input below.

Inputs

Argument Required Description Default

flavor

No

library/react/nextjs/angular/nestjs/react-native/ionic. Pre-selected from an iru-explore Project type: line earlier in the conversation (confirmed with one question), otherwise resolved via two short AskUserQuestion rounds (web app then React/Next.js/Angular; mobile app then React Native vs. Ionic; backend service sets nestjs directly), plus a further round for Ionic’s own framework choice.

Asked

mode

No

new/existing. Defaults to existing (confirmed) when package.json already exists at the repository root, otherwise new without asking. Any other owned artifact already present still makes this an update for that component, even under mode: new.

Derived from package.json presence

on-existing

No

ask/keep/update/replace. Never asked by this skill; forwarded to every file-writing sub-skill only when it arrived via args, so they apply it instead of asking per pre-existing file.

Not forwarded (each sub-skill asks)

name / scope / app-id / app-slug / description / license / developer-name / developer-email / organization-url / directory / storybook

Yes (per flavor)

Free-text project-identity fields, asked directly; which apply depends on the resolved flavor (e.g. scope is library-only, app-id is Ionic and React Native (required for Metro, optional for Expo), description is not collected for angular/react-native). name is mapped to each scaffold skill’s own key (package-name, app-name or name).

None — user must supply

open-source

No

Whether the repository is open source. Drives the recommended defaults for publish/distribution/sonar/ visibility.

Asked

visibility

No

public/private/internal. Detected via gh repo view when the repository has a GitHub remote, otherwise asked (Public recommended when open source). A contradictory combination (open source but private/internal) is flagged. internal is treated like private for every cost decision.

Detected, else asked

ci

No

yes/no: generate GitHub Actions workflows. For private/internal repositories the Actions-minutes cost (and macOS cost for the iOS release job) is stated first. With no, the workflows step is skipped entirely (no workflows, security.yml, or Dependabot config) and ci-tests/pages are not asked.

Asked (yes recommended)

ci-tests

No

unit/full. Only asked when ci: yes for react/angular/ionic, nextjs with e2e: playwright, and nestjs (whose e2e suite starts a real database via Testcontainers when orm is set): unit tests only (recommended for private/internal) or unit plus e2e (recommended for public). Also asked for Metro react-native (full adds Maestro flows on an Android emulator). Left unset for library, Expo react-native, and nextjs with e2e: none.

Asked where applicable

pages

No

yes/no: publish the Antora site (and, for react/angular/static nextjs, the web app) to GitHub Pages. Defaults to yes for public repositories without asking; for private/internal, no is recommended because Pages needs a paid plan and the site would be public.

yes if public, else asked

accessibility

No

enforce, report, off or none — UI flavors only (react, nextjs, angular, react-native, ionic; ignored with a note for library/nestjs): the automated accessibility level of the UI tests, written by the scaffold to .ui-quality.yml. Asked once in Step 4 (regardless of ci) ("Support accessibility and assistive technologies?") with Enforce recommended; none opts out entirely (no accessibility rules, checks or docs) and, in mode: existing, is pre-selected from iru-explore’s `Accessibility: line. Forwarded to the UI scaffolds. See Building user interfaces.

Asked for UI flavors

publish

No

Library only: publish to the public npm registry.

yes if open source, else asked (no recommended)

distribution

No

React Native/Ionic: none/internal/store. NestJS and server-output Next.js: none/internal only, where internal pushes the container image to GHCR. Static Next.js export: forced to none without asking.

store if open source (mobile), else asked (internal recommended)

sonar (+ sonar-organization/sonar-project-key/sonar-host-url)

No

cloud/self-hosted/none.

cloud only if open source and public, else asked (none recommended)

toolchain

No

React Native only: expo (the Expo framework) or metro (a bare React Native Community CLI app with committed android//ios/ projects). From args, else the iru-explore parenthesis, else detected on an existing repository (an expo dependency means expo; metro.config.js, committed native projects or the community CLI mean metro), else asked once with Expo recommended; forwarded to the scaffold and workflows skills.

Detected, else asked

native-builds

No

React Native with toolchain: expo only: eas (cloud builds) or local. Never asked or forwarded for Metro, whose native projects are always built locally.

eas

framework

No

Ionic only: its own UI framework, angular or react.

Asked

orm / database

No

NestJS only: none/typeorm/prisma/mongoose/drizzle and postgresql/mysql/mongodb (asked only when orm is not none). Collected here because the workflows skill needs orm. module-system and http are left for the scaffold to ask.

none

output / e2e

No

Next.js only: server (standalone Node) or static (export, deployable to Pages), and playwright/none. Collected here because they change release.yml and build.yml. router, cache-components and styling are left for the scaffold to ask.

Asked

integration-branch / stable-branch / node-version / package-manager

No

Shared pipeline parameters fed to the scaffold and workflow skills. integration-branch is also forwarded to iru-setup-typescript-library only, for its changeset baseBranch.

develop / main / 24 / npm

Also accepted: distribution’s and `sonar’s detail keys as listed above, and `name/scope/identity fields per flavor.

Outputs

  • A "Setup mode" announcement (from scratch vs updating an existing repository) with a per-component inventory (for UI flavors including .ui-quality.yml).

  • The flavor’s own scaffold output — package.json and toolchain files (via iru-setup-typescript-library, iru-setup-react-web, iru-setup-nextjs-web, iru-setup-angular-web, iru-setup-nestjs-app, iru-setup-react-native-app, or iru-setup-ionic-app). When files already exist, the scaffold skill itself asks Update / Keep as is / Replace per file (or applies on-existing).

  • A scaffolded Antora documentation site under docs/ (via iru-setup-antora).

  • A root .gitignore covering node_modules/, build output, coverage, and the Antora build output (via iru-setup-typescript-gitignore).

  • build.yml/release.yml/sync.yml/security.yml GitHub Actions workflows and .github/dependabot.yml (via iru-setup-typescript-github-workflows) — skipped entirely when ci: no, with the security block (Dependabot, dependency-review, CodeQL, OSV-Scanner, gitleaks) skipped alongside.

  • A root CHANGELOG.md backfilled from git/GitHub release history (via iru-setup-changelog).

  • A root README.md with badges, a project-status table, documentation links, and installation instructions (via iru-setup-readme).

  • A final report summarizing the resolved flavor/mode/identity/license/pipeline parameters (including visibility, ci, ci-tests, pages), which files were created / updated / replaced / kept as is / skipped (ci: no) with mismatches listed for kept files, the cost context for private repositories, the consolidated required-secrets table, decisions made on the user’s behalf, and an explicit warning to review every generated file before building, committing, or relying on CI.

Execution flow

flowchart TD A[Start /iru-setup-typescript-repository] --> B["Step 0: Parse args\n(key: value lines)"] B --> C{"Step 1: Resolve flavor & mode"} C -- flavor unset or\nfrom iru-explore --> C1["AskUserQuestion:\nlibrary / web app / backend service / mobile app,\nthen react vs nextjs vs angular,\nreact-native vs ionic, ionic framework"] C1 --> C1b["If react-native: resolve toolchain once\n(args / iru-explore / detected /\nasked: Expo vs Metro)"] C1b --> C2 C -- flavor set --> C2["Announce setup mode:\nfrom scratch, or updating with\ncomponent inventory"] C2 --> D["Step 2: Collect project identity\n(skipped when mode existing and\npackage.json present)"] D --> E["Step 3: Collect flavor-specific inputs\n(directory, storybook, app-slug,\napp-id, native-builds for expo, nestjs orm, nextjs output/e2e)"] E --> F["Step 4: Collect shared pipeline params\n(open-source, visibility, ci, publish/distribution,\nsonar, ci-tests, pages, accessibility for UI flavors,\nbranches, node, package manager)"] F --> I["Step 5: Run flavor's scaffold skill\n(via sub-agent; it asks\nUpdate / Keep / Replace per file)"] I -- user chose stop --> J[Stop entire pipeline; report] I -- ok or kept --> K["Step 6: Run setup-antora\n(via sub-agent)"] K --> L["Step 7: Run setup-typescript-gitignore\n(via sub-agent)"] L --> L2{"Step 8: ci is no?"} L2 -- yes --> L3["Skip workflows and security block;\nrecord skipped in report"] L2 -- no --> M["Derive docs-tool from flavor\n(or from disk for nextjs/nestjs);\nrun setup-typescript-github-workflows\n(via sub-agent)"] M -- workflows existed, user stopped --> N["Note in report;\ncontinue"] M -- ok --> N L3 --> N N --> O["Step 9: Run setup-changelog\n(via sub-agent)"] O --> P["Step 10: Run setup-readme\n(via sub-agent)"] P --> Q["Step 11: Report per-component actions,\ncost context, secrets table, and review warnings"]

Dependencies

Invokes

Each of the following is invoked via the iru-isolated-skill-executor agent rather than a direct Skill call — every sub-skill re-derives what it needs straight from the filesystem this orchestrator has just written to, so only a short completion summary needs to come back, keeping each sub-skill’s own exploration/file reads out of this orchestrator’s own context:

  • Setup TypeScript Library — Step 5, when flavor: library: writes package.json and the library toolchain, passing identity and pipeline args.

  • Setup React Web — Step 5, when flavor: react: scaffolds a Vite React app, passing identity, pipeline, and storybook args (no publish/distribution key).

  • Setup Next.js Web — Step 5, when flavor: nextjs: scaffolds a Next.js app, passing identity, output, e2e, distribution, package-manager, node-version and pipeline args; router, cache-components and styling only if they arrived via args. pages is deliberately not sent.

  • Setup NestJS App — Step 5, when flavor: nestjs: scaffolds a NestJS service, passing identity, orm, database (only when orm is not none), distribution, package-manager, node-version and pipeline args; module-system and http only if they arrived via args.

  • Setup Angular Web — Step 5, when flavor: angular: scaffolds an Angular CLI app, passing identity (no description), directory, and pipeline args.

  • Setup React Native App — Step 5, when flavor: react-native: scaffolds an Expo or Metro React Native app, passing identity (no description), toolchain, app-id, app-slug, app-directory, native-builds (Expo only), and distribution args.

  • Setup Ionic App — Step 5, when flavor: ionic: scaffolds a Capacitor hybrid app, passing framework, app-id, identity, and distribution args.

  • Setup Antora — Step 6: scaffolds the Antora documentation site, invoked with no args (or only on-existing when supplied) since it derives the component name/title/version directly from package.json. Run before Step 8 so that skill’s own docs-config survey finds it already in place.

  • Setup TypeScript Gitignore — Step 7: writes or updates the root .gitignore, invoked with no args (or only on-existing when supplied) since it explores the repository directly (package manager, framework, Playwright, docs tooling).

  • Setup TypeScript GitHub Workflows — Step 8: writes the CI/CD workflows, passing flavor, the pipeline parameters (including visibility, pages, and ci-tests where resolved), publish/distribution/toolchain/native-builds (Expo only)/framework/orm/output/e2e (only when the flavor uses them), and the derived docs-tool as args. Skipped entirely when ci: no.

  • Setup Changelog — Step 9: bootstraps the root CHANGELOG.md, invoked with no args (or only on-existing when supplied) since it works from the repository’s own git tag/GitHub Release history.

  • Setup Readme — Step 10, last: bootstraps the root README.md, passing sonar, ci, and pages (plus on-existing when supplied); it explores the finished state left by every earlier step.

Invoked by

  • iru-isolated-skill-executor — spawned once per sub-skill (Steps 5–10, except Step 8 when ci: no), so all six sub-skills' own exploration/file-read transcripts don’t accumulate in this orchestrator’s context over the course of a single bootstrap run.

Source

SKILL.md on GitHub — the file this page was generated from.