build-toolchain

Designs and audits build tooling for bundlers, package managers, lockfiles, and monorepos.

Updated Nov 20, 2025
One-click install
npx skills add https://github.com/apuya/react-basics-ui --skill build-toolchain-apuya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-toolchain
Source: https://github.com/apuya/react-basics-ui/tree/main/.claude/skills/build-toolchain
Command: npx skills add https://github.com/apuya/react-basics-ui --skill build-toolchain-apuya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Builds that are slow, non-reproducible, or silently broken waste engineering time and ship wrong artifacts. This Skill diagnoses build failures, audits bundler and package manager configuration, and enforces reproducibility through lockfile discipline, runtime pinning, and cache correctness. ## Core Features & Use Cases - Build Diagnosis: Traces failures through resolver, transformer, bundler, and emitter stages using a reproduce-measure-hypothesize-verify workflow. - Reproducibility Audits: Detects lockfile drift, mixed package managers, unpinned runtimes, floating versions, and non-deterministic outputs like baked-in timestamps. - Library Publishing Guidance: Covers dual-format (ESM/CJS) package builds with tsup, exports maps, externals verification, and stylesheet emission for published libraries. - Use Case: Your CI build fails while local builds pass. The Skill walks you through comparing runtime versions, install modes (frozen vs. plain), filesystem case sensitivity, and environment variables to isolate the divergence. ## Quick Start Ask the assistant to audit your repository's build configuration for reproducibility issues and non-deterministic outputs.

Frequently Asked Questions about build-toolchain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a build that works locally but fails in CI?

Compare the runtime versions (.nvmrc vs CI image), install modes (CI must use frozen installs like npm ci), filesystem case sensitivity, and environment variables. Linux CI on case-sensitive filesystems catches path casing errors that macOS misses.

Why is my build non-deterministic across machines?

Common causes include Date.now() baked into output, unsorted filesystem glob results, parallel emitter races misaligning source maps, and network-fetching postinstall scripts. Pin runtimes, lockfiles, and sort glob results before consumption.

Should I use npm, pnpm, or yarn for a monorepo?

Use pnpm or yarn with workspaces for Node monorepos, and pick exactly one per repo. pnpm symlinks instead of flattening node_modules, so code assuming a flat layout breaks; test on the chosen layout and pin the package manager version.

Why does tree shaking drop code my app needs?

Tree shaking drops side-effectful imports unless they are declared in the package.json sideEffects field. It also requires ESM sources and breaks silently on re-export barrels and namespace property access.

What belongs in a pre-commit hook?

Only fast, localized, idempotent checks like formatting, linting staged files, and secret scans. Exclude test suites, build steps, network calls, and hooks that touch unstaged files; pin every hook to a tagged release.

How do I verify a published library bundles the right externals?

Grep the built output for import specifiers and confirm only expected dependencies like react appear. Anything extra means a dependency got inlined; anything missing means it was incorrectly bundled into the artifact.