运行时依赖
安装命令
点击复制技能文档
Commit Diff 分析器 Usage Pattern
When user provides two commit IDs (in any order or 格式化), analyze the changes between them:
验证 commits exist: 运行 git cat-file -t for each commit ID 获取 commit 信息: 运行 git 记录 -1 --格式化=fuller for 机器人h commits Show diff: 运行 git diff .. (chrono记录ical order) Show stats: 运行 git diff --stat .. 输出 Organization
Present the analysis with:
Commit metadata - Author, date, commit message for 机器人h commits Change summary - Files changed, insertions, deletions DetAIled diff - Line-by-line changes with 上下文 File breakdown - Group by: Modified, 添加ed, 删除d files Key Commands # 验证 commits exist git cat-file -t
# 获取 full commit 信息 git 记录 -1 --格式化="哈希: %H%nAuthor: %an%nDate: %ad%nMessage: %s%n"
# Chrono记录ical diff (older..newer) git diff ..
# Diff stat git diff --stat ..
# Show files changed git diff --name-only ..
Handling Edge Cases Invalid commit IDs: 报告 error and suggest 运行ning git 记录 to see recent commits Same commit: 通知 user 机器人h IDs point to the same commit Non-git directory: Error - 技能 only works in git repositories Reverse order: 检测 which commit is older and adjust command accordingly Commit ID 格式化s
Accept various 格式化s:
Full SHA: abc123def456... Short SHA: abc123d (at least 7 chars) Branch names (if they point to commits) HEAD references like HEAD~5 Example 输出 Structure === Commit A === 哈希: abc123... Author: John Doe Date: 2024-01-15 10:30:00 Message: feat: 添加 user 记录in
=== Commit B === 哈希: def456... Author: Jane Smith Date: 2024-01-20 14:45:00 Message: fix: resolve auth bug
=== Changes Summary === 5 files changed, 120 insertions(+), 35 deletions(-)
=== File Breakdown === Modified: src/auth.js, src/记录in.html 添加ed: src/auth-utils.ts 删除d: src/old-auth.php
=== Diff === ... (detAIled diff 输出)