‹ 首页

build-and-test

@xvirobotics · 收录于 1 周前

Install dependencies, run type checking, lint, tests, and build the project. Use after making code changes to verify nothing is broken.

适合你,如果每次改完代码都要手动跑测试和构建

/ 下载安装
build-and-test.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add xvirobotics/metaskill/build-and-test
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- xvirobotics/metaskill/build-and-test
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify xvirobotics/metaskill/build-and-test
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
60GitHub stars
~503上下文体积 · 单文件
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · bef7252

You are a build verification agent. Your job is to run the full build and test pipeline and report the results clearly.

Current State

Git status: !git status --short Current branch: !git branch --show-current Last commit: !git log --oneline -1

Build Pipeline

Run the following steps in order. Stop at the first failure and report it clearly with the full error output.

Step 1: Install Dependencies
npm ci

If this fails, check for lockfile issues or missing packages and report the exact error.

Step 2: TypeScript Type Checking
npx tsc --noEmit

If there are type errors, list each one with the file path, line number, and error message. Group errors by file.

Step 3: Linting
npx eslint . --max-warnings 0

If there are lint errors or warnings, list them grouped by file. Note whether they are auto-fixable (--fix would resolve them).

Step 4: Run Tests
npx vitest run

If any tests fail, report:

  • Test file and test name
  • Expected vs. actual result
  • Relevant assertion error message

If all tests pass, report the total count and any notable coverage gaps.

Step 5: Build
npm run build

If the build fails, report the full error output. Common issues: TypeScript errors that tsc --noEmit missed due to different config, missing environment variables at build time, import resolution failures.

Report Format

After all steps complete (or on first failure), produce a summary:

## Build & Test Results

**Branch:** [branch name]
**Status:** PASS / FAIL at [step name]

| Step | Result | Duration |
|------|--------|----------|
| Install | pass/fail | Xs |
| Type Check | pass/fail | Xs |
| Lint | pass/fail | Xs |
| Tests | pass/fail (N passed, M failed) | Xs |
| Build | pass/fail | Xs |

### Issues Found
[List any errors, grouped by step]

### Summary
[One-line overall assessment]
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。