build-engineering
Skill4 starsChanged 12 months agoMITView on GitHub
Build engineering covering build systems (Make, Gradle, Maven, Bazel), compilation optimization, dependency management, artifact repositories, build pipelines, reproducible builds, build caching, monorepo strategies, supply chain security, and performance optimization. Use when creating build processes, optimizing build times, managing dependencies, or implementing CI build pipelines. (project)
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 19 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 51
When starting a build engineering task:
- Distinctive: line 291
Use local and remote build caches
- Distinctive: line 298
Use build tool parallelization features
- Distinctive: line 304
Use exact versions in lock files
- Distinctive: line 306
Consider vendoring for critical dependencies
- Distinctive: line 312
Use deterministic build tools
- Distinctive: line 313
Avoid timestamps in artifacts
- Distinctive: line 314
Document build environment requirements
- Very specific: line 317
Use lock files (package-lock.json, Gemfile.lock, go.sum)
- Distinctive: line 320
Test dependency updates before merging
- Distinctive: line 337
Use hermetic builds when possible
- Distinctive: line 343
Never commit secrets to version control
- Distinctive: line 344
Use secret management tools
- Distinctive: line 370
Use build tool's parallel features
- Distinctive: line 371
Consider distributed builds for large projects
- Distinctive: line 383
Document artifact promotion workflow
- Distinctive: line 388
Use lock files for dependencies
- Distinctive: line 391
Remove non-deterministic elements (timestamps)
- Distinctive: line 392
Use hermetic build tools if possible
- Distinctive: line 393
Verify builds are reproducible
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎯 SKILL ACTIVATED: build-engineering ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build Engineering
Comprehensive guide for build engineering covering build systems, compilation optimization, dependency management, artifact repositories, reproducible builds, and modern build practices for creating fast, reliable, and secure build pipelines.
When to Use This Skill
Automatically activates when working on:
- Build system configuration (Gradle, Maven, Bazel, Make)
- Build performance optimization and caching strategies
- Dependency management and version resolution
- Artifact repository setup (Artifactory, Nexus)
- Reproducible builds and hermetic building
- Monorepo build strategies
- CI/CD pipeline build optimization
- Build supply chain security
- Distributed and parallel builds
Overview
Purpose: Enable teams to create efficient, reliable, and secure build processes that scale from small projects to large monorepos while maintaining build reproducibility and optimizing developer productivity.
Scope:
- Build systems (Make, Gradle, Maven, Bazel, npm/yarn/pnpm)
- Compilation optimization and distributed builds
- Dependency management and version pinning
- Artifact repositories and binary management
- CI/CD build pipelines and automation
- Reproducible and hermetic builds
- Build caching strategies
- Monorepo build tools and strategies
- Supply chain security (SBOM, signed artifacts)
- Build performance optimization
This skill is for:
- Build engineers optimizing build performance
- DevOps engineers creating CI/CD pipelines
- Platform engineers managing build infrastructure
- Developers improving build times
- Security engineers implementing supply chain security
Quick Start Checklist
When starting a build engineering task:
- Choose appropriate build tool for your language/ecosystem
- Implement dependency locking for reproducibility
- Set up artifact caching (local and remote)
- Configure incremental compilation
- Implement parallel build execution
- Set up artifact repository (Artifactory, Nexus, registry)
- Define clear build stages (compile, test, package)
- Implement build caching strategy
- Add dependency vulnerability scanning
- Monitor and optimize build performance
Core Concepts
1. Build System Types
Make-based:
Traditional, file-based dependencies
Example: Make, CMake
Best for: C/C++, system-level buildsJVM-based:
Dependency resolution, artifact management
Example: Maven, Gradle
Best for: Java, Kotlin, ScalaTask-based:
Flexible task execution
Example: npm, Gulp, Rake
Best for: JavaScript, Ruby, general automationHermetic:
Fully reproducible, sandboxed builds
Example: Bazel, Buck, Pants
Best for: Large monorepos, multi-language projects2. Build Pipeline Stages
┌─────────────────────────────────────────────────┐
│ Source Code │
└──────────────────┬──────────────────────────────┘
│
┌─────────▼─────────┐
│ Dependency Fetch │
│ (with caching) │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Compilation │
│ (incremental) │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Testing │
│ (unit, int) │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Packaging │
│ (artifacts) │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Artifact Upload │
│ (registry) │
└───────────────────┘3. Dependency Resolution
Semantic Versioning:
MAJOR.MINOR.PATCH
1.2.3
Major: Breaking changes
Minor: New features, backward compatible
Patch: Bug fixesVersion Constraints:
Exact: 1.2.3
Range: >=1.2.0 <2.0.0
Caret: ^1.2.3 (>=1.2.3 <2.0.0)
Tilde: ~1.2.3 (>=1.2.3 <1.3.0)4. Build Caching
Local Cache:
┌──────────────┐
│ Developer │
│ Machine │
│ │
│ Local Cache │
│ (~/.cache) │
└──────────────┘Distributed Cache:
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Dev 1 │ │ Dev 2 │ │ CI Server │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
└────────────┬───────┴────────────────────┘
│
┌───────▼────────┐
│ Remote Cache │
│ (S3, Redis) │
└────────────────┘5. Artifact Versioning
Versioning Strategies:
Semantic: 1.2.3
Build number: 1.2.3-build.456
Git commit: 1.2.3-a1b2c3d
Timestamp: 1.2.3-20240101123045
Snapshot: 1.2.3-SNAPSHOTCommon Patterns
Pattern 1: Multi-Stage Build
# Multi-stage Docker build
FROM node:18 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
FROM node:18-alpine AS runtime
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000
CMD ["node", "dist/index.js"]Pattern 2: Dependency Locking
// package.json
{
"dependencies": {
"express": "^4.18.0"
}
}
// package-lock.json (exact versions)
{
"dependencies": {
"express": {
"version": "4.18.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz",
"integrity": "sha512-..."
}
}
}Pattern 3: Build Matrix
# GitHub Actions build matrix
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [16, 18, 20]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm testPattern 4: Incremental Builds
// Gradle incremental compilation
tasks.withType(JavaCompile) {
options.incremental = true
}
// Only rebuild changed modules
gradle build --parallel --build-cache --configure-on-demandResource Files
For detailed guidance on specific topics, see:
Build Systems
- build-systems.md - Make, Gradle, Maven, Bazel, npm/yarn comparison, tool selection guide
- compilation-optimization.md - Compiler flags, incremental compilation, distributed builds, ccache
- monorepo-builds.md - Monorepo strategies, affected detection, Nx, Turborepo, Bazel
Dependency Management
- dependency-management.md - Version pinning, lock files, conflict resolution, vulnerability scanning
- artifact-repositories.md - Artifactory, Nexus, container registries, retention policies, promotion
Build Pipeline
- build-pipelines.md - CI build stages, parallel builds, matrix builds, pipeline optimization
- reproducible-builds.md - Deterministic builds, hermetic builds, SLSA framework
Optimization
- build-caching.md - Layer caching, distributed caching, cache invalidation strategies
- performance-optimization.md - Build profiling, parallelization, metrics, bottleneck analysis
Security
- build-security.md - Supply chain security, signed artifacts, SBOM generation, dependency attestation
Best Practices
Build Performance
- Enable caching:
- Use local and remote build caches
- Cache dependencies separately from code
- Implement layer caching in Docker builds
- Use incremental compilation
- Parallelize builds:
- Build independent modules concurrently
- Use build tool parallelization features
- Distribute builds across multiple machines
- Leverage build matrix for testing
- Optimize dependencies:
- Remove unused dependencies
- Use exact versions in lock files
- Implement dependency caching
- Consider vendoring for critical dependencies
Build Reliability
- Reproducible builds:
- Pin all dependency versions
- Use deterministic build tools
- Avoid timestamps in artifacts
- Document build environment requirements
- Dependency management:
- Use lock files (package-lock.json, Gemfile.lock, go.sum)
- Scan for vulnerabilities regularly
- Update dependencies systematically
- Test dependency updates before merging
- Artifact management:
- Version all artifacts
- Store in artifact repository
- Implement retention policies
- Sign critical artifacts
Build Security
- Supply chain security:
- Generate SBOM (Software Bill of Materials)
- Sign build artifacts
- Verify dependency signatures
- Scan for vulnerabilities
- Build isolation:
- Use hermetic builds when possible
- Sandbox build processes
- Limit network access during builds
- Verify build inputs
- Secret management:
- Never commit secrets to version control
- Use secret management tools
- Rotate build secrets regularly
- Audit secret access
Anti-Patterns to Avoid
❌ Non-reproducible builds - Different results from same source ❌ No dependency locking - Floating versions break builds ❌ Rebuilding everything - Wastes time and resources ❌ No build caching - Repeated work on every build ❌ Ignored dependencies - Outdated, vulnerable packages ❌ No artifact versioning - Can't track what was deployed ❌ Serial builds - Not leveraging parallelization ❌ No build metrics - Can't identify bottlenecks ❌ Mixing build and runtime - Bloated containers ❌ No vulnerability scanning - Security risks in dependencies
Common Tasks
Task: Optimize Slow Build
- Profile build to identify bottlenecks
- Enable build caching (local and remote)
- Implement incremental compilation
- Parallelize independent build tasks
- Cache dependencies separately
- Use build tool's parallel features
- Consider distributed builds for large projects
- Monitor build metrics over time
Task: Set Up Artifact Repository
- Choose repository (Artifactory, Nexus, registry)
- Deploy and configure repository
- Set up authentication and access control
- Define retention policies
- Configure build tools to publish artifacts
- Implement versioning strategy
- Set up vulnerability scanning
- Document artifact promotion workflow
Task: Implement Reproducible Builds
- Pin all dependency versions
- Use lock files for dependencies
- Specify build tool versions
- Document build environment
- Remove non-deterministic elements (timestamps)
- Use hermetic build tools if possible
- Verify builds are reproducible
- Automate verification in CI
Integration Points
This skill integrates with:
- release-engineering: Deployment pipelines, versioning, artifact promotion
- devsecops: Vulnerability scanning, SBOM, supply chain security
- platform-engineering: Build infrastructure, container builds, Kubernetes
- cloud-engineering: Cloud build services, artifact storage
- systems-engineering: Compiler optimization, system dependencies
Triggers and Activation
This skill activates when you:
- Work with build files (Makefile, build.gradle, pom.xml, package.json)
- Optimize build performance or reduce build times
- Implement CI/CD pipelines
- Manage dependencies or artifact repositories
- Configure build caching or distributed builds
- Set up monorepo build tooling
- Implement reproducible builds
- Address supply chain security
Next Steps
For your specific build engineering task:
- Identify build system and language ecosystem
- Review relevant patterns and optimization strategies
- Implement caching and parallelization
- Set up artifact management
- Monitor and optimize build performance
- Implement security scanning and SBOM generation
Total Resources: 10 detailed guides covering all aspects of build engineering Pattern Library: 100+ production-tested patterns for build optimization and reliability Maintained by: Build Engineering team based on real-world production experience
In this repository24 other files it gives its agents.
- api-engineeringSkill
- backend-dev-guidelinesSkill
- budget-and-cost-managementSkill
- cloud-engineeringSkill
- cybersecuritySkill
- database-engineeringSkill
- devsecopsSkill
- documentation-as-codeSkill
- engineering-managementSkill
- engineering-operations-managementSkill
- error-trackingSkill
- frontend-dev-guidelinesSkill
- general-it-engineeringSkill
- infrastructure-architectureSkill
- infrastructure-strategySkill
- network-engineeringSkill
- observability-engineeringSkill
- platform-engineeringSkill
- release-engineeringSkill
- route-testerSkill
- skill-developerSkill
- sreSkill
- systems-engineeringSkill
- technical-leadershipSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

