compare-builds
Skill này làm gì
Skill này so sánh hai lần build Xcode được ghi trong Tuist, chẳng hạn một build trên nhánh main và một build trên nhánh tính năng. Skill dành cho lập trình viên iOS và macOS đang tìm hiểu vì sao build bị chậm hoặc thay đổi.
Khi nào nên dùng
- ✓Khi một build trên nhánh tính năng có vẻ chậm hơn nhánh main.
- ✓Khi bạn muốn xem tỷ lệ cache hit thay đổi giữa hai lần build như thế nào.
- ✓Khi bạn muốn có bản tóm tắt các hồi quy và cải thiện của build.
Liên kết skill
https://github.com/tuist/tuist/blob/main/skills/skills/compare-builds/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“So sánh lần build mới nhất trên nhánh tính năng với main và cho tôi biết nó có chậm hơn không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent tìm hai lần build, đọc thời lượng, target, vấn đề và tác vụ cache bằng công cụ dòng lệnh Tuist, rồi tóm tắt các hồi quy, cải thiện và gợi ý.
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.
Compare Builds
Quick Start
You'll typically receive two build identifiers (IDs, dashboard URLs, or branch names). Follow these steps:
- Run
tuist build list --jsonto find builds on each branch. - Run
tuist build show <build-id> --jsonfor both base and head builds. - Fetch sub-resource details: targets (
tuist build xcode target list <id> --json), issues (tuist build xcode issue list <id> --json), and cache tasks (tuist build xcode cache-task list <id> --json). - Compare duration, status, cache hit rates, and other metrics.
- Summarize regressions, improvements, and recommendations.
If only one identifier is provided, use the project's default branch as the baseline.
Step 1: Resolve Builds
If base/head are build IDs or dashboard URLs
Fetch each directly:
tuist build show <base-id> --json
tuist build show <head-id> --json
If base/head are branch names
List recent builds on each branch and pick the latest:
tuist build list --git-branch <base-branch> --json --page-size 1
tuist build list --git-branch <head-branch> --json --page-size 1
Then fetch full details with tuist build show <id> --json.
Defaults
- If no base is provided, use the project's default branch (usually
main). - If no head is provided, detect the current git branch with
git rev-parse --abbrev-ref HEAD.
Step 2: Fetch Sub-Resource Details
After fetching both builds with tuist build show <id> --json, drill down into sub-resources for a deeper comparison.
Compare targets
tuist build xcode target list <base-id> --json
tuist build xcode target list <head-id> --json
Look for targets that changed status (e.g., success to failure) or had significant duration changes.
Compare issues
tuist build xcode issue list <base-id> --json
tuist build xcode issue list <head-id> --json
Look for new warnings or errors introduced in the head build.
Compare cache tasks
tuist build xcode cache-task list <base-id> --json
tuist build xcode cache-task list <head-id> --json
Identify which specific targets had cache misses or hits and whether that changed between builds.
Step 3: Compare Top-Level Metrics
After fetching both builds, compare:
| Metric | What to check |
|---|---|
duration |
Flag if head is >10% slower than base |
status |
Flag if base succeeded but head failed |
cacheable_tasks_count |
Note if task count changed |
cacheable_task_local_hits_count |
Compare local hit counts |
cacheable_task_remote_hits_count |
Compare remote hit counts |
| Cache hit rate | (local_hits + remote_hits) / cacheable_tasks_count * 100 |
category |
Note if one is clean and the other incremental (makes duration comparison less meaningful) |
scheme / configuration |
Ensure both builds used the same scheme and configuration for a fair comparison |
Compute the cache miss delta: base_misses - head_misses. Positive means head has fewer misses (improvement). Negative means regression.
Step 4: Investigate Duration Regressions
If the head build is significantly slower:
- Check if the
categorydiffers (clean vs incremental builds are not directly comparable). - Check if cache hit rate dropped, which would explain longer builds.
- If both are incremental with similar cache rates, the regression is likely in compilation time.
Step 5: Investigate Cache Changes
Compare cache statistics:
- Hit rate dropped: Possible causes include dependency changes, build setting changes, or Xcode version updates.
- Hit rate improved: Likely due to better cache warming or fewer source changes.
- Task count changed: New targets added or removed.
Step 6: Check Build Context
Compare environment details:
xcode_versionandmacos_version: Different versions can affect build times and cache validity.is_ci: CI vs local builds may have different performance characteristics.git_branchandgit_commit_sha: Verify the builds are from the expected commits.
Summary Format
Produce a summary with:
- Overall verdict: Better, worse, or neutral compared to base.
- Duration: Absolute and percentage change.
- Cache hit rate: Change in hit rate with explanation.
- Status: Any status changes (pass to fail or vice versa).
- Environment: Note any environment differences that affect comparability.
- Recommendations: Actionable next steps based on findings.
Example:
Build Compar
Câu hỏi thường gặp
Nếu tôi chỉ đưa một nhánh thì sao?
Nhánh mặc định của dự án được dùng làm mốc so sánh.
Skill so sánh những gì?
Thời lượng, trạng thái, tỷ lệ cache hit, target, vấn đề và tác vụ cache.
Tôi có cần Tuist không?
Có. Skill đọc dữ liệu build qua công cụ dòng lệnh Tuist.
Chi tiết
Mô tả gốc của tác giả
Compares two Xcode build runs to identify duration regressions, cache changes, and new issues. Can be invoked with build IDs, dashboard URLs, or branch names (e.g. `tuist compare-builds --base main --head feature-branch`).
repo: tuist/tuist
Độ phổ biến
- Sao GitHub
- 5.9k
- Vị trí xếp hạng
- #14537
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
analyze-selective-testing
5.9kGiúp agent của bạn kiểm tra selective testing của Xcode bỏ qua các target test nào, và tìm hiểu vì sao việc bỏ qua thay đổi giữa các lần chạy.
compare-bundles
5.9kGiúp agent của bạn so sánh hai bundle ứng dụng để tìm thay đổi về kích thước, các file được thêm hoặc xóa và khác biệt giữa các nền tảng.
compare-cache-runs
5.9kGiúp agent của bạn so sánh hai lần chạy cache để tìm thay đổi về tỷ lệ cache hit và giải thích vì sao cache bị vô hiệu hóa.
compare-generations
5.9kGiúp agent của bạn so sánh hai lần tạo project Tuist để tìm thay đổi về cache hit và nguyên nhân cache bị vô hiệu hóa.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.