arch-upkeep
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 packagearch-tsdown— single-package TS library with tsdownarch-tsdown-cli— CLI apps built on tsdownarch-unplugin— libraries built as unplugin (Vite/Rollup/Webpack/ESBuild)arch-webext-vue— browser extensions using Vuearch-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-monorepocandidate)- Has
pnpm-workspace.yamlorpackages/*,apps/*, or similar layout - Multiple
package.jsonfiles underpackages/orapps/ - Shared tooling at root (
eslint.config.*,vitest.config.*,tsconfig.base.json, etc.)
- Has
-
Single TS library (
arch-tsdowncandidate)- Single
package.jsonat root - Library-style exports (
main,module,types, maybeexports) - No
binentrypoint, no browser manifest, no VS Code extension manifest
- Single
-
CLI (
arch-tsdown-clicandidate)- Root
package.jsonwith"bin"or"package.json#exports"pointing to CLI entry - Uses
#!/usr/bin/env nodein entry file - Often depends on
cac,commander,yargs, etc.
- Root
-
unplugin-based library (
arch-unplugincandidate)- Depends on
unplugin - Exports
createUnplugin, or has files undersrc/core/,src/vite.ts,src/webpack.ts, etc. - Targets bundlers (Vite/Rollup/Webpack/ESBuild)
- Depends on
-
Browser extension + Vue (
arch-webext-vuecandidate)- 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)
- Has
-
VS Code extension (
arch-vscodecandidate)- Has
package.jsonwith"contributes","activationEvents","engines.vscode" src/extension.tsor similar activation entry
- Has
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 anarch-tsdownor monorepo setup) - Browser extension + Vue →
arch-webext-vue(app layer) plusarch-tsdownfor any shared libs - VS Code extension →
arch-vscode(extension app) plusarch-tsdownfor 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.
- Use your platform’s “list skills” command / UI (for example, look for
-
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.
- From the Agent Skills catalog (or your platform’s marketplace), search for the exact name, e.g.
-
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-clion the CLI package, andarch-tsdownfor shared libs. - For VS Code extension with shared libs: use
arch-vscodefor the extension host +arch-tsdownfor shared modules. - For web extension + shared TS libs: use
arch-webext-vuefor the extension app +arch-tsdownfor the reusable packages.
- For monorepo + CLI: use
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, rootpackage.json, workspace ranges, pnpm catalogs as perarch-tsdown-monorepo. - For single packages: align folder structure (
src/,dist/,tests/), tsconfig names, etc. witharch-tsdown.
- For monorepos: align
-
Migrate build to tsdown (where applicable)
- Replace legacy build scripts (
tsc,rollup,tsup, etc.) withtsdownconfigs from the target skill. - Ensure
package.json#exports,main/module/types, andfilesfields match the target pattern.
- Replace legacy build scripts (
-
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 -rorpnpm --filter.
- Standardize on the script names from the target architecture (
-
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
bumppor 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-tsdownorarch-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.
- Treat the package as a canonical TS library/CLI; keep
-
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.