history

A repository command that builds a chronological history for a named subject or topic, such as payment retry logic, an authentication flow, or a pull request. It can return either readable text or structured JSON for automation.

In plain words
What is it for?
Use it to investigate how a feature evolved, trace a bug or design decision, review a pull request's history, or provide repository timelines to other tools.
Why use it?
It gathers related changes over time in one result instead of requiring you to search commits and pull requests manually.

Command

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 commands/avos-lab/git-aware-coding-agent/history
Clone the repo
git clone --depth 1 https://github.com/Avos-Lab/git-aware-coding-agent
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 510 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.00000 $0.00510
Opus 5 $0.00000 $0.00255
Sonnet 5 $0.00000 $0.00102
Haiku 4.5 $0.00000 $0.00051

Measured yesterday against content hash 53cc608bc4ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 yesterday.

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.

docs/user/commands/history.md · 79 lines

How it starts

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

avos history

Get a chronological history of a subject or topic in the repository.

Usage

avos history <subject>
avos --json history <subject>

Options

Option Description
subject Subject or topic for chronological history (required)

Global Options

Option Description
--json Emit machine-readable JSON output (for AI agents/automation)

Examples

avos history "payment retry logic"
avos history "authentication flow"
avos history "PR #42"

# JSON mode for AI agents
avos --json history "payment retry logic"

JSON Output Mode

When --json is passed, output is strict JSON conforming to the avos.history.v1 schema:

{
  "success": true,
  "data": {
    "format": "avos.history.v1",
    "raw_text": "...",
    "timeline": {
      "is_empty_history": false,
      "months": [
        {
          "month_label": "Mar 2026",
          "classification": "BUG FIX",
          "header_raw": "Mar 2026 — BUG FIX",
          "events": [
            { "line_raw": "...", "kind": "PR", "id": "#123", "title": "...", "author": "..." }
          ]
        }
      ],
      "unparsed_timeline_lines": []
    },
    "summary": { "text": "..." },
    "parse_warnings": []
  },
  "error": null
}

On failure, the envelope contains "success": false with an error object.

JSON mode requires the reply model configuration (see below).

Reply Output (Optional)

Same as avos ask: set REPLY_MODEL, REPLY_MODEL_URL, and REPLY_MODEL_API_KEY to get decorated timeline/summary output and enable JSON mode.

Troubleshooting

  • AUTH_ERROR: Set AVOS_API_KEY and OPENAI_API_KEY (default LLM). Use ANTHROPIC_API_KEY when the provider is Anthropic.
  • QUERY_EMPTY_RESULT: No artifacts found. Run avos ingest first.
  • REPLY_SERVICE_UNAVAILABLE: JSON mode requires REPLY_MODEL, REPLY_MODEL_URL, REPLY_MODEL_API_KEY.

Read the full file on GitHub · 79 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. yesterday First seen · 79 lines · 0 tokens per session scan A 53cc608bc4ae

Subscribe to this mod's changes

history is a command published in the GitHub repository Avos-Lab/git-aware-coding-agent (2 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 510 tokens. 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.