You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. After integrating a local MCP server providing code analysis tools (‘analyze_dependencies’, ‘find_dead_code’, ‘calculate_complexity’), you verify the server is healthy and tools appear in the ‘tools/list’ response. However, you observe that the agent consistently uses Grep to search for import statements instead of calling ‘analyze_dependencies’ – even when users explicitly ask about “code dependencies”. Examining tool definitions reveals: - MCP: ‘analyze_dependencies’ – “Analyzes dependency graph” - Built-in: Grep – “Search file contents for a pattern using regular expressions. Returns matching lines with line numbers and surrounding context.” What’s the most effective approach to improve the agent’s selection of MCP tools?
Expand MCP tool descriptions to detail capabilities and outputs – e.g., “Builds dependency graph showing direct imports, transitive dependencies, and cycles.”
Split ‘analyze_dependencies’ into granular tools (‘list_imports’, ‘resolve_transitive_deps’, ‘detect_circular_deps’) so each has a focused purpose less likely to overlap with Grep.
Remove Grep from available tools when the MCP server is connected to eliminate functional overlap.
Add routing instructions to the system prompt specifying that dependency-related questions should use MCP tools rather than Grep.
Answer: A. Expand MCP tool descriptions to detail capabilities and outputs – e.g., “Builds dependency graph showing direct imports, transitive dependencies, and cycles.”
Explanation: Claude relies heavily on tool descriptions to understand when a specialized tool is preferable to a general-purpose one. A richer description that clearly states the dependency analysis capabilities and expected outputs makes the MCP tool’s advantage over simple text search explicit, improving tool selection without unnecessarily removing useful built-in tools.
Question 17
You are using Claude Code to accelerate software development. Your team uses it for code generation, refactoring, debugging, and documentation. You need to integrate it into your development workflow with custom slash commands, CLAUDE.md configurations, and understand when to use plan mode vs direct execution. Your team frequently migrates React components to Vue. You’ve written a step-by-step workflow for Claude Code to follow during each migration, and you want every developer on the team to invoke it by typing /migrate-component. The workflow should stay in sync as the team iterates on it. Where should you place the skill file?
In ~/.claude/skills/migrate-component/SKILL.md on each developer’s machine
As a detailed instruction block in the project’s root CLAUDE.md file
In .claude/skills/migrate-component/SKILL.md at the project root, committed to version control
In the project’s .claude/settings.json using a skillOverrides entry to register and define the workflow
Answer: C. In .claude/skills/migrate-component/SKILL.md at the project root, committed to version control
Explanation: Project-level skills belong under .claude/skills/ in the repository. Committing the skill to version control makes the /migrate-component workflow available consistently to the whole team and ensures everyone uses the same version as the workflow evolves.
Question 18
You are building a structured data extraction system using Claude. The system extracts information from unstructured documents, validates the output using JavaScript Object Notation (JSON) schemas, and maintains high accuracy. It must handle edge cases gracefully and integrate with downstream systems. The system routes documents with extraction confidence below 85% to human review. A quarterly audit reveals that 12% of high-confidence extractions (≥85%) also contain errors – cases where the model finds plausible-but-incorrect values. Error sources vary: comparison tables showing competitor specs, appendices referencing different product variants, and ambiguous phrasing the model misinterprets. You need a sustainable strategy to catch these high-confidence errors and measure whether improvements reduce the error rate over time. What approach is most effective?
Implement stratified random sampling reviewing a fixed percentage of high-confidence extractions weekly, enabling error rate measurement and novel pattern detection.
Lower the confidence threshold from 85% to 70%, routing a larger volume of extractions to human review.
Add a verification pass that re-extracts from each high-confidence document, flagging cases where the two extraction attempts produce different results.
Implement heuristic rules that flag documents containing comparison tables or appendices for review regardless of confidence score.
Answer: A. Implement stratified random sampling reviewing a fixed percentage of high-confidence extractions weekly, enabling error rate measurement and novel pattern detection.
Explanation: Stratified random sampling provides an ongoing, statistically meaningful way to estimate the true error rate among high-confidence outputs while also surfacing new failure modes that existing heuristics may miss. Repeating the sampling process over time creates a stable benchmark for determining whether prompt, model, or pipeline improvements actually reduce errors.
Question 19
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. Your agent has spent 25 minutes exploring a game engine’s rendering subsystem – reading shader code, buffer management, and frame synchronization logic. An engineer now asks it to understand how the physics engine integrates with rendering for collision debug overlays. You notice recent responses reference “typical rendering patterns” rather than the specific ‘VulkanPipeline’ and ‘FrameGraph’ classes it discovered earlier. What’s the most effective approach?
Summarize key rendering findings, then spawn a sub-agent for physics exploration with that summary in its initial context.
Spawn a sub-agent to explore physics independently, then manually synthesize its findings with the rendering knowledge accumulated in the main conversation.
Use ‘/clear’ to reset context completely, then start fresh with physics exploration using file paths from the project’s CLAUDE.md.
Continue in the current context with more targeted prompts referencing the specific classes by name.
Answer: A. Summarize key rendering findings, then spawn a sub-agent for physics exploration with that summary in its initial context.
Explanation: Summarizing the important rendering discoveries preserves the project-specific knowledge while reducing accumulated context. A sub-agent can then explore the physics subsystem with a fresh context window while using that concise rendering summary to focus specifically on integration points such as collision debug overlays.
Question 20
You are building developer productivity tools using the Claude Agent SDK. The agent helps engineers explore unfamiliar codebases, understand legacy systems, generate boilerplate code, and automate repetitive tasks. It uses the built-in tools (Read, Write, Bash, Grep, Glob) and integrates with Model Context Protocol (MCP) servers. An engineer used the agent yesterday to analyze a legacy authentication module, identifying two distinct refactoring approaches: extracting a microservice versus refactoring in-place. Today, they want to explore both approaches in depth – having the agent propose specific code changes for each – before deciding which to implement. What’s the most effective way to structure this exploration?
Use ‘fork_session’ to create two branches from yesterday’s analysis, exploring one approach in each fork.
Resume yesterday’s session and explore both approaches sequentially within the same conversation thread.
Resume yesterday’s session to explore the first approach, then start a new session for the second, manually recreating the original context.
Start two fresh sessions, manually providing a summary of yesterday’s analysis findings to establish context.
Answer: A. Use ‘fork_session’ to create two branches from yesterday’s analysis, exploring one approach in each fork.
Explanation: fork_session is designed for branching an existing session while preserving its accumulated context. Creating two forks from yesterday’s analysis lets the engineer explore the microservice and in-place refactoring approaches independently without losing the shared original findings or contaminating one exploration with decisions made in the other.