Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)101k · #978

build-test

Skill này làm gì

Kiểm tra xem mã của bạn có chạy đúng không và các bài kiểm thử có đạt không. Công cụ chạy các lệnh để tìm lỗi và thực hiện kiểm thử, rồi báo cho bạn biết mọi thứ đạt (passing) hay có lỗi (failing).

Khi nào nên dùng

  • ✓Khi bạn vừa thay đổi mã.
  • ✓Khi bạn chuẩn bị nộp công việc.
  • ✓Khi bạn muốn đảm bảo mọi thứ hoạt động trước khi tiếp tục.

Liên kết skill

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/build-test/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/build-test/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra xem mã và các bài kiểm thử có hoạt động không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ chạy lệnh build và test đã được định nghĩa cho dự án của bạn. Sau đó, nó cho bạn biết việc build và kiểm thử có thành công hay không.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Build test

Spec §20.2 / §22.4: the "subjective critique-theater panel" is not enough on its own — a code-migration / tune-collab run must prove the build still passes. This atom shells out to the project's declared test commands and emits structured signals the devloop's until evaluator reads.

Inputs

  • The active target stack (recorded in code/index.json + plan.md's targetStack block).
  • The user's optional override (od plugin run --input testCommand='pnpm test').

Default commands by framework

framework typecheck test
next pnpm typecheck pnpm test
vite pnpm typecheck pnpm test
remix pnpm typecheck pnpm test
custom (read from package.json.scripts) (read from package.json.scripts)

Output

project-cwd/
└── critique/
    ├── build-test.json   # { build: 'passing' | 'failing', tests: 'passing' | 'failing' | 'skipped', durationMs, commandsRun: [...], failures: [...] }
    └── build-test.log    # raw stdout / stderr (truncated to the runner's logBudgetBytes limit, default 1 MiB)

The atom emits two signals the devloop reads:

  • build.passing: boolean — the typecheck command exited 0.
  • tests.passing: boolean — the test command exited 0.

Plus the legacy critique.score so existing pipelines that read the score keep working: 5 when both pass, 3 when only build passes, 1 when both fail.

Convergence

Pipelines wire the atom into a devloop:

{
  "id": "verify",
  "atoms": ["patch-edit", "build-test"],
  "repeat": true,
  "until": "(build.passing && tests.passing) || iterations >= 8"
}

Anti-patterns the prompt fragment forbids

  • Running tests on a partially-edited working tree (the atom always runs after patch-edit, and only when plan.steps's current step is in completed state).
  • Suppressing test failures by changing test files; that violates the rewrite-plan ownership rule.
  • Setting tests: 'skipped' without a non-empty reason field.

Status

Implemented by the daemon runner in apps/daemon/src/plugins/atoms/build-test.ts. It executes the configured build and test commands, bounds runtime and captured logs, and persists the report and log outputs above.

Câu hỏi thường gặp

“Build” và “test” là gì?

“Build” là quá trình kiểm tra xem mã của bạn đã được viết đúng hay chưa (không có lỗi gõ hoặc lỗi cú pháp). “Test” là chạy các kiểm tra tự động để xem các tính năng của mã có hoạt động như mong đợi hay không.

Điều gì xảy ra nếu có lỗi?

Nếu “build” hoặc “test” thất bại, công cụ sẽ thông báo cho bạn. Bạn cần sửa lỗi trong mã trước khi tiếp tục.

Công cụ biết chạy lệnh nào?

Nó dùng các lệnh mặc định cho loại dự án bạn đang dùng (như Next, Vite, v.v.) hoặc đọc các lệnh bạn đã định nghĩa trong tệp cấu hình của dự án.

Chi tiết

Mô tả gốc của tác giả

Run the project's build / typecheck / lint / test commands and emit the build.passing + tests.passing signals devloop convergence reads.

repo: nexu-io/open-design

Độ phổ biến

Sao GitHub
101k
Vị trí xếp hạng
#978
Giấy phép
Apache-2.0
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự