git-context

git-context is a skill for Claude Code from jellydn/my-ai-tools. It costs 19 tokens per session (1,062 once invoked), scanned A, original, MIT.

A way to investigate a codebase’s Git history, including past commits, line authorship, and related file changes. Git is the version-control system that records how code changes over time.

In plain words
What is it for?
Use it to trace when a function or feature was introduced, find commits affecting a module, see who changed specific lines, and locate related changes.
Why use it?
Current code often does not explain why it was designed that way. Historical context can reveal the reason for a decision, related fixes, regressions, and people familiar with a module.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Codex; built for cline; mentions OpenCode.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jellydn/my-ai-tools/git-context
Any agent
npx skills add jellydn/my-ai-tools --skill git-context
Clone the repo
git clone --depth 1 https://github.com/jellydn/my-ai-tools

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-context

README.md
[![agentmods](https://agentmods.dev/badge/skills/jellydn/my-ai-tools/git-context.svg)](https://agentmods.dev/skills/jellydn/my-ai-tools/git-context)
Your own site
<a href="https://agentmods.dev/skills/jellydn/my-ai-tools/git-context"><img src="https://agentmods.dev/badge/skills/jellydn/my-ai-tools/git-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,062 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.01062
Opus 5 $0.00010 $0.00531
Sonnet 5 $0.00004 $0.00212
Haiku 4.5 $0.00002 $0.00106

Measured 6d ago against content hash fb297437df3b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

git-context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

configs/amp/plugins/my-ai-tools-skills/skills/git-context/SKILL.md · 150 lines

How it starts

The opening of the file, as written. The whole thing — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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"     │
└────────────────────────────┴────────────────────────┘

Read the full file on GitHub · 150 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 150 lines · 19 tokens per session scan A fb297437df3b

Subscribe to this mod's changes

git-context is a skill published in the GitHub repository jellydn/my-ai-tools (119 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 1,062 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.