history

"可以使用的Git数据,而不是需要解析的。理解代码存在的原因。"

📖 中文导读:"可以使用的Git数据,而不是需要解析的。理解代码存在的原因。" 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: history description: "Git data you can use, not parse. Understand why code exists." allowed-tools: mcp__history__blame_file, mcp__history__file_history, mcp__history__recent_changes, mcp__history__commit_info, mcp__history__search_commits, mcp__history__diff_file, mcp__history__branch_diff, mcp__history__changed_symbols, mcp__history__git_status, mcp__history__git_add, mcp__history__git_commit

history

Structured git data. No output parsing. Understand intent, not just changes.

First: Depends on Task

  • Understand code: blame_file({ file_path })
  • Make a commit: git_status({})
  • Review for PR: branch_diff({ base: 'main' })

Why This Wins

The Problem Built-in Failure history Solution
Who wrote this? git blame needs parsing blame_file returns author per line
What changed? git log is text file_history returns structured commits
Semantic diff Manual inspection changed_symbols shows functions changed
Create commit Multi-step bash git_status → git_add → git_commit

Quick Reference

Intent Tools
Understand code blame_file, file_history, commit_info
Compare changes diff_file, branch_diff, changed_symbols
Find commits recent_changes, search_commits
Make commits git_status, git_add, git_commit

Common Workflows

Understand Why Code Exists

blame_file({ file_path: 'src/auth.ts' })

Track Bug Introduction

file_history({ file_path: 'src/broken.ts', limit: 10 })
commit_info({ ref: 'abc123' })

Review Changes for PR

branch_diff({ base: 'main' })
changed_symbols({ from_ref: 'main' })  // What functions changed?

Create a Commit

git_status({})
git_add({ paths: ['src/feature.ts'] })
git_commit({ message: 'feat: add feature' })

Unique Value: changed_symbols

Shows WHAT functions/classes changed, not just line diffs:

changed_symbols({ from_ref: 'main', to_ref: 'HEAD' })
// Returns: added, modified, deleted symbols with locations

Works with any git repository

Auto-detects git root from any subdirectory.