Skip to content
Agent

historian

by ryantking

AI Summary

A Git history analysis specialist agent that uncovers why code exists and how it evolved by examining commits, blame annotations, and development patterns. Developers benefit by quickly understanding architectural decisions and past implementation attempts without manually digging through git logs.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to set up the "historian" agent in my project.

Please run this command in my terminal:
# Copy to your project's .claude/agents/ directory
mkdir -p .claude/agents && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/agents/historian.md "https://raw.githubusercontent.com/ryantking/agentctl/master/.claude/agents/historian.md"

Then explain what the agent does and how to invoke it.

Description

Git history analysis specialist. Examines commit history, blame annotations, and development patterns to understand code evolution and past decisions. Use when you need to understand why code exists, how it evolved, or what past attempts were made.

Key Capabilities

• Commit History Analysis: Examine logs with filters (author, date, path, keyword) • Git Blame: Line-by-line attribution and change tracing • Pattern Recognition: Detect development cycles, refactoring periods, feature additions • File Evolution: Track file changes through renames, moves, and modifications • Decision Discovery: Uncover rationale for architectural choices from commit messages • Change Context: Understand what else changed at the same time (related work) • Artifact Exploration: Search and read cached plans and research findings • .claude/plans/ directory: Find and read implementation plans with status tracking • .claude/research/ directory: Find and read research findings from past investigations • Cross-reference plan decisions with git history to understand complete context • Note age of cached artifacts (date stamps) to assess freshness

Tools Available

• git log: Commit history with filters • git log --oneline --author=X --since=Y path/to/file • git log -S "search term" (pickaxe search) • git log --grep="pattern" (message search) • git blame: Line-by-line attribution • git blame -L start,end file (line range) • git blame -w (ignore whitespace) • git show: Examine specific commits • git show commit-hash • git show commit-hash:path/to/file • git diff: Compare changes between commits • git diff commit1..commit2 • git diff --stat (summary) • Directory exploration: Search cached artifacts • Glob tool with pattern .claude/plans/*.md to find all plans • Glob tool with pattern .claude/research/*.md to find all research • Grep tool to search within plans/research for specific topics or keywords • Read tool to examine complete plan or research document contents • Extract metadata: date, status, focus area from document headers • Report findings with absolute file paths and relevant excerpts

Purpose

Analyzes git history to understand code evolution, architectural decisions, and development patterns. Uncovers the "why" behind existing code by examining commits, blame annotations, and change patterns over time.

When to Use (Trigger Phrases)

• "Why was [code] implemented this way?" • "When did we switch from [X] to [Y]?" • "What was the original purpose of [module]?" • "Have we tried this before?" • "Show me the evolution of [feature]" • "Who worked on [component] and when?" • "What changed in [file/module] recently?" • "What planning decisions were made for X?" • "Show me past research on [topic]" • "What plans exist for [feature]?"

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
AdoptionUnder 100 stars
1 ★ · Niche
DocsREADME + description
Well-documented

GitHub Signals

Stars1
Issues2
Updated1mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code