Loading...
Loading...
Audit package.json scripts for naming, composition, lifecycle hooks, consistency, and performance.
npx skill4agent add edloidas/skills scripts-auditpackage.jsondevstartpackage.jsonprivatepackageManagerworkspacestypebinexportsfilesenginesexportspeerDependenciesvite-plusvite@voidzero-dev/vite-plus-corevpbuildvp run clean && tsgo && vp buildcheckvp check && vp run typechecktestvp test --runtest:civp test --run --coveragepreparevp configbiomepnpmbiomeprepare: "husky"scriptsjq '{
name,
private,
packageManager,
type,
workspaces,
bin,
exports,
files,
engines,
scripts
}' package.jsondependenciesdevDependenciesvite-plusvite@voidzero-dev/vite-plus-coretsgoreactstorybooknexttypescripttypecheckbiomeprettierhuskyvitestjestbun:testdevstartpreviewtypechecklintlint:*formatformat:*checkcheck:*buildbuild:*cleantesttest:*coverageprepackprepublishOnlyrelease:*| Role | Typical signals | Script expectations |
|---|---|---|
| App | | Prefer VP-native |
| Monorepo root | | Root scripts should mostly delegate and mirror leaf package names |
| Publishable library | | |
| Service / bot / CLI | | |
{
"dev": "vp dev",
"build": "vp run clean && tsgo && vp build",
"clean": "rm -rf dist coverage reports",
"check": "vp check && vp run typecheck",
"typecheck": "tsgo --noEmit",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}lintlint:fixformatformat:check{
"build": "pnpm --filter @edloidas/example run build",
"check": "pnpm --filter @edloidas/example run check",
"test": "pnpm --filter @edloidas/example run test",
"test:ci": "pnpm --filter @edloidas/example run test:ci",
"dev": "pnpm --filter @edloidas/example exec vp dev"
}{
"build": "pnpm clean && pnpm build:*",
"clean": "rm -rf dist coverage",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"format:check": "biome format .",
"test": "vitest run",
"validate": "pnpm check && pnpm build && pnpm test:ci",
"prepublishOnly": "pnpm validate"
}{
"start": "bun src/index.ts",
"check": "bun run typecheck && bun run lint && bun run format:check",
"test": "bun test"
}build| Script | Meaning |
|---|---|
| Interactive local development server |
| Runtime entrypoint for an app, service, or CLI |
| Production or distributable build |
| Remove generated artifacts |
| Static type checking only |
| Non-mutating lint pass |
| Lint pass with writes |
| Formatter with writes |
| Formatter verification only |
| Default test run |
| Interactive watch mode |
| Deterministic CI-oriented test run |
| Coverage-focused test run |
| Fast preflight quality gate |
| Mutating version of the quality gate |
| Preview built output |
| Slower release gate |
| Dry-run publish or release path |
servedevverifycheckaction:target:variantbuild:ui:csstypecheck:node:fix:check:watch:ci:drydevstartchecklintformatlintformatformat:check{
"clean": "rm -rf dist coverage reports",
"typecheck": "tsgo --noEmit",
"build": "vp run clean && tsgo && vp build",
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}checkcheck:fixcheckvalidatecheck && build && testcheck && build && test:ciprepublishOnlyvalidaterelease:dryscripts/node -ebun -e// Good
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage"test:citest"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format ."pnpm run ...bun run ...npm run ...pnpm --filterpnpm /^build:.*/packageManager// Sequential
"build": "pnpm build:lib && pnpm build:css"
// Better when independent
"build:ui": "pnpm --color /^build:ui:.*$/"{
"prepare": "vp config",
"prepack": "pnpm build",
"prepublishOnly": "pnpm validate"
}prepare: "vp config"prepare: "husky"prepareprepackprepublishOnlypostinstalltest: "exit 0"prepack: "echo Packaging..."analyze: "open dist/stats.html"analyze:openformatformat:checklintlint:fixprepare: "vp config"scripts/## Scripts Audit Report
### Package Role
- Monorepo root delegating to `@edloidas/example`
### Naming Issues
- `serve` duplicates `dev` without a clearer contract
- `lint:check` should be `lint`
### Composition Issues
- `prepublishOnly` duplicates `check && build && test`; reuse `validate`
- Root `build` re-implements leaf build steps instead of delegating
### Lifecycle Issues
- `prepare` runs a build; move that work to `build` or `prepack`
### Performance / Consistency Issues
- `lint` and `lint:fix` target different file sets
- `test:ci` duplicates `test` instead of adding coverage or stricter CI behavior
### Recommendations
1. Standardize on `build`, `check`, `test`, `test:ci`, and `prepare` as the public VP surface, with `dev` when the repo exposes it.
2. Rename scripts to follow `action:target:variant`.
3. Introduce `validate` and let `prepublishOnly` call it.
4. Move long inline smoke-test logic into `scripts/`.pnpm{
"dev": "vp dev",
"build": "vp run clean && tsgo && vp build",
"clean": "rm -rf dist coverage reports",
"typecheck": "tsgo --noEmit",
"check": "vp check && vp run typecheck",
"test": "vp test --run",
"test:ci": "vp test --run --coverage",
"prepare": "vp config"
}{
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format ."
}{
"build": "pnpm --filter @edloidas/example run build",
"check": "pnpm --filter @edloidas/example run check",
"test": "pnpm --filter @edloidas/example run test",
"test:ci": "pnpm --filter @edloidas/example run test:ci",
"dev": "pnpm --filter @edloidas/example exec vp dev",
"prepare": "pnpm --filter @edloidas/example run prepare"
}{
"clean": "rm -rf dist coverage",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"format:check": "biome format .",
"check": "pnpm typecheck && pnpm lint && pnpm format:check",
"check:fix": "pnpm typecheck && pnpm lint:fix && pnpm format",
"build": "pnpm clean && pnpm build:*",
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run --coverage",
"validate": "pnpm check && pnpm build && pnpm test:ci",
"release:dry": "pnpm publish --dry-run --no-git-checks",
"prepublishOnly": "pnpm validate"
}{
"start": "bun src/index.ts",
"typecheck": "tsc --noEmit",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format": "biome format --write .",
"format:check": "biome format .",
"check": "bun run typecheck && bun run lint && bun run format:check",
"check:fix": "bun run typecheck && bun run lint:fix && bun run format",
"test": "bun test",
"test:watch": "bun test --watch",
"validate": "bun run check && bun run test"
}