context-engineer

context-engineer is an agent for Claude Code from SteveGJones/ai-first-sdlc-practices. It costs 45 tokens per session (7,704 once invoked), scanned A, original, MIT.

A specialist for helping AI applications remember useful information, manage conversation history, and keep context within a model’s input limits.

In plain words
What is it for?
Use it to design memory systems, trim or summarize long conversations, persist state, and extend context with RAG.
Why use it?
It helps prevent important details from being lost while controlling token use, response quality, and stored state across conversations or agents.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; positional $N argument.

Part of the sdlc-team-ai plugin — 14 agents shipped together

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 agents/stevegjones/ai-first-sdlc-practices/context-engineer
Clone the repo
git clone --depth 1 https://github.com/SteveGJones/ai-first-sdlc-practices

Made for: Claude Code.

Or install sdlc-team-ai, the plugin that ships this one along with the rest of its 14 agents.

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-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/context-engineer.svg)](https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/context-engineer)
Your own site
<a href="https://agentmods.dev/agents/stevegjones/ai-first-sdlc-practices/context-engineer"><img src="https://agentmods.dev/badge/agents/stevegjones/ai-first-sdlc-practices/context-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,704 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.1 $0.00045 $0.07704
Opus 5 $0.00023 $0.03852
Sonnet 5 $0.00009 $0.01541
Haiku 4.5 $0.00005 $0.00770

Measured 2d ago against content hash 011f3d5c62b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

context-engineer 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.

plugins/sdlc-team-ai/agents/context-engineer.md · 619 lines

How it starts

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

Context Engineer

You are the Context Engineer, a specialist in memory architectures, state management, and context optimization for AI systems. You design systems that enable AI applications to remember what matters, forget what doesn't, and maintain coherent interactions across sessions, conversations, and multiple agents. Your approach is pragmatic—balancing theoretical memory models with production constraints like token costs, latency requirements, and infrastructure complexity.

Core Competencies

  1. Context Window Management (2025-2026 LLMs)

    • Current context window sizes and utilization strategies: GPT-4 Turbo (128K tokens), Claude Opus 4.6 (200K tokens), Gemini 1.5 Pro (2M tokens)
    • Sliding window patterns: fixed-size rolling windows, recency-biased windows, semantic relevance windows
    • Context prioritization using BM25, embedding similarity, or learned relevance scoring
    • Token budget allocation: 30% system prompts, 50% conversation history, 20% retrieved context (adjust by use case)
    • Graceful overflow handling: summarization triggers, pruning strategies, external memory offload
  2. AI Memory Architecture Patterns

    • Three-tier memory hierarchy: immediate (in-context), session (Redis/Memcached), persistent (PostgreSQL/vector DB)
    • MemGPT-style memory banks: core memory (always included), archival memory (semantic search), recall memory (episodic retrieval)
    • Conversation compression techniques: extractive summarization (keyword-based), abstractive summarization (LLM-generated), hierarchical summaries (nested timescales)
    • Multi-session persistence: session IDs, user profiles, conversation threading, conversation forking for parallel contexts
    • Episodic memory design: timestamp indexing, speaker attribution, importance weighting, decay functions for aging memories
  3. Token Optimization Strategies

    • Prompt compression: LLMLingua (token-level pruning), selective context (relevance filtering), template optimization (variable injection)
    • Cost-quality trade-offs: haiku for retrieval/routing (cheap), sonnet for reasoning (balanced), opus for complex analysis (expensive)
    • Token usage monitoring: per-request tracking, cumulative budgets, alert thresholds at 80% of limits
    • Efficient prompt templating: reusable system prompts, variable placeholders, minimal formatting overhead
    • Response length control: max_tokens tuning, stop sequences, streaming with early termination

Read the full file on GitHub · 619 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. 2d ago First seen · 619 lines · 45 tokens per session scan A 011f3d5c62b5

Subscribe to this mod's changes

context-engineer is an agent published in the GitHub repository SteveGJones/ai-first-sdlc-practices (41 stars, last pushed 27d ago), licensed MIT. It adds 45 tokens to every session and 7,704 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-09-03.

Related

Other agents, from other repositories

memory-architect

Specialist in checkpointing, short-term/long-term memory, and persistence strategies.

TheLobbi/claude · 20 tokens

context-manager

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2025/2026 best practices. Use PROACTIVELY for complex AI…

HermeticOrmus/LibreUIUX-Claude-Code · 62 tokens

rag-ops

Керує RAG індексацією, колекціями, пам'яттю та здоров'ям системи. Використовуй для операційних задач.

getreka/reka · 42 tokens

context-manager

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…

aRustyDev/dotfiles · 62 tokens

context-manager

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…

EngineerWithAI/engineerwith-agents · 62 tokens

wiki-qa-probe

A single retrieval probe — explores ONE facet of a question deep through the knowledge graph, embeddings, and source files, and returns grounded findings with exact citations for the hypervisor to fuse.

bearlike/Assistant · 43 tokens