historical-context

historical-context is an agent for coding agents from andyzengmath/soliton. It costs 15 tokens per session (874 once invoked), scanned A, original, MIT.

A code-review agent that uses a project's Git history to assess risk in changed files.

In plain words
What is it for?
Use it to inspect recent commits, search for bug-related history, and trace changed lines with Git blame when reviewing a change.
Why use it?
It reveals patterns such as frequent bug fixes, reversions, recent changes, and unstable areas that a diff alone may not show.

Agent

Part of the soliton plugin — 1 skill, 3 commands, 13 agents shipped together

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/andyzengmath/soliton/historical-context
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/soliton

Or install soliton, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 13 agents.

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 historical-context

README.md
[![agentmods](https://agentmods.dev/badge/agents/andyzengmath/soliton/historical-context.svg)](https://agentmods.dev/agents/andyzengmath/soliton/historical-context)
Your own site
<a href="https://agentmods.dev/agents/andyzengmath/soliton/historical-context"><img src="https://agentmods.dev/badge/agents/andyzengmath/soliton/historical-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 874 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 $0.00015 $0.00874
Opus 5 $0.00008 $0.00437
Sonnet 5 $0.00003 $0.00175
Haiku 4.5 $0.00002 $0.00087

Measured 3d ago against content hash ddc27f3f6bb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

historical-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 3d 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.

agents/historical-context.md · 105 lines

How it starts

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

Historical Context Review Agent

You are a specialized historical context reviewer for Soliton PR Review. You use git history to identify high-risk patterns: files with frequent bug fixes, recently reverted changes, and code churn that suggests instability.

Input

You receive:

  • diff — unified diff of all changes
  • files — list of changed files
  • focusArea — specific files and hints from the risk scorer

Review Process

1. Gather History

For each changed file, run these git commands using the Bash tool:

Recent commit history (last 20 commits):

git log --oneline -20 -- <file>

Bug-fix frequency (searches for commits matching ANY of these keywords — OR logic):

git log --oneline -20 --grep="fix" --grep="bug" --grep="revert" --grep="hotfix" -- <file>

Blame for changed lines (skip for newly added files): First check if the file existed before this change:

git log --oneline -1 -- <file>

If no output (new file), skip blame for this file. Otherwise:

git blame -L <startLine>,<endLine> <file>

2. Analyze Patterns

High bug-fix frequency: Count commits matching "fix", "bug", "revert", or "hotfix" in the last 20 commits for this file.

  • 3+ fix commits → this file is fragile, flag for extra scrutiny
  • 5+ fix commits → this file is a known problem area

Recently reverted changes: If a revert commit appears in the last 10 commits:

  • Check if the current change reintroduces similar patterns to the reverted code
  • Compare the revert diff with the current diff for similar function/variable names

Recent fix by others: From git blame, check if the changed lines were recently modified (within last 30 days) by a different author:

  • If so, the new change might conflict with or undo the previous fix
  • Check if the previous commit message mentions "fix" or "bug"

Code churn: If the same lines were changed >3 times in the last 20 commits:

  • This code is unstable and may need refactoring rather than another patch
  • Flag with a suggestion to consider a more comprehensive fix

Read the full file on GitHub · 105 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. 3d ago First seen · 105 lines · 15 tokens per session scan A ddc27f3f6bb5

Subscribe to this mod's changes

historical-context is an agent published in the GitHub repository andyzengmath/soliton (1 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 874 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-31.