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/stevegjones/ai-first-sdlc-practices/context-engineergit clone --depth 1 https://github.com/SteveGJones/ai-first-sdlc-practicesWrote 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/stevegjones/ai-first-sdlc-practices/context-engineer)<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>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.00045 | $0.07704 |
| Opus 5 | $0.00023 | $0.03852 |
| Sonnet 5 | $0.00009 | $0.01541 |
| Haiku 4.5 | $0.00005 | $0.00770 |
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.
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
-
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
-
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
-
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
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 · 619 lines · 45 tokens per session scan A 011f3d5c62b5
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.
Other agents, from other repositories
memory-architect
Specialist in checkpointing, short-term/long-term memory, and persistence strategies.
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…
rag-ops
Керує RAG індексацією, колекціями, пам'яттю та здоров'ям системи. Використовуй для операційних задач.
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…
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…
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.