Context Regenerator

Context Regenerator is an agent for Claude Code from jmagly/aiwg. It costs 30 tokens per session (1,285 once invoked), scanned A, original, MIT.

An agent that rebuilds project context files such as CLAUDE.md, WARP.md, and AGENTS.md from the current project while retaining team instructions. These files tell coding agents how a project is organized and how to work in it.

In plain words
What is it for?
Use it to regenerate context files after project changes, preserve marked team and organization policies, and keep development, quality, security, and process instructions consistent.
Why use it?
It keeps instructions aligned with the project’s current structure and commands without losing rules that cannot be inferred from the code. This reduces stale or inconsistent guidance for agents.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it to regenerate context files after project changes, preserve marked team and organization policies, and keep development, quality, security, and process instructions consistent.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/jmagly/aiwg/context-regenerator
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.

Clone the repo
git clone --depth 1 https://github.com/jmagly/aiwg

Made for: Claude Code.

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 Context Regenerator

README.md
[![agentmods](https://agentmods.dev/badge/agents/jmagly/aiwg/context-regenerator/github.svg)](https://agentmods.dev/agents/jmagly/aiwg/context-regenerator)
Your own site
<a href="https://agentmods.dev/agents/jmagly/aiwg/context-regenerator"><img src="https://agentmods.dev/badge/agents/jmagly/aiwg/context-regenerator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Context Regenerator

Your own site · 80×15
<a href="https://agentmods.dev/agents/jmagly/aiwg/context-regenerator"><img src="https://agentmods.dev/badge/agents/jmagly/aiwg/context-regenerator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,285 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00030 $0.01285
Opus 5.5 $0.00012 $0.00514
Sonnet 5.5 $0.00006 $0.00257
Haiku 4.5 $0.00003 $0.00128

Measured 1mo ago against content hash ae7cc08badb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 1mo 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.

agentic/code/addons/aiwg-utils/agents/context-regenerator.md · 212 lines

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:

  1. Reflect current project structure, dependencies, and commands
  2. Preserve team rules, conventions, and organizational requirements
  3. Integrate current AIWG framework state
  4. Maintain consistent structure across regenerations

Preservation Rules

MUST Preserve

Content that cannot be re-derived from the codebase:

  1. Explicit Markers

    • Content within <!-- PRESERVE --> ... <!-- /PRESERVE --> blocks
    • Single-line <!-- PRESERVE: ... --> directives
  2. Section Headings (case-insensitive patterns)

    • Team * - Team-specific rules
    • Org * / Organization * - Organizational policies
    • Definition of Done - Process requirements
    • Code Quality * - Quality standards
    • Security * (policy/requirements, not technical) - Security policies
    • Convention* - Team conventions
    • Rules / Guidelines - Team rules
    • Important * / Critical * - Important directives
    • NFR* / Non-Functional * - Requirements
    • *Standards - Quality/process standards
    • Project-Specific Notes - User section
  3. 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

Read the full file on GitHub · 212 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. 1mo ago First seen · 212 lines · 30 tokens per session scan A ae7cc08badb6

Subscribe to this mod's changes

Context Regenerator is an agent published in the GitHub repository jmagly/aiwg (224 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 1,285 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other agents, from other repositories

scout

Research & analysis agent. Investigates questions and analyzes codebases without modifying source code. Can write research notes to docs/research/ or .fellowship/. No git operations, no commits, no PRs.

justinjdev/fellowship · 46 tokens

prd-planner

Breaks a PRD into an ordered, dependency-aware implementation plan. Use PROACTIVELY when the user asks to implement a PRD, before any code is written. Reads the PRD and root CLAUDE.md, then writes a plan file to ./plans/. Does NOT write application code.

mumerfarooq-con/asdlc-tools · 65 tokens

pr-reviewer-architecture

Architecture & maintainability panelist in the PR review council. Reviews ONLY through a structural/long-term lens — CLAUDE.md conformance, layering, patterns, duplication. Invoked in parallel with the other panelists by /review-pr --council. Read-only.

mumerfarooq-con/asdlc-tools · 62 tokens

pr-reviewer-security

Security & data-integrity panelist in the PR review council. Reviews ONLY through a security/data lens — authz, injection, secrets, migration safety. Invoked in parallel with the other panelists by /review-pr --council. Read-only; writes its own report.

mumerfarooq-con/asdlc-tools · 62 tokens

asset-generator

AI asset generation agent — connects to image generation APIs (Nano Banana, FAL AI, Replicate), manages asset storage pipelines, generates responsive variants, and integrates assets into frontend code.

ShaheerKhawaja/ProductionOS · 40 tokens

comms-assistant

Communication assistant — generates and audits README, CHANGELOG, PR descriptions, commit messages, release notes, and API documentation. Cross-references docs against actual code for accuracy.

ShaheerKhawaja/ProductionOS · 39 tokens