Chuyển đến nội dung
Skillpedia
Ứng dụng di động5.9k · #14538

compare-bundles

Skill này làm gì

Skill này so sánh hai bundle ứng dụng được ghi trong Tuist, chẳng hạn các bản build từ hai nhánh, để xem kích thước và nội dung đã thay đổi những gì. Skill dành cho lập trình viên ứng dụng theo dõi dung lượng tải về và cài đặt.

Khi nào nên dùng

  • ✓Khi dung lượng tải về hoặc cài đặt của ứng dụng tăng lên và bạn muốn biết vì sao.
  • ✓Khi bạn muốn xem những artifact nào đã được thêm hoặc xóa giữa hai bundle.
  • ✓Khi bạn muốn có so sánh kích thước kèm gợi ý giảm dung lượng ứng dụng.

Liên kết skill

https://github.com/tuist/tuist/blob/main/skills/skills/compare-bundles/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/tuist/tuist/blob/main/skills/skills/compare-bundles/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

“So sánh bundle mới nhất trên nhánh tính năng với main và cho tôi biết điều gì làm ứng dụng lớn hơn.”

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

Cách hoạt động

Agent tìm hai bundle, so sánh kích thước và metadata, sau đó liệt kê các artifact đã thay đổi và gợi ý nơi có thể giảm dung lượ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.

Compare Bundles

Quick Start

You'll typically receive two bundle identifiers. Follow these steps:

  1. Run tuist bundle list --json to find bundles on each branch.
  2. Run tuist bundle show <bundle-id> --json for both base and head bundles.
  3. Compare artifact trees with tuist bundle artifact list <bundle-id> --json.
  4. Compare install size, download size, and other metadata.
  5. Summarize size changes with actionable recommendations.

Step 1: Resolve Bundles

If base/head are bundle IDs or dashboard URLs

Fetch each directly:

tuist bundle show <base-id> --json
tuist bundle show <head-id> --json

If base/head are branch names

List recent bundles on each branch and pick the latest:

tuist bundle list --git-branch <base-branch> --json
tuist bundle list --git-branch <head-branch> --json

Then fetch full details with tuist bundle 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.

Step 2: Compare Artifact Trees

After fetching both bundles with tuist bundle show <id> --json, compare the individual artifacts:

tuist bundle artifact list <base-id> --json
tuist bundle artifact list <head-id> --json

Match artifacts by name across both bundles. Look for:

  • New artifacts added in the head bundle (potential size contributors)
  • Removed artifacts (explain size decreases)
  • Size changes in existing artifacts

Step 3: Compare Top-Level Metrics

After fetching both bundles, compare:

Metric What to check
install_size Flag if head is >5% larger
download_size Flag if head is >5% larger
version Note version changes
supported_platforms Note platform changes
app_bundle_id Should match between base and head

Compute deltas:

  • Install size delta: head_install_size - base_install_size
  • Download size delta: head_download_size - base_download_size
  • Percentage change: delta / base_size * 100

Step 4: Analyze Size Changes

If size increased significantly (>5%):

  1. Check if version changed, which might explain expected size growth.
  2. Check if supported_platforms changed (adding a platform increases size).
  3. Look at the artifacts field in the bundle details for individual artifact sizes.

Common causes of size increases:

  • New frameworks or libraries added
  • Asset catalogs grew (new images, videos)
  • Unoptimized resources (large PNGs instead of compressed formats)
  • Debug symbols included in release builds
  • New localizations added

Common causes of size decreases:

  • Removed unused frameworks
  • Optimized assets
  • Tree shaking or dead code elimination improvements
  • Moved functionality to on-demand resources

Summary Format

Produce a summary with:

  1. Overall verdict: Size increased, decreased, or stable.
  2. Install size: Absolute and percentage change.
  3. Download size: Absolute and percentage change.
  4. Version: Note if version changed.
  5. Platforms: Note any platform changes.
  6. Recommendations: Actionable next steps for size regressions.

Example:

Bundle Comparison: base (v2.1.0 on main) vs head (v2.2.0 on feature-x)

Install Size: 45.2 MB -> 52.8 MB (+16.8%) -- REGRESSION
Download Size: 28.1 MB -> 32.4 MB (+15.3%) -- REGRESSION
Version: 2.1.0 -> 2.2.0
Platforms: iOS, macOS (unchanged)

The install size increased by 7.6 MB. This is a significant increase
that may affect user download and storage experience.

Recommendations:
- Review new frameworks or assets added in this version
- Check for uncompressed resources or oversized image assets
- Consider using asset compression or on-demand resources
- Run `xcrun bitcode_strip` analysis to check for unnecessary bitcode

Done Checklist

  • Resolved both base and head bundles
  • Compared artifact trees using tuist bundle artifact list
  • Compared install and download sizes
  • Analyzed root causes of size changes
  • Provided actionable recommendations
Câu hỏi thường gặp

Tôi có cần Tuist không?

Có. Skill đọc dữ liệu bundle qua công cụ dòng lệnh Tuist.

Skill so sánh những kích thước nào?

Skill so sánh dung lượng cài đặt và dung lượng tải về, cùng các metadata khác.

Skill có ghép các file giữa các bundle không?

Có. Skill ghép các artifact theo tên để tìm file mới và file đã xóa.

Chi tiết

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

Compares two app bundles to identify size changes, new or removed artifacts, and platform differences. Can be invoked with bundle IDs, dashboard URLs, or branch names.

repo: tuist/tuist

Độ phổ biến

Sao GitHub
5.9k
Vị trí xếp hạng
#14538
Giấy phép
—
Cập nhật
2/11/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ự