xiaohongshu
xiaohongshu
build-engineer
Expert in monorepo tooling (Turborepo, Nx, Bazel), CI/CD pipelines, and bundler optimization (Webpack/Vite/Rspack).
Full skill instructions
Provides build systems and CI/CD optimization expertise specializing in monorepo tooling (Turborepo, Nx, Bazel), bundler optimization (Webpack/Vite/Rspack), and incremental builds. Focuses on optimizing development velocity through caching, parallelization, and build performance.
| Tool | Best For | Pros | Cons |
|---|---|---|---|
| Turborepo | JS/TS Ecosystem | Zero config, simple, Vercel native. | JS only (mostly), less granular than Bazel. |
| Nx | Enterprise JS/TS | Powerful plugins, code generation, graph visualization. | heavier configuration, opinionated. |
| Bazel | Polyglot (Go/Java/JS) | Hermetic builds, infinite scale (Google style). | Massive learning curve, complex setup. |
| Pnpm Workspaces | Simple Projects | Native to Node.js, fast installation. | No task orchestration (needs Turbo/Nx). |
What is the priority?
│
├─ **Development Speed (HMR)**
│ ├─ Web App? → **Vite** (ESModules based, instant start)
│ └─ Legacy App? → **Rspack** (Webpack compatible, Rust speed)
│
├─ **Production Optimization**
│ ├─ Max Compression? → **Webpack** (Mature ecosystem of plugins)
│ └─ Speed? → **Rspack / Esbuild**
│
└─ **Library Authoring**
└─ Dual Emit (CJS/ESM)? → **Rollup** (Tree-shaking standard)
Red Flags → Escalate to devops-engineer:
node_modules size > 1GB (Phantom dependencies)Goal: Reduce CI time by 80% by reusing cache artifacts.
Steps:
Configuration (turbo.json)
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**"]
},
"test": {
"dependsOn": ["build"],
"inputs": ["src/**/*.tsx", "test/**/*.ts"]
},
"lint": {}
}
}
Remote Cache
npx turbo link.env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
Execution
turbo run build test lintGoal: Only run tests for changed projects in a monorepo.
Steps:
Analyze Graph
nx graph (Visualizes dependencies: App A depends on Lib B).CI Pipeline
# Only test projects affected by PR
npx nx affected -t test --base=origin/main --head=HEAD
# Only lint affected
npx nx affected -t lint --base=origin/main
Goal: Understand BUILD files vs package.json.
Mapping:
| NPM Concept | Bazel Concept |
|---|---|
package.json | WORKSPACE / MODULE.bazel |
script: build | js_library(name = "build") |
dependencies | deps = ["//libs/utils"] |
node_modules | npm_link_all_packages |
Code Example (BUILD.bazel):
load("@aspect_rules_js//js:defs.bzl", "js_library")
js_library(
name = "pkg",
srcs = ["index.js"],
deps = [
"//:node_modules/lodash",
"//libs/utils"
],
)
What it looks like:
import foo from 'foo' works locally but fails in CI.Why it fails:
package.json.Correct approach:
What it looks like:
Why it fails:
Correct approach:
madge tool to detect circular deps: npx madge --circular .node_modulesWhat it looks like:
Why it fails:
Correct approach:
.gitignore must include node_modules/, dist/, .turbo/, .next/.Performance:
Reliability:
pnpm-lock.yaml / package-lock.json is consistent.Maintainability:
package.json scripts standardized (dev, build, test, lint).Scenario: A 500-developer company with 4 React applications and 15 shared libraries wants to migrate from separate repos to a monorepo to improve code sharing and CI efficiency.
Migration Approach:
Migration Results:
Scenario: A large e-commerce platform has slow production builds (12 minutes) due to complex Webpack configuration and wants to improve developer experience.
Migration Strategy:
Performance Comparison:
| Metric | Webpack | Rspack | Improvement |
|---|---|---|---|
| Dev server start | 45s | 2s | 96% |
| HMR update | 8s | 0.5s | 94% |
| Production build | 12m | 2m | 83% |
| Bundle size | 2.4MB | 2.3MB | 4% |
Scenario: A gaming company with 5,000 E2E tests needs to reduce CI time from 90 minutes to under 15 minutes for fast feedback.
Pipeline Design:
CI Pipeline Configuration:
# GitHub Actions with Playwright sharding
- name: Run E2E Tests
run: |
npx playwright test --shard=${{ matrix.shard }}/${{ matrix.total }} \
--config=playwright.config.ts
strategy:
matrix:
shard: [1, 2, ..., 20]
max-parallel: 10
Results:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience