Claude Application Design
Largest single skill on the exam. Official scope (Exam Guide v1.0): how Claude interprets instructions across interfaces (Claude Code, Desktop, claude.ai, API, SDKs), content boundaries, schema design, session hygiene and plugin management.
Pick the surface
| You want to | Use | Who runs the loop |
|---|---|---|
| Call the API directly from your code | Client SDK (Python, TypeScript, C#, Go, Java, PHP, Ruby) | You write the tool loop, or use the SDK's beta tool runner |
| Embed Claude Code's agent in your own Python/TypeScript process | Agent SDK | The SDK (built-in tools, permissions, sessions, hooks) |
| Have Anthropic host the agent | Managed Agents (beta) | Anthropic, in a managed cloud sandbox or your self-hosted sandbox |
| Interactive or one-off work in a terminal | Claude Code CLI | Claude Code |
Other languages can drive the Claude Code loop by running the CLI as a subprocess with -p and --output-format json. The surface is not the user interface: a chat UI can sit on any of these.
Instructions across interfaces (verified mechanics, design guidance on effects)
- API and SDKs: nothing is implicit. Only the
systemfield,messagesandtoolsyou send exist. The API is stateless: you resend the history every call. - Claude Code / Agent SDK: add CLAUDE.md files, settings, skills, auto memory and plugins from
.claude/and~/.claude/. These are context (CLAUDE.md) or enforced configuration (settings, hooks). - claude.ai and Desktop: the product adds its own instructions, plus Projects, connectors and memory features.
- Consequence (design guidance): the same sentence can behave differently on each surface. When porting a prompt, list what the old surface supplied that the new one does not.
Content boundary (verified principle, design guidance on placement)
- Decide what Claude may read (documents, tool results, retrieved pages) and produce (text, tool calls, code).
- A trusted system prompt does not make retrieved content or model output trusted. Put untrusted content in tool results, label its source, and validate output before rendering, executing or storing it (see 7.1).
Schema design (design guidance, verified features)
- Use strict tool use (
strict: true) for schema-valid tool inputs and structured outputs for a fixed JSON response shape. - Required vs optional fields chosen on purpose; enums over free text; shallow structures; a
descriptionon every field. - Schema-valid is not correct: still validate business rules (6.3).
Session hygiene (design guidance)
One purpose per session; start fresh for unrelated work; compact or clear stale context; do not carry outdated instructions forward. In Claude Code, /clear and /compact exist for this (3.1).
Plugin management
- A Claude Code plugin packages skills, agents, hooks and MCP servers as one unit; install scope is user, project (committed
.claude/settings.json) or local. - An enabled plugin costs context every turn: each invocable skill and agent's name and description is loaded even when unused. Disable what you do not need.
- A plugin runs code as you; review third-party plugins. Organizations can allowlist or block marketplaces through managed settings.
Design for failure (verified error facts)
Every call can be truncated (max_tokens), refused (refusal), rate-limited (429), overloaded (529) or wrong. Decide the user-visible behaviour for each before launch: retry transient errors, fall back (smaller model, cached answer, human), and never treat a 200 as "complete" without checking stop_reason (2.3).
Who is waiting decides the request shape (design guidance)
| Situation | Shape |
|---|---|
| A person watching a screen | Streaming |
| Embedded feature, short answer | Synchronous call |
| Nobody waiting, high volume | Message Batches API (50% off, async) |
Exam traps
- "The API remembers the conversation." It is stateless.
- Assuming a prompt behaves the same on claude.ai and the API.
- Trusting model output (rendering or executing it directly).
- Treating the chat UI as the architecture.
- Enabling every plugin "just in case": constant context cost and more code running as you.
References
- Agent SDK overview — checked Oct 16, 2026
- Managed Agents overview — checked Oct 16, 2026
- Plugins — checked Oct 16, 2026
- Errors — checked Oct 16, 2026
- Tool use overview — checked Oct 16, 2026
Check your understanding
10,000 documents need summaries overnight; nobody waits. Shape?Show answerHide answer
Answer
Message Batches API.A team wants Claude Code's file and shell tools inside its own Python service. Surface?Show answerHide answer
Answer
Agent SDK.A prompt that worked in Claude Code ignores project conventions when moved to the API. Why?Show answerHide answer
Answer
CLAUDE.md and other Claude Code context are not sent by the API; include what is needed in the system prompt.Generated SQL is executed directly. Which principle is broken?Show answerHide answer
Answer
Model output is untrusted; validate and parameterise.