skills/bun-validator/SKILL.md
Validate Bun workspace configuration and detect common monorepo issues. Ensures proper workspace setup, dependency catalogs, isolated installs, and Bun 1.3+ best practices. Use when setting up a Bun monorepo, before adding workspace dependencies, auditing an existing Bun workspace, or validating package.json in CI.
npx skillsauth add shipshitdev/library bun-validatorInstall 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.
python3 scripts/validate.py --root .
python3 scripts/validate.py --root . --strict
# GOOD: v1.3+
bun --version # 1.3.0 or higher
# BAD: v1.2 or earlier
bun --version # 1.2.x
GOOD - Monorepo root:
{
"name": "my-monorepo",
"private": true,
"workspaces": ["apps/*", "packages/*"]
}
BAD - Dependencies in root:
{
"workspaces": ["apps/*"],
"dependencies": {
"react": "^19.0.0" // BAD: Don't put deps in root
}
}
GOOD: See references/full-guide.md (§ Workspace Structure Example) for the full tree — root package.json + bun.lockb, each app/package owns its own package.json.
BAD:
my-monorepo/
├── package.json
├── apps/
│ └── web/
│ ├── package.json
│ └── bun.lockb # BAD: Lockfile in workspace
GOOD - Using workspace protocol:
{
"dependencies": {
"@myorg/ui": "workspace:*",
"@myorg/config": "workspace:^1.0.0"
}
}
BAD - Hardcoded versions:
{
"dependencies": {
"@myorg/ui": "1.0.0" // BAD: Use workspace:*
}
}
GOOD - Centralized versions:
// Root package.json
{
"catalog": {
"react": "^19.0.0",
"typescript": "^5.7.0",
"@types/node": "^22.0.0"
}
}
// apps/web/package.json
{
"dependencies": {
"react": "catalog:" // Uses version from catalog
}
}
GOOD - Default in Bun 1.3: Packages can only access dependencies they explicitly declare.
BAD - Hoisted dependencies:
// Don't disable isolation
{
"workspaces": {
"packages": ["apps/*"],
"nohoist": ["**"] // Don't do this
}
}
See § Dependency Catalogs (Bun 1.3+) above for the catalog syntax.
bun update --interactive # Selectively update deps
bun why react # Explain why a package is installed
# Install in specific workspace
bun add express --cwd apps/api
# Run script in workspace
bun run --cwd apps/web dev
# Run in all workspaces
bun run --filter '*' build
Cause: Dependency not declared in workspace package.json
Fix:
bun add <package> --cwd <workspace>
Cause: Running bun install in workspace directory
Fix:
rm apps/*/bun.lockb packages/*/bun.lockb
bun install # From root only
Cause: Same package with different versions across workspaces
Fix: Use dependency catalogs:
{
"catalog": {
"problematic-package": "^1.0.0"
}
}
See references/full-guide.md (§ Validation Output Example) for a sample report.
"@myorg/shared": "workspace:*"--cwd for workspace operations: bun add lodash --cwd apps/web (not cd apps/web && bun add)bun install only from the root — keep a single lockfile# .github/workflows/validate.yml
- name: Validate Bun Workspace
run: |
python3 scripts/validate.py \
--root . \
--strict \
--ci
linter-formatter-init - Sets up Biome with Bunproject-init-orchestrator - Creates workspace structurenextjs-validator - Validates Next.js in workspacedevelopment
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.