Setup TypeScript Library
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Generate the standard npm/TypeScript library toolchain at the repository root — package.json, tsconfig.json,
vitest.config.ts, eslint.config.js, .prettierrc/.prettierignore, typedoc.json, and, when opted in,
sonar-project.properties and .changeset/config.json — plus a minimal src/index.ts + test/index.test.ts
skeleton, from explicit house templates embedded in the skill itself. It announces whether it is creating the
toolchain from scratch or updating an existing one, and asks per pre-existing file.
Purpose
iru-setup-typescript-library bootstraps a new npm/TypeScript library’s build/test/lint/docs toolchain from a
house template: ESM-only package.json and tsconfig.json (moduleResolution: bundler), Vitest with v8 coverage
and an 80%-lines threshold, ESLint 10 flat config (@eslint/js + typescript-eslint recommended
eslint-config-prettier, plus a license-header rule once a license is chosen), Prettier, and Typedoc with
treatWarningsAsErrors. Every devDependency version is looked up from the npm registry at run time (Step 4), with
a recorded fallback only for when that lookup fails, and npm install is run at the end so the scaffold is
immediately buildable. When any owned file already exists it announces "updating an existing setup", warns, and for
each such file asks Update (merge, keeping customizations), Keep as is, or Replace (regenerate from the
template, losing customizations), explaining each option’s consequences; Stop is offered in the first batch.
Plugin
Shipped by the iru-typescript plugin of the ai-catalog marketplace (install with /plugin install iru-typescript@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
Pre-resolved parameters passed by an orchestrating skill (e.g. |
None — if absent or unrecognized, every field is asked interactively. |
|
Yes (unless supplied via |
Unscoped npm package name, e.g. |
None |
|
No |
npm scope without the leading |
Unscoped |
|
No |
One line, used in |
Empty, or `gh repo view’s description if available (Step 3) |
|
Yes (unless supplied via |
Resolved via |
None — user must choose |
|
Yes (unless supplied via |
Populates |
None |
|
No |
Whether the repository is open source ( |
Asked first when invoked stand-alone with nothing pre-resolved |
|
No |
Whether |
|
|
No |
|
|
|
No |
The branch Changesets compares against — written as |
|
|
No |
|
Detected or asked (only when Sonar is asked) |
|
No |
|
Unset |
|
No |
|
|
|
No |
|
|
Outputs
-
package.json,tsconfig.json,vitest.config.ts,eslint.config.js,.prettierrc,.prettierignore,typedoc.jsonat the repository root — created, merged (Update), kept, or regenerated (Replace) per file. -
src/index.tsandtest/index.test.ts— a minimal placeholder module and its test, verified to build/test/ lint/typecheck/document clean. -
sonar-project.properties— only whensonariscloudorself-hosted; withsonar: none, an existing file is removed on Update/Replace and left in place on Keep (reported as a mismatch). -
.changeset/config.json— only whenpublish: yes; withpublish: no, same removal/keep rule. -
node_modules/fromnpm install(orpnpm/yarnif that package manager is already in use in the repository), run at the end of Step 7. -
A report (Step 8) of the mode (from scratch vs update), resolved package identity, the per-file action (created / updated / replaced / kept as is / removed) with mismatches listed for kept files, the
visibilityused and its source, which devDependency versions came from a live lookup versus the recorded fallback, and explicit warnings to review every generated file, add aLICENSEfile if a license was chosen, and set upSONAR_TOKEN/npm publishing credentials before relying onsonar/publish.
Execution flow
Dependencies
Invokes
None — iru-setup-typescript-library is a leaf skill; it does not call any other skill in this catalog. It
mentions iru-check-license and iru-setup-typescript-gitignore in its Step 8 report prose, but does not invoke
either.
Invoked by
-
Setup TypeScript Repository — Step 5, flavor library scaffold, via the
iru-isolated-skill-executoragent.
Related agents
None — this skill runs synchronously; isolation, when used, is applied by its caller (Setup TypeScript Repository), not by this skill itself.
Source
SKILL.md on GitHub — the file this page was generated from.