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.
npx agentmods add instructions/nihen/ah/agents-mdgit clone --depth 1 https://github.com/nihen/ahWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01094 | $0.01094 |
| Opus 5 | $0.00547 | $0.00547 |
| Sonnet 5 | $0.00219 | $0.00219 |
| Haiku 4.5 | $0.00109 | $0.00109 |
Grade A, and why
ah AGENTS.md 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ah - Agent History
Cross-agent session search CLI written in Rust.
Build & Install
make install # local build + install
After changing code, always run make install to update the binary.
Architecture
src/
main.rs -- entry point: clap subcommand dispatch + agent/list-* commands
cli.rs -- clap derive CLI definition (Cli, Commands, FilterArgs, ProjectField) + help text
config.rs -- ~/.ahrc (TOML) parsing, agent registry (OnceLock<Vec<AgentDef>>)
agents/ -- built-in agent plugins + registry + shared helpers
session.rs -- Session struct
collector.rs -- glob expansion + rayon parallel stat + BinaryHeap top-N
pipeline.rs -- unified session pipeline: collect → filter → search → resolve → sort
projects.rs -- project aggregation (shared by `ah project` and `ah project -i`)
resolver.rs -- plugin-driven metadata extraction and transcript shaping
search.rs -- mmap+regex full-text / plugin prompt-only search
memory.rs -- `ah memory` subcommand: memory + instruction file listing
output.rs -- TSV/LTSV/JSON output for log, project, and memory listing
color.rs -- color mode detection (--color/--no-color/TTY auto)
pager.rs -- auto-pager (less) setup for TTY output
show.rs -- `ah show` subcommand: pretty-print transcript + --follow
resume.rs -- `ah resume` subcommand: exec agent resume command
man.rs -- `ah man` subcommand: man page generation via clap_mangen
remote.rs -- `--remote` SSH aggregation: fetch from remote hosts, parse JSON, merge
fuzzy.rs -- `-i` interactive browse via fzf/sk for log, project, memory
subcmd.rs -- shared session resolver (stdin pipe, session ID/path, query, filters)
Key Design Decisions
- No external tools for search/parsing (all indexing and query logic in-process; no rg/jq/sed)
- Exception:
--remoteuses SSH to runahon remote hosts (computation near data)
- Exception:
- Parallel stat + metadata resolution via rayon
- memmap2 for searching large JSONL files without copying
- Plugin-internal regex compiled once via LazyLock; user query regex compiled per invocation
- Single-pass filter_map for search filtering + metadata resolution
- Default cwd filtering: all subcommands filter by current directory,
-afor global- Exception:
projectdefaults to all (no cwd filter)
- Exception:
- Global options via Cli struct flatten, not per-subcommand
- log,
ah project, andah memoryshare the same output system (TSV/LTSV/JSON, -f field selection) but use separate Field enums (Field for log, ProjectField for projects, MemoryField for memory) Field selection via-o/--fieldsand-O/--extra-fields
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.
- 2d ago First seen · 99 lines · 1,094 tokens per session scan A fa5ad84cd31f
ah AGENTS.md is an instructions file published in the GitHub repository nihen/ah (2 stars, last pushed 12d ago), licensed MIT. It adds 1,094 tokens to every session, about $0.0055 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.
Other instructions, from other repositories
apm python.instructions.md
Python development guidelines.
CodexPotter AGENTS.md
Instructions for breezewish/CodexPotter, covering repository guidelines, workflow principles, engineering rules, core principles: simplicity & readability and better maintainability.
copilot-proxy-api CLAUDE.md
Instructions for voidsteed/copilot-proxy-api, covering claude.md, project overview, common commands, architecture and entry points & cli structure.
OpenMicro AGENTS.md
Instructions for stephenleo/OpenMicro, covering openmicro — project conventions and releases.
squarebox CLAUDE.md
Instructions for SquareWaveSystems/squarebox, covering claude.md, agent skills, issue tracker, triage labels and domain docs.
SubFrame AGENTS.md
Instructions for Codename-11/SubFrame, covering subframe - subframe project, core working principle, relationship to native ai tools, session start and concurrent work & worktrees.