Anthropic certification · Exam CCDV-F

CCDV-F Mock Exam Page 2

Claude Certified Developer-Foundations

Free CCDV-F mock exam questions 11–20, each with the answer and an explanation.

20 questions · 46 minutes · free, no sign-up

Free CCDV-F questions

11–20 of 24 free
Question 11 Choose 1
Your Claude application uses structured output that is consumed by downstream code. The team wants to handle malformed or unexpected output gracefully so it does not crash downstream systems. The best choice for handling this issue would be to...
Show answerHide answer

Correct answer: D Apply defensive parsing to handle unexpected fields, missing values, and type mismatches that the downstream code might otherwise crash on.

Explanation

Explanation

The goal is to prevent malformed or unexpected output from crashing downstream systems. Defensive parsing is the right tool: it treats the model's output as untrusted input and normalizes it before downstream code consumes it. Concretely, it:

- Tolerates unexpected fields — ignores or quarantines fields not in the schema rather than failing.

- Handles missing values — substitutes safe defaults, marks them explicitly, or routes them to a repair or fallback path.

- Coerces or rejects type mismatches — for example, a string where a number is expected gets parsed or flagged rather than passed through to crash the consumer.

Combined with validation, which detects the problem, and repair or fallback, which recovers, defensive parsing forms the boundary layer that makes the integration resilient. Malformed output becomes a handled condition, not an outage. ✅

Why the other options are incorrect

A — "Crash on any unexpected output; require manual recovery": This is exactly the failure mode being avoided. One unexpected field takes down requests and demands manual intervention, which doesn't scale.

B — "Silently drop non-matching output": Prevents a crash but creates silent data loss. Downstream systems receive incomplete or missing data without any signal, which can be worse than a visible failure and hides defects.

C — "Use the output as-is; defer schema enforcement": This is a direct cause of downstream crashes because untrusted, unvalidated output reaches consumers. Deferring enforcement doesn't remove the risk; it simply moves the failure into production.

References

- Anthropic structured-output and tool-use guidance — validate and defensively handle model output before downstream consumption.
Question 12 Choose 1
You are writing a system prompt for a Claude application that needs to produce output in a specific JSON shape. The downstream system will reject any output that does not match the schema. Your prompt would need to...
Show answerHide answer

Correct answer: D Include explicit constraints describing the required JSON schema and an instruction to produce only output matching that schema.

Explanation

Explanation

The requirement is strict: the downstream system rejects any output that does not match the schema. When an output contract is non-negotiable, the system prompt must state the contract explicitly and unambiguously:

- Describe the required JSON schema — fields, types, required versus optional fields, and allowed values. Claude needs to know the exact structure rather than infer it.

- Instruct it to produce only output matching that schema — no preamble, free text, Markdown fences, or deviations.

This gives the model the information it needs to satisfy the contract on the first try, making explicit schema instructions a primary lever for improving adherence. Best practice pairs this with validation and retry or repair as a safety net, but the prompt itself must clearly specify the required schema. ✅

Why the other options are incorrect

A — "Let Claude choose the most appropriate format": Directly contradicts the requirement. Format choice is exactly what the model must not make here because the schema is fixed.

B — "JSON sometimes, free text other times": Guarantees schema violations because free-text outputs will be rejected by the downstream system.

C — "Omit format reference and reshape in post-processing": Removes the model's ability to target the schema and shifts the burden to potentially fragile reshaping logic that cannot reliably recover structure the model never produced. It also contradicts the requirement to make the prompt meet the contract.

References

- Anthropic prompt engineering and structured-output guidance — specify the exact schema and constrain output to it in the system prompt.
Question 13 Choose 1
A teammate has asked you to explain when a Skill would be the right choice over an MCP server. The teammate is unsure how the two differ in practice when both can be reused across teams. How would you explain the distinction?
Show answerHide answer

Correct answer: D A Skill bundles prompts, scripts, and data into a package the model loads as a unit while an MCP server exposes resources, tools, and prompts through a standard client interface.

Explanation

Explanation

The question asks for the practical distinction between two reusable extension mechanisms. The clean way to frame it:

- A Skill is a packaged bundle — instructions/prompts, scripts, and supporting data/resources — that Claude loads as a unit to gain a capability. It's a self-contained, declarative package of how to do something, and it's well-suited to reusable know-how and workflows shared across teams (files and instructions that travel together).

- An MCP server is a service interface — it exposes resources, tools, and prompts over the Model Context Protocol to any MCP-speaking client. It's the right choice when you need a live, shared, programmatic integration with systems or data sources (APIs, databases, services) that many clients connect to at runtime.

The choice comes down to the nature of the capability: a packaged bundle of instructions, scripts, and data (Skill) vs. a running interface exposing resources, tools, and prompts (MCP server). Option D captures both mechanisms accurately and distinguishes them, which is what the teammate needs to decide. ✅

Why the other options are incorrect

- A — "Equivalent, interchangeable for any reusable capability": False — they're different mechanisms with different shapes (loaded package vs. client interface); picking one is a design decision, not a coin flip.

- B — "Skill is older; MCP is newer, so prefer MCP": Mischaracterizes them as generations of the same thing; they're complementary and serve different purposes, not successive versions.

- C — "Skills load more efficiently, so prefer them for cross-team reuse": A performance claim used to justify one as universally better — not the distinction; efficiency isn't the deciding factor, and neither mechanism is universally preferable.

References

- Anthropic Claude Skills documentation — Skills package instructions, scripts, and resources to support reusable capabilities.
Question 14 Choose 1
Your Claude application uses tool calling to fetch patient data and generate summary reports. The flow occasionally fails because the model returns a tool_use block that references arguments not present in the schema, and your application code does not handle this case gracefully. How would you address this?
Show answerHide answer

Correct answer: A Validate the tool_use block's arguments against the tool schema before dispatching the tool and handle invalid arguments as a recognized error path.

Explanation

Explanation

The failure is specific and recurring: the model sometimes returns a tool_use block whose arguments don't conform to the tool schema, and the application doesn't handle it gracefully. The correct fix is a validation gate before dispatch:

- Validate arguments against the tool schema — check required fields, types, and allowed values in the tool_use block before calling the tool.

- Handle invalid arguments as a recognized error path — when validation fails, don't dispatch; instead, return a structured error to the model (as a tool_result with is_error) so it can correct its call, or apply bounded retry, repair, or fallback.

This protects the tool from malformed input, keeps the model in the loop to self-correct, and turns an unhandled crash into a managed error path — the standard tool-use error-handling pattern. ✅

Why the other options are incorrect

- B — "Log and proceed; rely on the tool's own error handling": Dispatches known-invalid arguments and depends on the tool to surface failures — this risks side effects and doesn't give the model a clean opportunity to self-correct.

- C — "Retry repeatedly until a valid tool_use block appears": An unbounded loop with no validation gate can spin indefinitely, adds latency, and isn't a deterministic handler. Retry is appropriate only when bounded and validation-driven, as in A.

- D — "Stop using tool calling; use prompted text generation": Abandons a working mechanism over a manageable edge case; text generation doesn't actually fetch data or execute tools and loses the structured contract.

References

- Anthropic tool-use documentation — validate tool inputs and return errors via tool_result with is_error so the model can correct its call.
Question 15 Choose 1
You are extending a Claude agent with a capability that needs to be reusable across multiple teams in the organization, with each team able to invoke and use it independently. How would you build the capability?
Show answerHide answer

Correct answer: C As a Skill or MCP server because both are purpose-built for cross-team reuse independently by each consuming team.

Explanation

Explanation

The requirement is explicit: the capability must be reusable across multiple teams, with each team able to invoke and use it independently. That is precisely what Claude's extension mechanisms are designed for:

- A Skill — packages instructions, scripts, and data into a unit that any team's Claude loads and uses, giving every consumer the same capability without copying code.

- An MCP server — exposes resources, tools, and prompts through a standard client interface, so multiple independent Claude applications connect to the same server and use it without each reimplementing it.

Both are purpose-built for exactly this pattern: define once, consume independently by many teams, with the capability maintained in one place. The consuming teams don't need to share code or coordinate releases — they just load/invoke the capability. ✅

Why the other options are incorrect

- A — "Custom tool in this team's agent; others copy it": Defeats reuse — every team gets a fork that drifts, and maintenance multiplies across copies. It's duplication, not shared capability.

- B — "Shared library each team imports and must keep updated": Creates a coupling and maintenance burden on every consuming team; each integration can fall out of sync, so there's no single, independently-invocable capability.

- D — "Wrapper around a built-in tool": Built-in tools aren't a cross-team reuse mechanism; a wrapper adds functionality for one agent, not a shareable capability other teams can independently adopt.

The tested distinction: purpose-built extension mechanisms (Skill / MCP server) for independent cross-team reuse vs. copy-paste, per-team library integration, or wrapping built-ins.

References

- Anthropic Claude Skills documentation — packaged capabilities reusable across teams/projects.
- Model Context Protocol documentation — standard interface letting multiple independent clients connect to one server.
Question 16 Choose 1
A teammate has asked how to extend Claude Code with a custom Skill that the team can invoke during sessions. The Skill consists of a set of instructions and a few support scripts the team wants Claude to be able to call when the Skill is loaded. Where is the right place to define the Skill?
Show answerHide answer

Correct answer: C Define the Skill in a Skills directory recognized by Claude Code, where Claude can discover and load it during sessions for the team's repositories.

Explanation

Explanation

A Skill is a packaged capability — instructions plus support scripts/resources — that Claude Code discovers and loads at session time. The right place to define it is a Skills directory that Claude Code recognizes (e.g., within the project/repository or a configured skills location). From there:

Claude Code discovers the Skill automatically — no manual loading each session.
The Skill can be committed with the repository, so every team member gets it consistently and changes are version-controlled and reviewed.
The support scripts travel with the instructions as a unit, so when the Skill is loaded, Claude can call those scripts as intended.

This matches how Skills are designed to work: packaged, discoverable, project-scoped capabilities. ✅

Why the other options are incorrect

A — "Inline instruction at the top of every CLAUDE.md": CLAUDE.md holds project memory/context, not packaged skills with scripts; stuffing instructions into every repo's file duplicates them, and it doesn't provide the Skill packaging or script discovery mechanism.

B — "Define as a library module and call from application code": That's ordinary application code, not a Skill — Claude Code can't discover or load it as a capability during sessions; it bypasses the Skill mechanism entirely.

D — "Personal scratch directory, loaded manually each session": Makes the Skill per-developer and manual, so it isn't shared across the team, isn't consistently available, and isn't version-controlled — failing the "team can invoke it during sessions" requirement.

References

Anthropic Claude Code Skills documentation — Skills defined in recognized directories, discovered and loaded during sessions, with support scripts.
Question 17 Choose 1
Your Claude agent’s hooks are currently triggered for every action, which slows down the agent significantly even when actions pose no risk. The team wants to scope hooks more carefully. How would you scope the hooks?
Show answerHide answer

Correct answer: A Scope hooks to only the high-risk actions, such as destructive operations or sensitive data access, and remove hooks from low-risk actions to balance safety with performance.

Explanation

Explanation

The problem is over-broad hook coverage: hooks fire on every action, adding latency even for actions that pose no risk. Hooks are a deterministic control — valuable where the stakes are high — so the right fix is risk-based scoping:

- Keep hooks on high-risk actions — destructive operations (deletes, writes, deploys), sensitive data access, privileged commands — where deterministic enforcement prevents real harm.
- Remove hooks from low-risk actions — read-only queries, harmless lookups — where the overhead buys nothing.

This preserves the safety value of hooks exactly where they matter while eliminating overhead where they don't, which is the balance the team asked for. Risk-based control placement is the standard approach: apply the expensive/blocking control to the actions that justify it. ✅

Why the other options are incorrect

- B — "Disable all hooks during re-scoping": Opens a window with no enforcement at all — high-risk actions go unprotected during the work, trading safety for convenience in exactly the wrong direction.

- C — "Disable the agent during peak hours": Reduces availability rather than scoping hooks; it doesn't address the overhead source and takes the whole capability offline.

- D — "Replace hooks with system prompt instructions": Prompts are advisory, not deterministic — they can't guarantee enforcement of actions the way hooks can, so this swaps a reliable control for a probabilistic one.

The tested distinction: risk-based hook scoping (deterministic control on high-risk actions, none on low-risk) vs. disabling enforcement, restricting availability, or replacing deterministic controls with prompts.

References

- Anthropic Claude Code hooks documentation — hooks as deterministic controls triggered on tool/action events; scope them to relevant actions.
Question 18 Choose 1
You are designing an agent that handles a multi-step research task. You want the agent to break the task into smaller pieces, hand each piece to a focused subagent, and consolidate the results. The agent pattern you would apply is...
Show answerHide answer

Correct answer: A An orchestrator and subagent pattern with specialized subagents assigned to each subtask.

Explanation

Explanation

The scenario describes exactly the orchestrator/subagent pattern: break a complex task into smaller pieces, delegate each piece to a focused subagent, and consolidate the results. This is the documented multi-agent architecture for research-style work.

Anthropic's Claude Code documentation describes this directly: an orchestrator (main agent) coordinates subagents that run in isolated context windows — each subagent starts fresh with only the prompt passed to it, does its focused work, and returns a summary to the parent. Parallel execution is a first-class pattern: independent subtasks (e.g., different research angles) can run concurrently and the main agent synthesizes their reports. Community frameworks implement the same shape — a Research Coordinator dispatches specialized worker agents and a synthesizer consolidates the final output.

So the pattern name matches precisely: orchestrator + specialized subagents + result consolidation.

Why the other options are incorrect

- B — "Memory pattern storing entire research history before subtasks begin": There is no such pattern; subagents deliberately start with fresh, isolated context — the parent passes only the relevant prompt string, not the full history. Pre-storing all history contradicts the isolation that makes subagents useful.

- C — "Context-window pruning that drops each subtask's content": Pruning is a context-management technique, not an agent orchestration pattern. It doesn't describe breaking work into pieces, delegating, or consolidating — the defining features of the task.

- D — "Single tool-use loop with every tool": This is the opposite of the described design — one monolithic loop with all tools, rather than decomposition into focused subagents. It doesn't provide the isolation or specialization the scenario asks for.

The tested distinction: orchestrator/subagent decomposition vs. pre-stored memory, pruning, or a single all-tools loop.

References

- Anthropic, Subagents in the SDK — subagents run in fresh, isolated context; only the Agent tool prompt passes from parent; results return to parent.
Question 19 Choose 1
A team has deployed a multi-agent system in which a primary agent decomposes user requests and delegates subtasks to three specialized subagents: one for data retrieval, one for analysis, and one for report generation. In production, the team observes that subagents are making redundant tool calls, occasionally exceeding token budgets, and sometimes producing outputs that contradict each other — all of which the primary agent passes along without catching. What is the most appropriate way to address these failures?
Show answerHide answer

Correct answer: C Strengthen the primary agent's management layer to enforce per-subagent tool budgets, validate outputs against a defined schema before passing them forward, and establish explicit handoff contracts between stages.

Explanation

Explanation

The correct answer is C. Strengthen the primary agent's management layer to enforce per-subagent tool budgets, validate outputs against a defined schema before passing them forward, and establish explicit handoff contracts between stages.

The scenario describes a multi-agent orchestration problem. The subagents are operating without sufficient controls, leading to redundant tool calls, token-budget overruns, and contradictory outputs that the primary agent forwards without validation. The appropriate solution is to strengthen the orchestrator's oversight and define clear boundaries for each subagent.

Three controls address the failures directly:

1. Per-subagent tool and token budgets — establish resource limits for each subagent to prevent redundant tool use and excessive token consumption.

2. Output validation — require each subagent to return results in a defined schema and validate those results before the primary agent accepts or forwards them. This catches malformed or incomplete outputs and provides a consistent structure for downstream processing.

3. Explicit handoff contracts — define the expected inputs, outputs, responsibilities, and completion criteria for each stage. The primary agent can then coordinate dependencies and detect inconsistencies before producing the final response.

The primary agent should not simply relay subagent results. It must coordinate execution, enforce constraints, and validate outputs before consolidating them into a coherent response.

Why the other options are incorrect

- A — "Add retry logic and shared trace logging": Retries can help recover from transient tool failures, and tracing helps diagnose problems after they occur. However, neither establishes resource budgets nor prevents contradictory outputs from reaching the final response. This option emphasizes recovery and observability rather than orchestration controls.

- B — "Give each subagent read access to the other subagents' outputs": Shared access may help agents compare results, but it does not guarantee consistency or prevent excessive tool calls and token consumption. It can also increase context usage and introduce unnecessary dependencies between specialized agents.

- D — "Collapse the three subagents into a single large-context model call": Consolidation may reduce coordination overhead in some cases, but it removes the specialization and task separation of the existing architecture. It does not inherently guarantee budget enforcement, structured validation, or reliable output quality.

References

- Anthropic, Building effective agents — effective agent systems require clearly defined workflows and appropriate coordination between components.
- Anthropic, Subagents in the SDK — specialized subagents operate within an orchestration structure in which the parent agent delegates work and receives results.
Question 20 Choose 1
The product team has asked you to choose a Claude model for a new feature. The team has provided functional requirements but has not specified performance, cost, or quality targets. The team's product manager says, "Use whatever model gives us the best results." How would you respond?
Show answerHide answer

Correct answer: A Ask the product team to specify quality, latency, and cost targets, then select the model whose tradeoffs best fit those targets.

Explanation

Explanation

"Use whatever model gives us the best results" is not an actionable requirement — it collapses three competing dimensions (quality, latency, cost) into one vague goal, and "best results" could justify the largest, most expensive model even when the workload doesn't need it. Anthropic's model-selection guidance is explicit: choosing a model means balancing capabilities, speed, and cost, and you should first establish key criteria — what capabilities are needed, how fast the model must respond, and what the budget is for development and production.

Without those targets, any model choice is arbitrary. The right response is to push back for the missing criteria: ask the product team to define what "good enough" means for quality (e.g., accuracy threshold on an eval set), acceptable latency, and cost ceiling. Then select the model whose tradeoffs fit — using the documented efficiency-first or capability-first approaches and validating with evals. If the PM genuinely can't specify targets, you can propose defaults (e.g., start with a mid-tier or smaller model and measure), but the decision framework still requires those dimensions.

Why the other options are incorrect

- B — "Run every model on a generic benchmark and pick the best": Generic benchmarks don't reflect your workload's quality bar, and "scores best" ignores latency and cost entirely — a model that wins a benchmark may be overkill or too slow or expensive for the feature.

- C — "Pick a mid-tier model and ship": A default without evidence — it may be too weak for the feature's quality needs or unnecessarily expensive. "Mid-tier works for most use cases" is a heuristic, not a substitute for targets.

- D — "Pick the largest model because 'best results' means highest quality": The most expensive, highest-latency option selected on an unexamined assumption. Anthropic's guidance warns against defaulting to the largest model — start with the smallest model that meets the quality bar, and measure with evals rather than guessing.

The tested distinction: elicit the missing quality/latency/cost targets, then select on evidence vs. guessing from a generic benchmark, defaulting to mid-tier, or reflexively choosing the largest model.

References

- Anthropic, Choosing the right model — balance capabilities, speed, and cost; establish key criteria first.
Full mock exam

Sit the CCDV-F exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real CCDV-F exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full CCDV-F mock exam
  • 53questions per mock
  • 120 mintime limit
  • 95questions in the bank
  • Newmock on every attempt