From codebase-analyzer
Use when understanding how source transforms to runtime, what gets filtered/compiled/generated, or tracing build-time shaping that affects what code actually runs
How this skill is triggered — by the user, by Claude, or both
Slash command
/codebase-analyzer:analyze-build-pipelineThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Trace the source -> runtime transformation pipeline. Find filtering, compilation, code generation, and build-time shaping.
Trace the source -> runtime transformation pipeline. Find filtering, compilation, code generation, and build-time shaping.
Prerequisite: Reads docs/analysis/provenance.md (from trace-codebase-provenance).
| Build Tool | Config Location | Key Features |
|---|---|---|
| webpack | webpack.config.* | Loaders, plugins, code splitting |
| Vite | vite.config.* | Plugins, define, env replacement |
| esbuild | build script | Bundle, define, external |
| Cargo | Cargo.toml | Features, profiles, build scripts |
| Make | Makefile | Targets, variables, recipes |
| Bazel | BUILD, WORKSPACE | Rules, targets, toolchains |
extract-tool-graphMap the full chain: source -> preprocessor -> compiler -> bundler -> optimizer -> minifier -> output. At each stage: what's added? what's removed? what's transformed? The chain reveals what the final artifact went through.
Every transformation stage is a decision point where code is shaped. A TypeScript file does not become runtime JavaScript unchanged -- it passes through tsc (type stripping), possibly babel (target downleveling), webpack/vite (bundling + tree-shaking), a minifier (whitespace + identifier mangling), and potentially a compressor (gzip/brotli). Each stage introduces gaps between what you read in source and what actually executes.
Key questions at each stage:
If you skip a stage in your analysis, you have a blind spot about what code actually runs at runtime.
Every build has axes: ENVIRONMENT, USER_TYPE, PROVIDER, FEATURE_FLAGS. Document each axis and its values. This is the Build Dimension Catalogue that downstream skills depend on.
An axis is any dimension along which the build produces different outputs from the same source. Most codebases have 3-7 axes that multiply into hundreds of potential build variants -- but only a few are actually exercised in practice.
How to find axes:
DefinePlugin, define in vite/esbuild, --define flags for injected constantsprocess.env.FEATURE_*)main.dev.ts vs main.prod.ts)require()/import() gated on build-time valuesCatalogue format (write to build-pipeline.md):
AXIS: ENVIRONMENT
Values: development, staging, production
Mechanism: NODE_ENV via DefinePlugin
Impact: enables devtools, changes API URLs, adjusts logging
AXIS: PROVIDER
Values: aws, gcp, azure
Mechanism: BUILD_PROVIDER env var, conditional plugin
Impact: selects cloud SDK, auth module, storage adapter
Downstream skills (extract-tool-graph, map-feature-gates) consume this catalogue to know which dimensions to explore. An incomplete catalogue means missed behavior branches.
If someone wanted to inject code into the build, where would they do it? Check: webpack plugins, postinstall scripts, build-time code generation, bundler transforms. The build pipeline is the most powerful injection point -- it touches everything.
Every analyzed build is one filtered slice. You are never seeing the full capability surface.
A single build run is one point in a multi-dimensional configuration space. The code you see compiled, bundled, and running is the result of every axis resolved to one specific value. To understand the system, you must map the axes -- not just analyze the one build you happened to run.
Write docs/analysis/build-pipeline.md using standard contract.
Include: pipeline stages, filtering rules, code generation, build-time constants, config axes discovered, transformation chain analysis, Build Dimension Catalogue.
npx claudepluginhub quangphu1912/codebase-analyzer --plugin codebase-analyzerProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.