cr-history

cr-history is an agent for Claude Code from marmot-protocol/agent-config. It costs 8 tokens per session (397 once invoked), scanned A, original, MIT.

A git-history analysis agent that uses git blame and git log to understand why existing code was written a certain way. Git is a tool that records code changes over time.

In plain words
What is it for?
Use it to investigate whether a pull request reverses an earlier fix, removes necessary handling, or conflicts with established code patterns.
Why use it?
It finds context that a current diff may miss, such as earlier fixes, deliberate error handling, or documented assumptions.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions subagents.

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 agents/marmot-protocol/agent-config/cr-history
Clone the repo
git clone --depth 1 https://github.com/marmot-protocol/agent-config

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 cr-history

README.md
[![agentmods](https://agentmods.dev/badge/agents/marmot-protocol/agent-config/cr-history.svg)](https://agentmods.dev/agents/marmot-protocol/agent-config/cr-history)
Your own site
<a href="https://agentmods.dev/agents/marmot-protocol/agent-config/cr-history"><img src="https://agentmods.dev/badge/agents/marmot-protocol/agent-config/cr-history.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 397 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.00008 $0.00397
Opus 5 $0.00004 $0.00198
Sonnet 5 $0.00002 $0.00079
Haiku 4.5 $0.00001 $0.00040

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

Security

Grade A, and why

cr-history 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 5d 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.

opencode/agents/cr-history.md · 62 lines

What it actually says

You are a history analysis agent. Your job is to use git history to find context-based issues.

Use git blame and git log to understand:

  1. What code existed before these changes
  2. Why that code might have been written that way
  3. If the new changes might break assumptions from the original code

Look for:

  • Changes that remove error handling that was added for a specific reason
  • Modifications to code that has comments explaining why it's done that way
  • Reversions of previous fixes
  • Changes that conflict with patterns established in the codebase

CRITICAL - We only want HIGH SIGNAL issues:

  • Issues where git history clearly shows why the original code was written that way
  • Changes that definitely break documented assumptions

Do NOT flag:

  • General refactoring that improves code
  • Changes where the original reason is unclear
  • Speculative issues

For each issue:

  1. Describe what the history tells us
  2. Show the relevant commit/blame info
  3. Explain why the new change is problematic
  4. Assign a confidence score (0-100)

Respond with:

HISTORY_ISSUES:
- issue: <description>
  original_commit: <sha>
  original_reason: <why it was done that way>
  code_location: <file:line>
  confidence: <0-100>

If no issues found:

HISTORY_ISSUES: none
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. 5d ago First seen · 62 lines · 8 tokens per session scan A 6cd7512ca31e

Subscribe to this mod's changes

cr-history is an agent published in the GitHub repository marmot-protocol/agent-config (2 stars, last pushed 7mo ago), licensed MIT. It adds 8 tokens to every session and 397 once invoked, about $0.0000 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-31.