build-pipeline
执行完整的构建管道,包括死代码检测、格式化、代码检查、类型检查、测试和生产构建。当用户提及构建、运行完整管道、检查代码质量或准备部署时使用。在"构建项目"、"运行所有检查"、"准备生产"或"验证代码质量"等短语上自动触发。
📖 中文导读:执行完整的构建管道,包括死代码检测、格式化、代码检查、类型检查、测试和生产构建。当用户提及构建、运行完整管道、检查代码质量或准备部署时使用。在"构建项目"、"运行所有检查"、"准备生产"或"验证代码质量"等短语上自动触发。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: build-pipeline description: Execute complete build pipeline with dead code detection, formatting, linting, type checking, testing, and production build. Use when the user mentions building, running the full pipeline, checking code quality, or preparing for deployment. Auto-triggers on phrases like "build the project", "run all checks", "prepare for production", or "validate code quality". allowed-tools: Bash(bun*)
Project Build Pipeline
Execute a comprehensive build pipeline with fail-fast behavior for the Tetris project.
Pipeline Steps (6 stages)
- Dead Code Detection (
bun run knip) - Identify unused code, exports, and dependencies - Code Formatting (
bun run format) - Apply consistent code style via Biome - Linting (
bun run lint) - Perform code quality checks and import optimization - Type Checking (
bun run typecheck) - Validate TypeScript type safety - Testing (
bun test) - Execute all test suites (160+ tests) - Production Build (
bun run build) - Create optimized production bundle
Execution
# Execute full pipeline with fail-fast behavior
bun run knip && \
bun run format && \
bun run lint && \
bun run typecheck && \
bun test && \
bun run build
The pipeline uses && operator to ensure immediate termination upon any step failure.
Pipeline Rationale
- knip (first): Detect unused code early to reduce processing time
- format (second): Ensure consistent code style before quality checks
- lint (third): Check code quality on properly formatted code
- typecheck (fourth): Verify type safety after code structure validation
- test (fifth): Confirm functionality with comprehensive test suite
- build (last): Generate production bundle only when all gates pass
When This Skill Activates
- "Build the project"
- "Run all checks"
- "Prepare for production"
- "Validate code quality"
- "Execute the full pipeline"
- "Check if everything is ready to deploy"