CertifyDeck
All cheat sheets
CCDV-F · CHEAT SHEET

Claude Certified Developer – Foundations

Key concepts grouped by official exam weight.

Download as PDF (free, no sign-up)

1. Agents and Workflows

17–17%

Architecture and Runtime Selection

  • Use workflows with fixed code paths when steps are predictable and auditable, and agents only for open-ended problems; add complexity only when an evaluation justifies it. Parallel subagents suit broad, independent tasks, not shared-context ones. The Agent SDK runs in your process; Managed Agents hosts the loop, in a cloud or self-hosted sandbox.

Agent SDK Construction and Hooks

  • In AgentDefinition, description drives delegation and tools restricts the tool set; a subagent only receives the Agent tool prompt. Required actions belong in hooks, not the prompt: PreToolUse denies before a tool runs, a Stop hook with decision block prevents finishing, and onFailure block stops a failing hook from letting calls through. Matchers compare tool names.

Agent Pattern Diagnosis

  • An agent is a model using tools in a loop: the loop must branch on stop_reason, have a stopping condition and return failures with is_error. Subagents isolate context and receive only the delegation prompt; external memory, feature lists and CLAUDE.md preserve what compaction would otherwise summarize away.

2. Applications and Integration

20–20%

Messages API Mechanics

  • The Messages API is stateless: each request carries the full history, tool_result blocks come first in the user message and thinking blocks are passed back unchanged. Caching needs an identical prefix (tools, system, messages) up to the breakpoint, and Message Batches processes requests asynchronously and matches results by custom_id.

Application Boundary and Surface Behavior

  • Claude's apps add their own system prompt that the API does not apply; on the API, the system role has operator priority over the user role and external content belongs in tool_result. Claude only receives your tools' schemas and results; files are isolated per workspace and PHI must stay out of JSON schemas. Each request carries its own history, and SDK sessions are local unless you use a sessionStore.

Configuration and SDLC Integration

  • CLAUDE.md files are concatenated, not overridden, and subdirectory files load on demand; settings.json resolves managed, command line, local, project, then user, and a managed model is a default while availableModels is the lock. Model IDs are fixed snapshots; Managed Agents sessions can pin an agent version. In CI, --bare skips CLAUDE.md and hooks, and caches are isolated per workspace.

Integration Resilience

  • When streaming, stop_reason arrives in message_delta, usage is cumulative, tool deltas are partial JSON and mid-stream errors arrive after a 200 without SDK retries. Retry 429 with retry-after, 529 and 5xx per x-should-retry; never a 400 or a spend cap. A refusal is a 200 with stop_reason refusal, and the Files API needs the right content block for each file type.

3. Claude Code

8–8%

Claude Code Operation

  • CLAUDE.md files (managed, user, project and CLAUDE.local.md) are concatenated, not overridden, and are context rather than enforcement; blocking uses permissions.deny. Precedence is managed, --settings, local, project, user. dontAsk with --allowedTools suits CI, --bare isolates claude -p, cloud sessions see only what is committed, and Remote Control keeps execution local.

Claude Code Customization and Extension

  • CLAUDE.md and .claude/rules/ give standing context (rules with paths load only for matching files); skills load their body on demand and replace slash commands; subagents isolate context and restrict tools; hooks run every time on their event. A plugin bundles them with .claude-plugin/plugin.json and is distributed through a marketplace.json.

4. Eval, Testing, and Debugging

10–10%

Evaluation Design

  • A good evaluation starts from specific, measurable success criteria, uses code-based graders where possible and LLM-as-judge with clear rubrics, calibrated against human labels, where nuance is needed. Tasks should be unambiguous with a reference solution, cover cases where a behavior should and should not occur, and keep capability and regression evals separate.

Failure-Mode Diagnosis

  • Diagnosing a failure means reading the trace: a refusal arrives as HTTP 200 with stop_reason refusal and is recovered on another model or by changing the prompt; hallucinations drop with quotes and permission to say it does not know; many failures start in the integration (history not resent, text after tool_result, modified thinking blocks). The fix must target the cause, not retry the symptom.

5. Model Selection and Optimization

12–12%

Generation Mechanics and Model Options

  • Everything counts toward the context window (tools, results, cached prefixes) and token counts depend on the model. Output is not deterministic, and API version 2026-10-21 rejects temperature, top_p and top_k. With adaptive thinking, Claude decides per request whether to think; effort is the main, soft lever, while max_tokens is the strict cap that includes thinking.

Model Tier Selection and Release Planning

  • Choose a model tier by cost per completed task on your own traffic, not by price per token, and tune effort before switching models. Start with the fastest tier when latency and volume dominate, or with the most capable one when accuracy does. Model IDs are fixed snapshots: switch only after your regression suite and a shadow run pass.

Cost Diagnosis and Optimization

  • Read the usage fields (input_tokens, cache_read_input_tokens, cache_creation_input_tokens, output_tokens) to see what dominates cost. The cache is an exact match of the tools, system and messages prefix: put the breakpoint on the last stable block and add another if turns add so many blocks that the lookback misses the previous write. Work nobody waits on goes to Message Batches, and output shrinks by asking for shorter answers.

6. Prompt and Context Engineering

15–15%

Context Management for Long-Running Sessions

  • As context grows, accuracy and recall degrade (context rot), so it must be curated. Compaction summarizes older turns, tool result clearing removes stale tool output, subagents isolate verbose output and return a summary, and persisted notes carry progress across sessions. In Claude Code, run /clear between unrelated tasks or after two failed corrections.

Prompt Revision

  • Revising a prompt starts from measurable criteria and an automated suite rerun in full after every change. Documented fixes: ask for the action and format positively with the reason, use diverse examples in <example> tags, put long documents before the question, keep untrusted content JSON-encoded in tool_result blocks, and replace prefill with structured outputs.

Structured Output and Defensive Parsing

  • output_config.format guarantees schema-valid JSON and strict: true guarantees tool inputs, but code must still check stop_reason (refusal, max_tokens), compare enums case-insensitively and validate the constraints the SDK moves into descriptions. Citations cannot be combined with output_config.format: ask for "field: value" lines and parse them defensively.

Grounding and Source Citation

  • To ground answers, enable citations on documents or search_result blocks (valid pointers, cited_text not billed as output), pick the document type for the granularity you need, and allow a "not found" reply while restricting the model to the documents. If the corpus fits and is stable, send it whole with prompt caching; if it is large or changes often, retrieve only the relevant passages.

7. Security and Safety

8–8%

Prompt Injection and Jailbreak Defense

  • Direct injection comes from the user; indirect injection arrives in third-party content (emails, webpages, OCR, tool results). Against the indirect kind: deliver that content only in tool_result blocks, label its source, state in the system prompt that it is untrusted data, JSON-encode it, screen it with a lightweight classifier and apply least privilege; then red-team and monitor.

Deterministic Guardrails and Least Privilege

  • A prompt instruction does not stop a destructive action; deny rules, blocking PreToolUse hooks (exit 2 or permissionDecision deny, with onFailure: "block" when the guard may fail) and the sandbox, which enforces limits at the operating-system level regardless of the command text, do. Deny rules apply in every mode, including bypassPermissions, and managed-settings denies cannot be overridden.

API Key and Credential Handling

  • The key lives on the back end, never in the browser, and for agents an external proxy should inject it so the agent never sees it. Use personal keys for your own work, service account keys for shared workloads and Workload Identity Federation where an identity provider exists; separate environments by workspace, keep keys in a secrets manager, review usage and expiry, and revoke a leaked key at once.

8. Tools and MCP

10–10%

Tool Design and Response Shaping

  • The description is the biggest factor in tool performance: what the tool does, when to use it and when not, what each parameter means and what it does not return. Responses should be short and useful (relevant fields, readable identifiers, pagination and truncation with guidance) and errors actionable and marked with is_error. User-defined tools run in your code and server tools at Anthropic; with many tools, namespacing and tool search help.

MCP Server Development and Integration

  • An MCP server offers tools (invoked by the model), resources (read-only data the application supplies) and prompts (templates the user picks). Stdio is a local subprocess that writes only JSON-RPC messages to stdout and takes credentials from the environment; Streamable HTTP serves many remote clients with OAuth, checking that each token was issued for that server.

Capability Mechanism Selection

  • Server tools (web_search, code_execution) are run by Anthropic; Anthropic-schema tools (bash) and your own tools are run by your application, ideal for private logic. A Skill supplies procedures that Claude loads on demand from its description, and an MCP server connects an external service that its owning team maintains and several clients share.