Code Labs
✓0/13 completeHands-on coding exercises that test your understanding of Claude API patterns, tool design, prompt engineering, and more. Fill in the blanks or fix the bugs.
Agentic Architecture & Orchestration
27%Complete the Agentic Loop
Complete the agentic loop that calls Claude, executes tools when requested, and terminates when done. Fill in the three key values that control the loop lifecycle.
Fix the Subagent Context
This coordinator spawns a subagent but passes the full parent conversation history, which subagents do not inherit. Fix the context passing and ensure the coordinator can spawn subagents.
Complete the PostToolUse Hook
Complete a PostToolUse hook that normalizes heterogeneous data formats from MCP tools before the agent processes them. This is the recommended approach when tools return Unix timestamps, ISO dates, and numeric status codes.
Tool Design & MCP Integration
18%Write the Tool Description
Complete this tool definition for lookup_order. The description must clearly differentiate it from the get_customer tool, and the input schema must use an appropriate parameter name.
Structured Error Response
Complete this MCP tool error response for a timeout when calling an external order tracking API. The response must communicate the failure type, whether it can be retried, and set the correct error flag.
Claude Code Configuration & Workflows
20%SKILL.md Frontmatter
Complete the SKILL.md frontmatter for a /migration skill that generates database migration files. It should run in isolation, restrict tool access, and prompt for required arguments.
Path-Specific Rules
Complete the YAML frontmatter for a testing rule file that should automatically apply whenever Claude edits any test file, regardless of directory location.
CI/CD Command
Complete this CI pipeline command that runs Claude Code in non-interactive mode with structured JSON output for automated processing.
Prompt Engineering & Structured Output
20%Add Few-Shot Examples
Complete these few-shot examples that teach Claude to select the correct tool for ambiguous customer requests. The examples should show reasoning for why one tool is chosen over another.
JSON Schema with tool_use
Complete this API call that uses tool_use to extract structured invoice data. Configure tool_choice to guarantee a tool call, and handle optional fields that may be missing from the source document.
Fix the Retry Loop
This retry loop retries a failed extraction without any feedback about what went wrong. Fix it to include the failed extraction and specific validation errors in the retry prompt.
Context Management & Reliability
15%Case Facts Extraction
Complete this system prompt that uses a persistent 'case facts' block to preserve critical transactional details that would otherwise be lost during progressive summarization.
Error Propagation Context
Complete this structured error context object returned from a failed web search subagent. The coordinator needs enough information to make intelligent recovery decisions.