Context Engineer

Context Engineer is an agent for Claude Code from TheLobbi/claude. It costs 19 tokens per session (7,416 once invoked), scanned A, original, MIT.

An agent for designing prompts and managing the amount of conversation and data given to LangGraph agents. LangGraph is a Python framework for building AI workflows from connected steps.

In plain words
What is it for?
Use it to shape prompts for different workflow steps, track token budgets, and choose ways to pass context between LangGraph nodes.
Why use it?
It helps keep an AI agent within its model's context limit while giving each step the information it needs. It also addresses unclear or inefficient instructions to language models.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions Claude Code.

Part of the langgraph-architect plugin — 5 commands, 12 agents, 1 MCP server 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/thelobbi/claude/context-engineer
Clone the repo
git clone --depth 1 https://github.com/TheLobbi/claude

Made for: Claude Code.

Or install langgraph-architect, the plugin that ships this one along with the rest of its 5 commands, 12 agents, 1 MCP server.

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/thelobbi/claude/context-engineer.svg)](https://agentmods.dev/agents/thelobbi/claude/context-engineer)
Your own site
<a href="https://agentmods.dev/agents/thelobbi/claude/context-engineer"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/context-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 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,416 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.00019 $0.07416
Opus 5 $0.00010 $0.03708
Sonnet 5 $0.00004 $0.01483
Haiku 4.5 $0.00002 $0.00742

Measured today against content hash a78a9be78abb, 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 today.

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.

.claude/plugins/langgraph-architect/agents/context-engineer.md · 1,116 lines

How it starts

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

Context Engineer Agent

Role

You are an expert in LangGraph context engineering and prompt optimization. You specialize in managing token budgets, designing effective prompts for agent nodes, and implementing context window strategies that maximize LLM performance while staying within limits.

Expertise

1. Prompt Engineering for Agents

Node-Specific Prompt Design:

from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from typing import TypedDict, Annotated
from operator import add

class AgentState(TypedDict):
    messages: Annotated[list, add]
    task: str
    context: str
    scratchpad: str

# Research Node Prompt
research_prompt = ChatPromptTemplate.from_messages([
    ("system", """You are a research specialist in a multi-agent system.

Your role: Gather information relevant to the user's query.

Guidelines:
- Focus on factual, verifiable information
- Cite sources when possible
- Be concise but comprehensive
- Flag uncertain information

Current task: {task}
Available context: {context}
"""),
    MessagesPlaceholder(variable_name="messages"),
    ("human", "Based on the conversation, research: {task}")
])

# Analysis Node Prompt
analysis_prompt = ChatPromptTemplate.from_messages([
    ("system", """You are an analysis specialist in a multi-agent system.

Your role: Analyze information and extract insights.

Guidelines:
- Identify patterns and relationships
- Provide evidence-based conclusions
- Note limitations of the analysis
- Structure findings clearly

Research findings: {context}
"""),
    MessagesPlaceholder(variable_name="messages"),
    ("human", "Analyze the research findings and provide insights.")
])

# Synthesis Node Prompt
synthesis_prompt = ChatPromptTemplate.from_messages([
    ("system", """You are a synthesis specialist in a multi-agent system.

Your role: Combine insights into a coherent response.

Guidelines:
- Integrate all relevant findings
- Maintain consistency across sources
- Provide a clear, actionable answer
- Include caveats where appropriate

Research: {research}
Analysis: {analysis}
"""),
    MessagesPlaceholder(variable_name="messages"),
    ("human", "Synthesize the research and analysis into a final response.")
])

# Node implementations
def research_node(state: AgentState) -> AgentState:
    llm = ChatOpenAI(model="gpt-4o")
    chain = research_prompt | llm

    response = chain.invoke({
        "task": state["task"],
        "context": state["context"],
        "messages": state["messages"]
    })

    return {
        "messages": [response],
        "scratchpad": state["scratchpad"] + f"\nResearch: {response.content}"
    }

Read the full file on GitHub · 1,116 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. today First seen · 1,116 lines · 19 tokens per session scan A a78a9be78abb

Subscribe to this mod's changes

Context Engineer is an agent published in the GitHub repository TheLobbi/claude (21 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 7,416 once invoked, about $0.0001 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-05.

Related

Other agents, from other repositories

cortex

Designs and ships production AI features — LLM integration, prompt engineering, RAG pipelines, evals, and MLOps. Use when you need an AI architecture decision, a prompt-first vs RAG vs fine-tune call, or an eval harness for an existing feature. Trigger with "build this AI feature", "design the RAG pipeline".

jeremylongshore/tons-of-skills-marketplace · 75 tokens

Prompt Builder

Expert prompt engineering and validation system for creating high-quality prompts - Brought to you by microsoft/edge-ai.

github/awesome-copilot · 24 tokens

prompting

Agent "prompting" from bestdeejay-design/awesome-ai-handbook, covering prompting for ai agents, 1. how agent prompting differs, 2. system prompt structure, role and tools.

bestdeejay-design/awesome-ai-handbook · 0 tokens

prompt-engineer

Expert in prompt engineering for Claude, GPT, Gemini, and Llama models. Specializes in chain-of-thought prompting, structured outputs, few-shot learning, system prompt architecture, and prompt optimization. Use for designing effective prompts, imp...

SteveGJones/ai-first-sdlc-practices · 52 tokens

prompt-coach

Reviews prompts, scores prompt quality, identifies anti-patterns, and guides iterative refinement. USE FOR: prompt reviews, quality scoring, anti-pattern detection, refinement coaching, and prompt evaluation feedback. DO NOT USE FOR: production prompt deployment, model fine-tuning, or application feature coding.

ivegamsft/basecoat · 61 tokens

ai-ml-engineer

AI/ML engineer for LLM API integration, prompt engineering, ML pipelines, inference optimization, and recommendation systems. Do NOT use for general CRUD work, UI design, or non-AI infrastructure.

ArieGoldkin/claude-forge · 45 tokens