git-context

Search git history for contextual information: commit messages, code provenance, related changes, and impact analysis.

Last repository push
GitHub Stars
130
Forks
13
Issues / PRs
15

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "git-context" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7e282c798ccb2eaa4a14dcf43d250faefbfd0ae548d5d22e45951f4da27b06a4. Verify the upstream source and version against https://github.com/jellydn/my-ai-tools before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Search git history for contextual information: commit messages, code provenance, related changes, and impact analysis.

0 Downloads

Introduction source: third_party · jellydn · 0.0.1 Reference

SkillPi interpretation

Tasks
Search git history for context — commit messages, blame, related changes, impact analysis
Audience
Use this skill when: Understanding why code was written a certain way Finding related changes across the codebase Tracing the evolution of a feature or pattern Identifying who has expertise in a module Finding past bug fixes or regressions in an area
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "git-context"
description: "Search git history for context — commit messages, blame, related changes, impact analysis"
license: "MIT"
compatibility: "cline, claude, opencode, amp, codex, gemini, cursor, pi"
hint: "Use to understand why code was written a certain way or find related changes"
user-invocable: true

Git Context

When to Use

Use this skill when:

  • Understanding why code was written a certain way
  • Finding related changes across the codebase
  • Tracing the evolution of a feature or pattern
  • Identifying who has expertise in a module
  • Finding past bug fixes or regressions in an area

What It Does

Searches git history to build context about the codebase, using a combination of native git commands and the sem MCP tool for deeper analysis. Helps answer "why was this done this way?" and "what changed recently in this area?"

How to Execute

Find Recent Changes to a Module

# Recent commits touching this area
git log --oneline --all -20 -- path/to/module/

# Who works on this area most
git shortlog -sn -- path/to/module/

# When a specific function was introduced
git log -S "functionName" --oneline -- path/to/module/

Trace a Function's History

# When was this function introduced?
git log -S "export function calculateTotal" --oneline

# Who has modified it?
git blame path/to/file.ts -L 10,30

# What was the commit message?
git show <commit-hash> --no-patch

Find Related Changes

# Files changed together in the same commits
git log --all --name-only -- path/to/changed/file.ts | head -20

# Find commits that reference a ticket or pattern
git log --all --grep="fix|bug|hotfix" --oneline -20

Using sem for Deeper Analysis

# Entity-level blame (function level)
sem blame path/to/file.ts --function processOrder

# Impact analysis
sem impact path/to/file.ts --function processOrder

# Compare branches at function level
sem diff main..HEAD -- path/to/file.ts

Cross-Session Context

# Search past agent sessions about this module
ctx search "this module" path/to/module/

# Find past discussions about related changes
ctx search "bug fix" path/to/module/

Decision Tree

┌────────────────────────────┬────────────────────────┐
│ Need this                   │ Use this               │
├────────────────────────────┼────────────────────────┤
│ What changed recently      │ git log -20 -- path/   │
│ Who works on this module   │ git shortlog -sn path/ │
│ Why was this line added    │ git blame path/to/file │
│ When was function added    │ git log -S "funcName"  │
│ What else changed together │ git log --name-only    │
│ Impact of changing X       │ sem impact path/func   │
│ Past agent work on this    │ ctx search "topic"     │
└────────────────────────────┴────────────────────────┘

Common Patterns

Pre-Implementation Check

Before implementing a change, check:

# 1. Recent changes to affected modules
git log --oneline --all -10 -- src/feature/

# 2. Who has expertise
git shortlog -sn -- src/feature/ | head -5

# 3. Related commits (ticket/branch references)
git log --all --grep="feature-name" --oneline

# 4. Past bugs in this area
git log --all --grep="bug|fix|error" --oneline -10 -- src/feature/

Post-Change Verification

After implementing, verify:

# 1. What did I change?
git diff --stat

# 2. Are there unrelated changes?
git diff --cached --name-only

# 3. Did I miss anything?
git diff HEAD --name-only  # Unstaged changes

Tips

  • Commit messages matter: Write clear messages — they become the primary documentation
  • Use git log -S over grep for history: grep scans the working tree; git log -S scans history
  • Combine with ctx: Past agent sessions often contain context that git history doesn't
  • Be specific with paths: git log -- path/ filters to relevant commits, reducing noise
  • Use --all for complete picture: Default git log only shows current branch history

Integration with Other Skills

  • Use before /blindspots to gather initial context
  • Use during context-discovery for deep git history analysis
  • Log surprising git history findings in implementation-logger

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供 git 历史搜索、代码溯源、影响分析等实用功能,适用于开发者日常高频场景
  • 涵盖理解代码背景、追踪变更、识别专家等明确使用价值
Trigger Precision90/100

Highlights

  • description 明确描述功能为“搜索 git 历史记录以获取上下文”,触发词精准且边界清晰
Structure and Standards90/100

Highlights

  • 文档结构完整,包含 When to Use、How to Execute、Decision Tree、Common Patterns 等章节
  • 提供具体命令示例和决策树,frontmatter 完整
Execution Reliability85/100

Highlights

  • 提供多种 git 命令和 `sem` MCP 工具的使用方式,覆盖常见异常场景
  • 命令参数正确,来源明确
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.