/agent-engineer:agent-contextfrom Agent Engineer
Engineers an agent's context window for long or multi-turn runs: ordering, token budgets, just-in-time loading, tool-result clearing, compaction, scratchpads, progress files, long-term memory, subagent isolation, prompt-cache hit rate, and measuring context from traces.
Ships in Agent Engineer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Give the model the smallest set of high-signal tokens for the next step, keep the prefix cacheable, and hold long-run state outside the window. Every model degrades as input grows, well before its limit; a bigger window does not fix it.
experiment-log.md.references/context-budget-and-ordering.md). No tracing → agent-observability.references/prompt-caching.md): hit rate before and after.references/long-running-agents.md.design.md → "Context strategy": what's in the system prompt, what's
fetched just in time, compaction trigger, memory stores.agent-evals for trajectory graders, agent-production for cost and latency,
agent-guardrails if memory stores untrusted content.| If | Then |
|---|---|
| Bulky, stale tool outputs fill history | Tool-result clearing first: keep the call, drop the payload, leave a pointer. |
| Long conversational back-and-forth | Compaction (server-side if offered) with a must-preserve list. |
| Iterative work with milestones | A progress/notes file the agent reads and rewrites. |
| Broad, parallel investigation | Subagents with clean windows returning condensed summaries. |
| Work spans windows or sessions | Fresh window + progress file + git + JSON task list. |
| Static knowledge < ~200K tokens and below your measured quality ceiling | In the prompt, cached. Larger or changing → agent-rag or agentic search. |
| Tool definitions dominate input | Tool search / deferred loading (agent-tools → references/tool-definition-checklist.md); mask per state. |
| Agent repeats past actions or drifts | Shorten history; vary serialisation of observations. |
| Instructions forgotten late in a run | Recite the plan (todo.md) at the end of context; restate format rules every 3–5 turns; enforce in code. |
| Low cache hit rate | Find the prefix mutation: timestamp, reordered JSON, changed tools or system prompt. |
| Memory across sessions or users | Scoped store with explicit read/write tools; stored text is untrusted input. |
| Two corrections failed in a session | Clear and restart with a better brief. |
Write these to agent-engineering/ only if the project keeps one (see agent-engineer → Project record (optional)); otherwise put them in your reply or the PR description.
design.md → "Context strategy".observability.md.experiment-log.md entries per context change, with eval and token deltas.references/context-budget-and-ordering.md — layout order, always-on vs on-demand,
two-stage selection, budgets, failure modes, trace metrics. Read first when profiling.references/memory-and-compaction.md — clearing, compaction prompt, errors, scratchpads,
long-term memory. Read when history grows or memory is needed.references/prompt-caching.md — cache-friendly layout, tool masking, provider rules,
hit-rate monitoring, cache breakers. Read when per-turn cost or latency is high.references/long-running-agents.md — multi-window harness, state files, bounds,
evaluating long runs. Read when runs exceed one window or ~50 tool calls.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sarthakrastogi/agent-engineer --plugin agent-engineer13 skills in this plugin
/agent-accuracyDebug and fix an LLM agent or RAG system that gives wrong, inconsistent, hallucinated or low-quality results: reproduce, localise the failing component, one hypothesis, the least-powerful fix, measure, check regressions, log. Use when the user says "it hallucinates", "wrong answers", "accuracy dropped", "flaky / right only sometimes", "worse after the model upgrade", "should I add RAG / a bigger model / fine-tune?", or wants a pass rate up. Not for building evals (agent-evals), errors/timeouts/migrations (agent-production), retrieval internals (agent-rag), prompt rewrites (agent-prompting) or tool redesign (agent-tools)./agentcoreBuilds, secures, ships and operates agents on Amazon Bedrock AgentCore: the harness (config-based managed agent, "agent builder"), code agents and MCP servers on Runtime, the @aws/agentcore CLI, Gateway, Identity (JWT, OAuth, on-behalf-of), Memory, Code Interpreter, Browser, Web Search, Policy (Cedar) and Bedrock Guardrails, Observability, Evaluations, Registry, and CDK/CloudFormation/Terraform. Use when code or the request mentions AgentCore, bedrock-agentcore, harness.yaml, agentcore.json, InvokeAgentRuntime or InvokeHarness, or migrates Bedrock Agents Classic. Not for vendor-neutral design, prompts, tool design, evals or tracing (the agent-* skills; this one maps them onto AgentCore)./agent-designScopes and architects LLM agents: testable success criteria, the simplest shape (single call, workflow, single agent, multi-agent), framework and models, human checkpoints, agent-engineering/design.md. Use when building an agent from scratch, deciding agent vs workflow vs multi-agent, choosing a framework or model, or redesigning one that is too slow, costly or unreliable. Not for tool schemas or MCP (agent-tools), prompt wording (agent-prompting), memory (agent-context), retrieval (agent-rag), tuning a running agent (agent-production), or permissions (agent-guardrails)./agent-engineerEntry point for LLM agent work when the right agent-* skill isn't obvious. Maps symptoms to the specialised agent-* skills and defines the optional agent-engineering/ project record. Use when starting a blank-page agent, chatbot or RAG project ("build an agent that…", "where do I start?"), for a broad request spanning several areas ("we're launching next week", "review our agent"), or to survey an existing LLM codebase before changing it. For a specific task (a prompt, tools, evals, tracing, retrieval, cost) load that skill directly instead./agent-evalsMeasure LLM agents and RAG systems: error analysis on traces, failure taxonomy, datasets and synthetic inputs, code graders and LLM judges, judge validation (TPR/TNR, bias correction), trajectory and tool-call evals, pass@k vs pass^k, CI gates, online evals. Use when the user says "add evals", "is this change better?", "write a judge", "can I trust this judge", "build a test set", "add an eval gate to CI", "score production traffic", or has traces and doesn't know what to measure. Not for fixing the cause of wrong output (agent-accuracy), retrieval metrics in depth (agent-rag) or emitting traces (agent-observability)./agentforceBuilds, wires, tests, secures and operates Salesforce Agentforce agents in the new Agentforce Builder: Agent Script (.agent), subagents, actions (Flow, Apex, prompt templates, Integration Procedures, External Services, MCP), Prompt Builder, Data Cloud / Data 360 retrievers, Custom Lightning Types, channels (messaging, web, Slack, voice, Agent API), Trust Layer and guardrails, trace SQL, testing and the `sf agent` CLI. Use for a Salesforce DX project with agent metadata, or when the user mentions Agentforce, Agent Script, Einstein, Prompt Builder, Data Cloud, OmniStudio or `sf agent`. Generic method (evals, prompts, RAG) stays in the agent-* skills.Other plugins' skills for the same job