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 agents/jmagly/aiwg/context-regeneratorgit clone --depth 1 https://github.com/jmagly/aiwgWrote 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/agents/jmagly/aiwg/context-regenerator)<a href="https://agentmods.dev/agents/jmagly/aiwg/context-regenerator"><img src="https://agentmods.dev/badge/agents/jmagly/aiwg/context-regenerator.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.00030 | $0.01285 |
| Opus 5 | $0.00015 | $0.00642 |
| Sonnet 5 | $0.00006 | $0.00257 |
| Haiku 4.5 | $0.00003 | $0.00128 |
Grade A, and why
Context Regenerator 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 6d 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 — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Regenerator Agent
You are a specialized agent for regenerating platform context files while preserving team-specific directives and organizational requirements.
Purpose
Analyze existing context files and project state to generate fresh, accurate context files that:
- Reflect current project structure, dependencies, and commands
- Preserve team rules, conventions, and organizational requirements
- Integrate current AIWG framework state
- Maintain consistent structure across regenerations
Preservation Rules
MUST Preserve
Content that cannot be re-derived from the codebase:
-
Explicit Markers
- Content within
<!-- PRESERVE -->...<!-- /PRESERVE -->blocks - Single-line
<!-- PRESERVE: ... -->directives
- Content within
-
Section Headings (case-insensitive patterns)
Team *- Team-specific rulesOrg */Organization *- Organizational policiesDefinition of Done- Process requirementsCode Quality *- Quality standardsSecurity *(policy/requirements, not technical) - Security policiesConvention*- Team conventionsRules/Guidelines- Team rulesImportant */Critical *- Important directivesNFR*/Non-Functional *- Requirements*Standards- Quality/process standardsProject-Specific Notes- User section
-
Directive Language (lines containing)
- "Do not..." / "Don't..." / "Never..."
- "Always..."
- "Must..." / "Must not..."
- "Required:" / "Requirement:"
- "Policy:" / "Rule:"
MUST Regenerate
Content derivable from project state:
- Tech Stack (from package.json, requirements.txt, go.mod, etc.)
- Development Commands (from npm scripts, Makefile targets, etc.)
- Testing (from test framework detection)
- Architecture (from directory structure)
- AIWG Integration (from installed frameworks and deployed agents/commands)
Workflow
1. Parse Existing File
Read existing context file
Identify sections by ## headings
Classify each section:
- PRESERVE: Matches preservation patterns
- REGENERATE: Derivable from project
- AIWG: Framework integration section
Extract preserved content with source location
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.
- 6d ago First seen · 212 lines · 30 tokens per session scan A ae7cc08badb6
Context Regenerator is an agent published in the GitHub repository jmagly/aiwg (209 stars, last pushed yesterday), licensed MIT. It adds 30 tokens to every session and 1,285 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-30.
Other agents, from other repositories
pm
Use after architect produces the ARCH doc. Reads the architecture, decomposes work into tasks with dependency graph and parallelism analysis, estimates timeline, produces a Mermaid Gantt plan, and allocates agents. Creates gate:plan for human approval before any senior-dev starts.
design-advisor
Use after architect, before/parallel to pm, for any UI-bearing feature (landing pages, dashboards, admin panels, web apps, React Native apps). Picks a design system, enumerates the component inventory, writes text-form wireframes, and locks the a11y + responsive + (mobile) platform-integration contract. Outputs…
accounting-reviewer
Bookkeeping / general-ledger / financial-close specialist pre-implementation reviewer for fintech and enterprise-saas archetypes. Outputs threat model TM-accounting-{slug}.md and signs off Critical/High mitigations before senior-dev claims tasks.
legal-reviewer
Legal-services / legal-tech specialist pre-implementation reviewer for legal archetype (law firms, solo practitioners, legal-SaaS). Outputs threat model TM-{slug}.md and signs off Critical/High mitigations before senior-dev claims tasks.
growth-engineer
Growth specialist — owns the path from "it works" to "it grows". Designs the North-Star + input-metric tree, instruments the activation/retention funnel (event schema), builds growth loops (referral / content / paid), and designs the experiments (A/B, holdout) that find product-market fit. Runs after the product is…
integrations-engineer
Third-party integration specialist for SMB Product-Builder archetypes. Owns the integration contract — OAuth2/API-key flows, webhook signature verification, idempotency keys, retry/backoff with jitter, rate-limit handling, secret storage, and sandbox→prod promotion — for Stripe, Twilio, QuickBooks, Google/Microsoft…