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

Good fit Use it to shape prompts for different workflow steps, track token budgets, and choose ways to pass context between LangGraph nodes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/thelobbi/claude/context-engineer
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/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/github.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/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 Engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/thelobbi/claude/context-engineer"><img src="https://agentmods.dev/badge/agents/thelobbi/claude/context-engineer.svg" alt="Reviewed on agentmods" width="80" 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. 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.00019 $0.07416
Opus 5.5 $0.00008 $0.02966
Sonnet 5.5 $0.00004 $0.01483
Haiku 4.5 $0.00002 $0.00742

Measured 1mo ago against content hash a78a9be78abb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

.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. 1mo ago 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 6d ago), licensed MIT. It adds 19 tokens to every session and 7,416 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-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

token

Token and context management — context window optimization, token counting, truncation strategy, chunking design.

tonone-ai/tonone · 21 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

security-ai-code

HUGIN, código gerado por IA e apps com LLM na squad Security. Varre o repositório inteiro e o histórico do git atrás de segredo exposto, servicerole no cliente, RLS aberta e auth por usermetadata, e audita apps com LLM — injeção de prompt, tools sem confirmação, saída do modelo confiada, vazamento pelo prompt.…

joaoguirunas/team-os · 94 tokens

hyv-veo-prompt-smith

The generative-prompt writer for HearYourVOICE (Phase 4). Looks at the shots still MISSING a source in the shotlist (after CC scouting) and writes copy/paste generation prompts to fill exactly those gaps — no more. Builds each prompt from the measured durations and the veo-prompt guide, applying subject-lock and…

killernay/HearYourVOICE · 124 tokens