run-build
รัน build process อย่างเป็นระบบเพื่อสร้าง production-ready artifacts
SKILL.mdrun-build/SKILL.md
GitHubGoal
Run the build process systematically to produce production-ready artifacts
Scope
Use with projects that have a build script in the package manifest, optimizing build configuration before building
Execute
1. Optimize Build
Goal: Improve build configuration and reduce output size before building
- Run
/deep-reviewto analyze bundle size, build config, manual chunks, and externalization - Run
/deep-reviewto improve build configuration, dependencies, imports, and assets - If
/deep-reviewor/deep-reviewfails → stop and report
2. Typecheck
Goal: Check TypeScript types before building
- Run
/run-typecheckto check TypeScript types - If there are type errors → run
/resolve-errors, then retry from/run-typecheck(max 3 → stop)
3. Install Dependencies
Goal: Install the required dependencies
- Run
bun install - Verify that all dependencies are installed
4. Clean Build Artifacts
Goal: Remove old artifacts for a fresh build
- Run
/run-cleanto remove old build artifacts and cache
5. Execute Build
Goal: Run the build command per the package manifest
- Run
bun run buildor the designated build script - Record the elapsed time
- Capture stdout and errors separately
6. Verify Output
Goal: Check the build artifacts
- Verify that the build artifacts were created
- Verify that file sizes and output file counts are appropriate
7. Report
Goal: Summarize the build result
- Run
/reportto show build metrics (time, size, files) - Run
/reportto show the result summary
Rules
1. Build Order
- Optimize: run
/deep-reviewfirst, then run/deep-review - Typecheck: run
/run-typecheckbefore building - Install: install dependencies
- Clean: run
/run-cleanto remove old artifacts - Build: run the build command
- Verify: check the output
2. Error Handling
- Typecheck fails: run
/resolve-errorsbefore building - Build fails: run
/resolve-errorsto fix - Warnings: record and consider fixing
3. Reporting
- Use
/reportfor metrics - Use
/reportfor text summaries - Do not report redundantly
Expected Outcome
- Build succeeds with no errors
- Typecheck fully passes
- Build artifacts are correct
- Output size and build time are improved
Example Template
---
title: Run Build
description: Run the build process for production-ready artifacts
auto_execution_mode: 3
related:
- /deep-review
- /run-typecheck
- /run-clean
- /resolve-errors
---
### Goal
Run the build process for production-ready artifacts
### Scope
Use with projects that have a build script
### Execute
#### 1. Optimize Build
> Goal: build config ready
1. Run `/deep-review`
#### 2. Typecheck
> Goal: no type errors
1. Run `/run-typecheck`
2. If there are errors → run `/resolve-errors`
#### 3. Build
> Goal: build succeeds
1. Run `/run-clean`
2. Run the build command
#### 4. Report
> Goal: summarize results
1. Run `/report`
2. Run `/report`
### Rules
#### 1. Order
- Optimize before building
### Expected Outcome
- Build succeeds