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.
git clone --depth 1 https://github.com/RashadAnsari/myagentsWrote 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.
[](https://agentmods.dev/commands/rashadansari/myagents/enrich)<a href="https://agentmods.dev/commands/rashadansari/myagents/enrich"><img src="https://agentmods.dev/badge/commands/rashadansari/myagents/enrich.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.01739 |
| Opus 5 | $0.00017 | $0.00870 |
| Sonnet 5 | $0.00007 | $0.00348 |
| Haiku 4.5 | $0.00003 | $0.00174 |
Grade A, and why
enrich 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 8d 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 — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Enrichment
Mine the 100 most recently merged PRs in the current repository. Extract durable learnings from PR bodies, review discussions, and comments. Write what is genuinely non-obvious and useful to project memory.
Step 1: Validate Environment
Run all three in parallel:
gh auth status
git rev-parse --show-toplevel
gh repo view --json nameWithOwner --jq '.nameWithOwner'
Store PROJECT_ROOT (from git rev-parse) and REPO (e.g. owner/repo). If gh is not authenticated, tell the user to run gh auth login and stop.
Step 2: Load Existing Memory
Call project_search with these two queries in parallel to understand what is already captured:
"architecture decision convention pattern""gotcha bug workflow dependency"
Combine results into EXISTING_MEMORY_SUMMARY: a compact list of summaries already stored. Extractor agents will use this to avoid rediscovering what is already known.
Step 3: Fetch Merged PR List
gh pr list --repo {REPO} --state merged --limit 100 \
--json number,title,mergedAt,comments,reviews \
--jq 'sort_by((.comments | length) + (.reviews | length)) | reverse | [.[] | {number: .number, title: .title}]'
Store as PR_LIST. Sort puts high-discussion PRs first to maximize signal in the analysis. If the repo has fewer than 100 merged PRs, proceed with however many exist. If there are no merged PRs, tell the user and stop.
Extract just the number field from each element so you have a flat array PR_NUMBERS like [101, 99, 88, ...].
Step 4: Split Into Batches and Spawn Extractor Agents
Divide PR_NUMBERS into batches of 10 (up to 10 batches total). Spawn all batches simultaneously. Do not wait for one to finish before starting the next.
Each extractor agent receives:
REPO: the owner/repo stringBATCH: a list of 10 PR numbersEXISTING_MEMORY_SUMMARY: the summary from Step 2
Use this prompt for every extractor agent (substituting values):
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.
- 8d ago First seen · 184 lines · 34 tokens per session scan A 10c7af565506
enrich is a command published in the GitHub repository RashadAnsari/myagents (6 stars, last pushed yesterday), licensed MIT. It adds 34 tokens to every session and 1,739 once invoked, about $0.0002 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 commands, from other repositories
context-restore
Expert Context Restoration Specialist focused on intelligent, semantic-aware context retrieval and reconstruction across complex multi-agent AI workflows. Specializes in preserving and reconstructing project knowledge with high fidelity and minimal information loss.
context-save
An elite context engineering specialist focused on comprehensive, semantic, and dynamically adaptable context preservation across AI workflows. This tool orchestrates advanced context capture, serialization, and retrieval strategies to maintain institutional knowledge and enable seamless multi-session collaboration.
ctx
Search agent history or trace code to its original agent session.
memory-gc
Garbage collection for stale memory entries - identify and clean up obsolete content.
memory-review
Display current memory state with timestamps, sizes, and staleness indicators.
search
Search session history for past decisions, discussions, and context.