.agents/skills/dependency-maintenance/SKILL.md
Routine dependency maintenance for vite+ pnpm monorepo workspaces. Use when asked to update deps, run audits, fix vulnerabilities, bump packages, or perform periodic maintenance. Covers pnpm catalog protocol, workspace overrides, audit fixes, major version migrations, changelog review, and Node subpath imports.
npx skillsauth add jkker/react-template dependency-maintenanceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Systematic methodology for routine dependency updates in a vite+ pnpm monorepo.
vpx taze -r major # what's outdated
vp pm audit # What's vulnerable
Check pnpm-workspace.yaml catalog entries — these are the SSOT for shared versions. Every workspace should reference catalog: for shared deps.
Classify each outdated package:
| Type | Risk | Action |
| --------- | ----------- | ----------------------------------------------------- |
| Patch | None | Bulk update via vpx taze --write --install |
| Minor | Low | Scan changelog, update |
| Major | Medium–High | Read changelog/migration guide, plan breaking changes |
| Audit fix | Critical | Fix immediately, even if it means override |
For major bumps, always check the changelog:
gh api repos/{owner}/{repo}/releases/latest --jq '.body' | head -80
The catalog: protocol in pnpm-workspace.yaml is the single source of truth for shared versions.
# pnpm-workspace.yaml
catalog:
react: ^19.2.4
vite: ^8.0.2
vitest: 4.1.1 # Pin exact for test reproducibility
# In any package.json:
'dependencies': {
'react': 'catalog:', # Resolves to ^19.2.4
'vitest': 'catalog:', # Resolves to 4.1.1
}
Rules:
^) for reproducibilitycatalog: for @types/* used in multiple packagesupdateConfig.ignoreDependencies list in workspace yaml for deps managed elsewhere (e.g., @types/node pinned to a specific LTS)When a vulnerability is in a transitive dependency you can't update directly:
overrides:
# Target specific dependency chains
drizzle-orm>kysely: '>=0.28.14'
# Or blanket override by version range
kysely@<=0.28.13: '>=0.28.14'
# Remove unwanted optional deps
better-auth>@better-auth/mongo-adapter: '-'
Quirk: parent>dep overrides only affect direct deps, not peers. For peer deps pulled transitively, use the version-range pattern dep@<=bad: '>=fixed'.
After overrides, verify: pnpm ls <pkg> --depth=5 to confirm the patched version resolved.
Prefer # subpath imports over TypeScript paths for intra-package references:
// package.json
{
"imports": {
"#*": ["./src/*", "./src/*.ts", "./src/*.tsx"]
}
}
// Before: import { cn } from '@mylib/ui/lib/utils'
// After: import { cn } from '#lib/utils'
Quirks:
# via package.json imports when resolvePackageJsonImports: true (default in bundler moduleResolution)*.ts, *.tsx) for TypeScript to find type declarationscomponents.json (shadcn) aliases to match: "utils": "#lib/utils"sed -i '' "s|from '@pkg/name/|from '#|g" $(find src -name '*.tsx' -o -name '*.ts')vp i # Should be clean, no warnings
vp pm audit # Must be 0 vulnerabilities
vp check # 0 errors
vp test run # Relevant tests pass
Create docs/maintenance/YYYY-MM-DD-<slug>.md with:
@types/node auto-discovery changes). Check moduleResolution: "node16" packages — they may need explicit "types": ["node"].@tanstack/* packages across all workspaces must be on the same minor.@vitejs/plugin-react 6.0: Babel integration extracted — use @rolldown/plugin-babel with reactCompilerPreset() instead of inline babel config.@base-ui/react renames: Components periodically graduate from *Preview to stable names (e.g., DrawerPreview → Drawer).peerDependencyRules.allowedVersions when upstream packages haven't updated their peer ranges for a new major.pnpm audit vs overrides: Overrides take effect after vp i — always re-install before re-auditing.tools
Type-safe Zustand state management with auto-generated hooks, selectors, and actions. Use when implementing or working with Zustand stores in React apps, especially when creating new stores, adding selectors/actions, using middleware (devtools, persist, immer, mutative), or migrating from plain Zustand to get better DX with less boilerplate.
development
Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
development
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
testing
Manage TanStack Intent skill-to-task mappings. Use when adding, updating, or discovering agent skills from installed npm packages, or when re-syncing intent-skills after dependency updates.