ai-agent-design — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ai-agent-design (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A production LLM agent is a loop: model proposes an action (often a tool call), system executes it, result becomes the next observation, repeat until done. The interesting questions are: which loop pattern, what tools, what schemas, what stops infinite recursion, what's logged for debugging, what's the cost ceiling per task, and which OWASP risks are alive in this surface. This skill encodes the 2026 patterns with cited sources, and the cost / risk numbers that decide architectural choices.
Use this skill when designing a new agent, picking an orchestration framework, debugging a misbehaving agent, or hardening tool exposure. Skip it for single-shot LLM prompts that don't call tools — that's a prompt problem, not an agent problem.
Three forces shape every agent design:
The 2026 shift: "prompt engineering" → "context engineering" — curating the whole window (system prompt, tools, retrieved docs, memory, history, examples, output format) across many turns. See §9.
| Pattern | When to use | Source |
|---|---|---|
| ReAct (Thought → Action → Observation) | Default for tool-using agents | Yao et al., Princeton/Google, Oct 2022, arXiv:2210.03629 |
| Reflexion | Trial-and-error tasks where self-critique helps; more expensive | Shinn et al., arXiv:2303.11366 |
| Tree-of-Thoughts (ToT) | Hard search problems where ReAct gets stuck; branches reasoning paths | Yao et al., arXiv:2305.10601 |
| Plan-and-Execute | Cheaper than ReAct (fewer LLM calls per step); brittle when early steps surprise | LangGraph docs; practitioner pattern |
| ReWOO (Reasoning WithOut Observation) | Reduce tokens by decoupling reasoning from tool execution | arXiv:2305.18323 |
| Native tool use (OpenAI function calling / Anthropic tool use) | Production-grade structured tool invocation; default for new builds | OpenAI function calling; Anthropic define tools |
Both providers converge on JSON Schema tool inputs with a strict mode. Anthropic adds input_examples, tool search with deferred loading for large tool sets, and programmatic tool calling (the model orchestrates tools from code execution). The newest Claude models (Opus 5.5, Sonnet 5.5, Fable 5.1) reject forced tool_choice (any / tool): use auto with a prompt instruction, strict: true, or structured outputs.
The most-underserved craft area in 2026. Bad tool schemas produce loops, wrong-tool calls, and ambiguous outcomes.
Best practices (per Anthropic define-tools docs and Writing tools for agents):
action parameter) and namespace by service (github_list_prs); no two tools should plausibly answer the same query.input_examples or in-description examples for nested or format-sensitive inputs; explicit JSON Schema types; strict mode where available.Anti-patterns: generic names (get_data), overlapping tools (search_customers vs find_customer), many optional fields (filled with hallucinated defaults), vague return shapes.
Anthropic published Agent Skills as an open standard on Dec 18, 2025; the spec lives at agentskills.io. A skill is a directory with SKILL.md (YAML frontmatter + instruction body) and optional scripts and references, loaded on demand so only the frontmatter costs context until it's needed. Use skills for portable expertise that should travel between agents and clients; verify which clients support the current spec before relying on it.
Open protocol launched by Anthropic in Nov 2024, governed since Dec 2025 under the Linux Foundation's Agentic AI Foundation. Current spec revision: 2026-07-28, a partly breaking release:
initialize handshake and no Mcp-Session-Id; each request carries protocol version and capabilities in _meta; servers implement server/discover. Cross-call state uses server-minted handles passed as tool arguments.Mcp-Method / Mcp-Name headers); HTTP+SSE is deprecated.iss.tools/list should be deterministic (helps prompt-cache hits) and carries cache TTL hints.Security (best practices): servers must not accept or pass through tokens not issued to them; proxies need per-client consent; state handles are never authentication; local servers need explicit install consent and sandboxing; request minimal scopes and step up.
MCP vs REST: MCP when a tool will be reused across agents and clients (discovery, schemas, structured errors); REST when the tool is one-off or already a deployed service.
| Framework | Strength | Trade-off |
|---|---|---|
| LangGraph | Stateful graph + conditional edges; most production-tested OSS option | Steeper learning curve; LangChain abstractions |
| CrewAI | Role-based crews; lowest onboarding cost | Less control over execution |
| AutoGen | Conversational group-chat patterns | Every turn re-reads the full history; expensive at volume |
| Vendor agent SDKs (Claude Agent SDK, OpenAI Agents SDK, Google ADK) | Provider-tuned harness: tools, subagents, context management | Tied to one provider's features |
Cost trade-off: multi-agent is typically 2–4× single-agent for similar tasks; a 4-agent × 5-round debate is 20+ LLM calls minimum. Use it when sub-tasks are genuinely parallel, need isolated context windows, or need different tools; otherwise single agent + better tools + better context. Current frontier models delegate to subagents readily, so state when subagents are and aren't warranted.
Orchestration patterns:
Hard requirements for every production agent:
(tool_name, args) across a run; flag a repeat as a likely loop.Common root causes of stuck agents: missing max_turns, broken termination predicate, ambiguous tool schemas, oscillation between two near-equivalent actions.
OpenTelemetry GenAI semantic conventions — span names, tool-call attributes, agent spans, PII-safe content capture. They now live in their own repository and are still evolving, so pin the version you emit. MCP (2026-07-28) documents traceparent propagation in _meta, so traces can cross server boundaries.
| Tool | Strength |
|---|---|
| Langfuse | ClickHouse backend, native OTLP endpoint (/api/public/otel), strong multi-tenant; OSS |
| Arize Phoenix | Local-first, notebook-friendly, zero external deps; OSS |
| Helicone | Drop-in proxy when you cannot instrument code; OSS |
| LangSmith | Deepest LangChain integration; paid, per-seat |
Per-tool-call log — tool name, args (PII-safe), result, latency, token count, cost, error, parent span ID. Without these, debugging a multi-step failure is forensic guessing.
Map every tool, retrieved-context source, memory store, and output sink to the OWASP Top 10 for LLM Applications (2026 edition; name the edition, since many reports still use 2025 IDs) and the Agentic Top 10 (ASI01 Agent Goal Hijack … ASI10 Rogue Agents, Dec 2025). Full tables and defenses live in the sibling prompt-injection-defense skill.
Agentic failures to design against: Slack AI (Aug 2024, indirect injection exfiltrating private-channel data), EchoLeak (CVE-2025-32711, zero-click via email), GitHub Copilot RCE (CVE-2025-53773), ForcedLeak in Salesforce Agentforce (Sep 2025). In each, untrusted content reached an action surface. Design rule: no session should combine untrusted input, private data access, and external communication or state change without isolation or human confirmation (the "lethal trifecta").
Popularized in June 2025 (Tobi Lütke, Andrej Karpathy) as "filling the context window with just the right information for the next step." It covers system prompt, tool definitions, retrieved docs, memory, history, examples, and output constraints; prompt engineering is a subset.
Practical implications (Anthropic, Effective context engineering for AI agents, Sep 2025):
Cross-reference the cost / FinOps skill for caching numbers.
Within-domain pairings:
Primary sources:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.