arch-upkeep
arch-upkeep is a meta architecture skill for keeping existing projects aligned with the canonical starter stacks:
arch-tsdown-monorepo — pnpm monorepo for TS libs with tsdown per package
arch-tsdown — single-package TS library with tsdown
arch-tsdown-cli — CLI apps built on tsdown
arch-unplugin — libraries built as unplugin (Vite/Rollup/Webpack/ESBuild)
arch-webext-vue — browser extensions using Vue
arch-vscode — VS Code extensions
Use this skill when a project already exists and you want to:
- Identify what architecture it currently matches (lib / CLI / monorepo / webext / vscode / unplugin / mixed)
- Plan a migration to one of the canonical
arch-* starters
- Incrementally upgrade tooling, scripts, and CI without rewriting app logic
This skill does not re-specify each architecture in detail — it helps you pick which arch-skill to apply and in what order.
Quick start
- Classify the repo using the checks in 1. Detect current architecture.
- Map to target skills using 2. Choose the target architecture skill(s).
- Ensure required
arch-* skills are installed via 2.1 Check & install required skills.
- Plan incremental migration using 3. Migration strategy (incremental) and 4. Architecture-specific notes.
- Run an upkeep pass with the checklist in 5. Checklist: running an “arch upkeep” on a repo.
1. Detect current architecture
Start by classifying the repo. Use these quick heuristics (you can apply multiple, projects may be “monorepo + CLI” etc.):
Monorepo (arch-tsdown-monorepo candidate)
- Has
pnpm-workspace.yaml or packages/*, apps/*, or similar layout
- Multiple
package.json files under packages/ or apps/
- Shared tooling at root (
eslint.config.*, vitest.config.*, tsconfig.base.json, etc.)
Single TS library (arch-tsdown candidate)
- Single
package.json at root
- Library-style exports (
main, module, types, maybe exports)
- No
bin entrypoint, no browser manifest, no VS Code extension manifest
CLI (arch-tsdown-cli candidate)
- Root
package.json with "bin" or "package.json#exports" pointing to CLI entry
- Uses
#!/usr/bin/env node in entry file
- Often depends on
cac, commander, yargs, etc.
unplugin-based library (arch-unplugin candidate)
- Depends on
unplugin
- Exports
createUnplugin, or has files under src/core/, src/vite.ts, src/webpack.ts, etc.
- Targets bundlers (Vite/Rollup/Webpack/ESBuild)
Browser extension + Vue (arch-webext-vue candidate)
- Has
manifest.json/manifest.v3.json (Chrome/Firefox extension)
- Vue SPA for popup/options or content scripts
- Build tooling around web extension dev (
web-ext, wxt, or custom scripts)
VS Code extension (arch-vscode candidate)
- Has
package.json with "contributes", "activationEvents", "engines.vscode"
src/extension.ts or similar activation entry
Once you know what it “mostly is”, pick one primary architecture as the upgrade target. If the repo is mixed (e.g. monorepo with a CLI package), pair arch-tsdown-monorepo with the relevant per-package skill (arch-tsdown, arch-tsdown-cli, etc.).
2. Choose the target architecture skill(s)
Map your classification to the canonical skills:
- pnpm multi-package repo → start with
arch-tsdown-monorepo
- Single TS library →
arch-tsdown
- CLI (single or inside a monorepo package) →
arch-tsdown-cli
- unplugin lib →
arch-unplugin (often inside an arch-tsdown or monorepo setup)
- Browser extension + Vue →
arch-webext-vue (app layer) plus arch-tsdown for any shared libs
- VS Code extension →
arch-vscode (extension app) plus arch-tsdown for shared libs
Then:
- Open the corresponding
arch-* skill(s).
- Use their “overview” / “core” references as the target design you want your existing repo to converge to.
- Plan an incremental migration: configs and scripts first, CI next, then release automation.
2.1 Check & install required skills
Because arch-upkeep is only an orchestrator, it expects the concrete arch-* skills to be installed and usable in the agent environment.
Recommended flow:
List installed skills in your agent runtime
- Use your platform’s “list skills” command / UI (for example, look for
arch-tsdown-monorepo, arch-tsdown, arch-tsdown-cli, arch-unplugin, arch-webext-vue, arch-vscode).
- If a target architecture skill is already present, you can call it directly.
If a required skill is missing, install it by name
- From the Agent Skills catalog (or your platform’s marketplace), search for the exact name, e.g.
arch-tsdown-monorepo.
- Install it into the current agent profile / workspace.
Verify installation before proceeding
- Re-run the “list skills” view and confirm the skill appears and is enabled.
- Optionally open its
SKILL.md (or skill details in UI) to confirm version and scope.
Compose multiple skills in one upkeep session
- For monorepo + CLI: use
arch-tsdown-monorepo + arch-tsdown-cli on the CLI package, and arch-tsdown for shared libs.
- For VS Code extension with shared libs: use
arch-vscode for the extension host + arch-tsdown for shared modules.
- For web extension + shared TS libs: use
arch-webext-vue for the extension app + arch-tsdown for the reusable packages.
Only after the relevant skills are installed and verified should you start applying the migration steps below.
3. Migration strategy (incremental)
General principles:
- Do not rewrite app logic. Only swap out infrastructure (build, test, lint, CI, release).
- One layer at a time. Avoid changing bundler, test runner, and tsconfig all in a single PR if you can split it.
- Keep Git history readable. Separate commits for “tooling move” vs “code fixes”.
Recommended order:
Normalize package layout
- For monorepos: align
packages/* layout, root package.json, workspace ranges, pnpm catalogs as per arch-tsdown-monorepo.
- For single packages: align folder structure (
src/, dist/, tests/), tsconfig names, etc. with arch-tsdown.
Migrate build to tsdown (where applicable)
- Replace legacy build scripts (
tsc, rollup, tsup, etc.) with tsdown configs from the target skill.
- Ensure
package.json#exports, main/module/types, and files fields match the target pattern.
Align testing and linting
- Move to the recommended test runner (Vitest) and ESLint setup from the relevant arch skill.
- For monorepos, centralize configs at root with per-package overrides where needed.
Synchronize scripts
- Standardize on the script names from the target architecture (
build, dev, test, lint, typecheck, release, etc.).
- For monorepos, prefer root scripts using
pnpm -r or pnpm --filter.
Upgrade CI and release
- Adopt the GitHub Actions / release workflows from the relevant arch skills.
- If applicable, migrate to npm Trusted Publisher, tag-based release, and
bumpp or similar.
Clean up
- Remove obsolete configs, scripts, and unused devDependencies once the new pipeline is green.
4. Architecture-specific notes
When targeting arch-tsdown-monorepo:
- Centralize tooling (ESLint, Vitest, TS base config) at root.
- Convert cross-package dependencies to
workspace:* ranges.
- Make each package buildable with tsdown independently.
When targeting arch-tsdown or arch-tsdown-cli:
- Treat the package as a canonical TS library/CLI; keep
src/ clean and side-effect free where possible.
- Ensure binary entrypoints are small bootstrap files that import from internal modules.
When targeting arch-unplugin:
- Keep the unplugin core small and composable.
- Provide clear exports for different bundlers (Vite, Rollup, Webpack, ESBuild) via the unified unplugin API.
When targeting arch-webext-vue:
- Separate app UI (Vue) from background/service worker logic and shared utilities.
- Prefer shared TS libs (using
arch-tsdown) for logic that can be reused outside the extension.
When targeting arch-vscode:
- Keep the extension host code (activation, commands) thin.
- Move heavy logic to shared TS libs where possible.
5. Checklist: running an “arch upkeep” on a repo
Use this as a repeatable workflow:
- Classify architecture (monorepo / lib / CLI / unplugin / webext / vscode).
- Pick the primary
arch-* skill(s) that match the desired end state.
- Read their overview/core references and write down the target structure and scripts.
- Plan incremental steps (layout → build → test/lint → CI → release).
- Apply changes while keeping app logic intact.
- Delete legacy tooling once the new pipeline passes.
After this, the project should look and behave like it was originally scaffolded from the chosen starter, which makes future maintenance and onboarding much easier.
1---2name: arch-upkeep3description: Architecture health-check and upgrade orchestrator. Use to detect a repo’s current shape (lib/cli/monorepo/webext/vscode/...) and migrate it onto the canonical tsdown-based starter architectures.4---5
6# arch-upkeep
7
8`arch-upkeep` is a **meta architecture skill** for keeping existing projects aligned with the canonical starter stacks:
9
10- `arch-tsdown-monorepo` — pnpm monorepo for TS libs with tsdown per package
11- `arch-tsdown` — single-package TS library with tsdown
12- `arch-tsdown-cli` — CLI apps built on tsdown
13- `arch-unplugin` — libraries built as unplugin (Vite/Rollup/Webpack/ESBuild)
14- `arch-webext-vue` — browser extensions using Vue
15- `arch-vscode` — VS Code extensions
16
17Use this skill when a project already exists and you want to:
18
19- **Identify** what architecture it currently matches (lib / CLI / monorepo / webext / vscode / unplugin / mixed)
20- **Plan** a migration to one of the canonical `arch-*` starters
21- **Incrementally upgrade** tooling, scripts, and CI without rewriting app logic
22
23> This skill does not re-specify each architecture in detail — it helps you pick **which arch-skill** to apply and in what order.
24
25## Quick start
26
271. **Classify the repo** using the checks in **1. Detect current architecture**.
282. **Map to target skills** using **2. Choose the target architecture skill(s)**.
293. **Ensure required `arch-*` skills are installed** via **2.1 Check & install required skills**.
304. **Plan incremental migration** using **3. Migration strategy (incremental)** and **4. Architecture-specific notes**.
315. **Run an upkeep pass** with the checklist in **5. Checklist: running an “arch upkeep” on a repo**.
32
33## 1. Detect current architecture
34
35Start by classifying the repo. Use these quick heuristics (you can apply multiple, projects may be “monorepo + CLI” etc.):
36
37- **Monorepo (`arch-tsdown-monorepo` candidate)**
38 - Has `pnpm-workspace.yaml` or `packages/*`, `apps/*`, or similar layout
39 - Multiple `package.json` files under `packages/` or `apps/`
40 - Shared tooling at root (`eslint.config.*`, `vitest.config.*`, `tsconfig.base.json`, etc.)
41
42- **Single TS library (`arch-tsdown` candidate)**
43 - Single `package.json` at root
44 - Library-style exports (`main`, `module`, `types`, maybe `exports`)
45 - No `bin` entrypoint, no browser manifest, no VS Code extension manifest
46
47- **CLI (`arch-tsdown-cli` candidate)**
48 - Root `package.json` with `"bin"` or `"package.json#exports"` pointing to CLI entry
49 - Uses `#!/usr/bin/env node` in entry file
50 - Often depends on `cac`, `commander`, `yargs`, etc.
51
52- **unplugin-based library (`arch-unplugin` candidate)**
53 - Depends on `unplugin`
54 - Exports `createUnplugin`, or has files under `src/core/`, `src/vite.ts`, `src/webpack.ts`, etc.
55 - Targets bundlers (Vite/Rollup/Webpack/ESBuild)
56
57- **Browser extension + Vue (`arch-webext-vue` candidate)**
58 - Has `manifest.json`/`manifest.v3.json` (Chrome/Firefox extension)
59 - Vue SPA for popup/options or content scripts
60 - Build tooling around web extension dev (`web-ext`, `wxt`, or custom scripts)
61
62- **VS Code extension (`arch-vscode` candidate)**
63 - Has `package.json` with `"contributes"`, `"activationEvents"`, `"engines.vscode"`
64 - `src/extension.ts` or similar activation entry
65
66Once you know what it “mostly is”, pick **one primary architecture** as the upgrade target. If the repo is mixed (e.g. monorepo with a CLI package), pair `arch-tsdown-monorepo` with the relevant per-package skill (`arch-tsdown`, `arch-tsdown-cli`, etc.).
67
68## 2. Choose the target architecture skill(s)
69
70Map your classification to the canonical skills:
71
72- **pnpm multi-package repo** → start with `arch-tsdown-monorepo`
73- **Single TS library** → `arch-tsdown`
74- **CLI** (single or inside a monorepo package) → `arch-tsdown-cli`
75- **unplugin** lib → `arch-unplugin` (often inside an `arch-tsdown` or monorepo setup)
76- **Browser extension + Vue** → `arch-webext-vue` (app layer) plus `arch-tsdown` for any shared libs
77- **VS Code extension** → `arch-vscode` (extension app) plus `arch-tsdown` for shared libs
78
79Then:
80
811. **Open the corresponding `arch-*` skill(s)**.
822. **Use their “overview” / “core” references** as the target design you want your existing repo to converge to.
833. Plan an incremental migration: configs and scripts first, CI next, then release automation.
84
85### 2.1 Check & install required skills
86
87Because `arch-upkeep` is only an orchestrator, it expects the concrete `arch-*` skills to be **installed and usable** in the agent environment.
88
89Recommended flow:
90
911. **List installed skills** in your agent runtime
92 - Use your platform’s “list skills” command / UI (for example, look for `arch-tsdown-monorepo`, `arch-tsdown`, `arch-tsdown-cli`, `arch-unplugin`, `arch-webext-vue`, `arch-vscode`).
93 - If a target architecture skill is already present, you can call it directly.
94
952. **If a required skill is missing, install it by name**
96 - From the Agent Skills catalog (or your platform’s marketplace), search for the exact name, e.g. `arch-tsdown-monorepo`.
97 - Install it into the current agent profile / workspace.
98
993. **Verify installation before proceeding**
100 - Re-run the “list skills” view and confirm the skill appears and is enabled.
101 - Optionally open its `SKILL.md` (or skill details in UI) to confirm version and scope.
102
1034. **Compose multiple skills in one upkeep session**
104 - For **monorepo + CLI**: use `arch-tsdown-monorepo` + `arch-tsdown-cli` on the CLI package, and `arch-tsdown` for shared libs.
105 - For **VS Code extension with shared libs**: use `arch-vscode` for the extension host + `arch-tsdown` for shared modules.
106 - For **web extension + shared TS libs**: use `arch-webext-vue` for the extension app + `arch-tsdown` for the reusable packages.
107
108Only after the relevant skills are installed and verified should you start applying the migration steps below.
109
110## 3. Migration strategy (incremental)
111
112General principles:
113
114- **Do not rewrite app logic.** Only swap out **infrastructure** (build, test, lint, CI, release).
115- **One layer at a time.** Avoid changing bundler, test runner, and tsconfig all in a single PR if you can split it.
116- **Keep Git history readable.** Separate commits for “tooling move” vs “code fixes”.
117
118Recommended order:
119
1201. **Normalize package layout**
121 - For monorepos: align `packages/*` layout, root `package.json`, workspace ranges, pnpm catalogs as per `arch-tsdown-monorepo`.
122 - For single packages: align folder structure (`src/`, `dist/`, `tests/`), tsconfig names, etc. with `arch-tsdown`.
123
1242. **Migrate build to tsdown (where applicable)**
125 - Replace legacy build scripts (`tsc`, `rollup`, `tsup`, etc.) with `tsdown` configs from the target skill.
126 - Ensure `package.json#exports`, `main/module/types`, and `files` fields match the target pattern.
127
1283. **Align testing and linting**
129 - Move to the recommended test runner (Vitest) and ESLint setup from the relevant arch skill.
130 - For monorepos, centralize configs at root with per-package overrides where needed.
131
1324. **Synchronize scripts**
133 - Standardize on the script names from the target architecture (`build`, `dev`, `test`, `lint`, `typecheck`, `release`, etc.).
134 - For monorepos, prefer root scripts using `pnpm -r` or `pnpm --filter`.
135
1365. **Upgrade CI and release**
137 - Adopt the GitHub Actions / release workflows from the relevant arch skills.
138 - If applicable, migrate to **npm Trusted Publisher**, tag-based release, and `bumpp` or similar.
139
1406. **Clean up**
141 - Remove obsolete configs, scripts, and unused devDependencies once the new pipeline is green.
142
143## 4. Architecture-specific notes
144
145- **When targeting `arch-tsdown-monorepo`:**
146 - Centralize tooling (ESLint, Vitest, TS base config) at root.
147 - Convert cross-package dependencies to `workspace:*` ranges.
148 - Make each package buildable with tsdown independently.
149
150- **When targeting `arch-tsdown` or `arch-tsdown-cli`:**
151 - Treat the package as a canonical TS library/CLI; keep `src/` clean and side-effect free where possible.
152 - Ensure binary entrypoints are small bootstrap files that import from internal modules.
153
154- **When targeting `arch-unplugin`:**
155 - Keep the unplugin core small and composable.
156 - Provide clear exports for different bundlers (Vite, Rollup, Webpack, ESBuild) via the unified unplugin API.
157
158- **When targeting `arch-webext-vue`:**
159 - Separate app UI (Vue) from background/service worker logic and shared utilities.
160 - Prefer shared TS libs (using `arch-tsdown`) for logic that can be reused outside the extension.
161
162- **When targeting `arch-vscode`:**
163 - Keep the extension host code (activation, commands) thin.
164 - Move heavy logic to shared TS libs where possible.
165
166## 5. Checklist: running an “arch upkeep” on a repo
167
168Use this as a repeatable workflow:
169
1701. **Classify architecture** (monorepo / lib / CLI / unplugin / webext / vscode).
1712. **Pick the primary `arch-*` skill(s)** that match the desired end state.
1723. **Read their overview/core references** and write down the target structure and scripts.
1734. **Plan incremental steps** (layout → build → test/lint → CI → release).
1745. **Apply changes** while keeping app logic intact.
1756. **Delete legacy tooling** once the new pipeline passes.
176
177After this, the project should look and behave like it was originally scaffolded from the chosen starter, which makes future maintenance and onboarding much easier.