Chuyển đến nội dung
Skillpedia
Lập trình chung13k · #11382

calldiff

Skill này làm gì

Skill cho thấy chuỗi lời gọi hàm đã thay đổi thế nào giữa hai commit git hoặc cây làm việc. Skill dành cho lập trình viên review thay đổi code và muốn xem tác động lên cách chương trình chạy.

Khi nào nên dùng

  • ✓Khi bạn đang review một thay đổi và muốn xem những lời gọi nào được thêm hoặc bỏ đi.
  • ✓Khi bạn cần biết một hàm có được gọi tới từ một điểm vào nhất định sau khi cập nhật hay không.
  • ✓Khi bạn muốn xem diff của các đường thực thi thay vì chỉ diff văn bản.

Liên kết skill

https://github.com/humanlayer/humanlayer/blob/main/.claude/skills/calldiff/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/humanlayer/humanlayer/blob/main/.claude/skills/calldiff/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

“Cho tôi xem các đường gọi hàm đã thay đổi thế nào giữa main và nhánh hiện tại của tôi.”

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

Cách hoạt động

Agent chạy lệnh calldiff để so sánh cây gọi giữa hai tham chiếu git. Sau đó agent hiển thị các thay đổi trong một khối diff có màu.

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.

Installation

If the calldiff command is unavailable, install the latest version globally:

npm install -g calldiff@latest

Presenting output

Whenever showing calldiff output to the user, wrap it in a fenced diff code block so additions and removals receive colored syntax highlighting:

```diff
<calldiff output>
```

calldiff diff

Diff call stacks between two git trees

Arguments

Name Type Required Description
from string no Before ref (default: HEAD)
to string no After ref (default: working tree)
paths array no Limit to these path prefixes

Options

Flag Type Default Description
--entry unknown
--maxDepth number 12 Max call-tree depth
--from string Left / "before" tree
--to string Right / "after" tree

Examples

# HEAD vs working tree
calldiff diff

# One ref vs working tree
calldiff diff main

# Two commits / branches
calldiff diff abc123 def456

# Force entrypoints
calldiff diff main feature --entry createAgentSession

Semantics match git diff: no refs -> HEAD vs worktree; one ref -> that vs worktree; two refs -> compare those trees.


calldiff reach

Find all call paths from an entrypoint to a target symbol

Arguments

Name Type Required Description
ref string no Git ref (default: working tree)
paths array no Limit to these path prefixes

Options

Flag Type Default Description
--entry unknown Entrypoint(s): functionName or ClassName.method
--to string Target symbol to reach (functionName or ClassName.method)
--maxDepth number 12 Max call-tree depth

Examples

# Paths in the working tree
calldiff reach --entry runCheckout --to sendEmail

# Paths at a commit, limited to a directory
calldiff reach HEAD examples/checkout --entry runCheckout --to sendEmail

calldiff tree

View a call tree (no diff) for one or more entrypoints

Arguments

Name Type Required Description
ref string no Git ref (default: working tree)
paths array no Limit to these path prefixes

Options

Flag Type Default Description
--entry unknown Entrypoint(s): functionName or ClassName.method
--maxDepth number 12 Max call-tree depth

Examples

# Tree from working tree
calldiff tree --entry createAgentSession

# Tree from a commit
calldiff tree HEAD --entry PiService.createAgentSession
Câu hỏi thường gặp

Nó hỗ trợ những ngôn ngữ nào?

Mô tả nói rằng nó hỗ trợ 22 ngôn ngữ để phân tích ngăn xếp gọi.

Tôi có cần cài gì không?

Nếu lệnh calldiff chưa có, agent sẽ cài nó toàn cục bằng npm.

Nó so sánh gì nếu tôi không cung cấp tham chiếu?

Nó so sánh HEAD với cây làm việc hiện tại, giống cách git diff làm.

Chi tiết

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

Diff call stacks across git commits for agentic code review (22 languages). Run `calldiff --help` for usage details.

repo: humanlayer/humanlayer

Độ phổ biến

Sao GitHub
13k
Vị trí xếp hạng
#11382
Giấy phép
Apache-2.0
Cập nhật
31/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ự