Claude Certified Developer · आधारभूत

Course cheat sheet

Created with Claude Opus 5.5 and Fable 5.2 (Anthropic's AI models). Independent notes, not official Anthropic material. Check facts against the official Claude docs (opens in a new tab) and your exam's official guide (opens in a new tab) before relying on them.

Module 1: What the words mean

Memory hooks

  • Some Cats Read Ten Rare English Words: SDK, Credentials, Retries, Timeouts, Rate limits, Errors, Where it runs.

Remember

  1. Everything goes through POST /v1/messages; content is a list of typed blocks, so loop and narrow on type.

  2. Check stop_reason before you trust the output; a refusal is a 200, not an error.

  3. The API is stateless: you store and resend the conversation, and every turn costs more.

  4. Count with countTokens and the real model ID; max_tokens caps output (thinking included), the context window caps input plus output.

  5. Steer thinking with output_config.effort; start on Opus 5.5, move a route to a cheaper model only when evals hold.

  6. Rules in system, data in user, untrusted data wrapped in clear tags; no prefill.

  7. The SDK retries 429/5xx twice by default; fix 4xx errors, don't retry them.


Exam traps

  • Trap: "At low effort, the model doesn't think." Truth: It is a behavioural signal, not a strict budget. At low the model still thinks on hard problems, just less.
  • Trap: "The thinking text is hidden, so I don't pay for it." Truth: Thinking tokens are billed as output tokens, even when the text isn't shown.
  • Trap: "A dateless ID like claude-opus-5-5 may move to a newer model one day." Truth: On the Claude API every model ID is a pinned snapshot, dateless ones included.

Module 2: Prompts, tools and agents that hold up

Memory hooks

  • In Trouble, Check Every Sign: Information, Tools, Choice, Errors, Stop.

Remember

  1. Four-part system prompt: role, goal, testable rules, output format; untrusted data in tags.

  2. The model chooses everything in a tool schema, so the tenant never goes there; write detailed descriptions and use strict: true.

  3. JSON comes from structured outputs (output_config.format); prefill and forced tool_choice return a 400 on current models.

  4. Agent loop: step limit, full assistant content back, is_error results, all parallel results in one message.

  5. Prefer a workflow when the steps are known; use an agent only when they aren't.

  6. Stream long replies; use finalMessage(); stop_reason arrives in message_delta.

  7. Memory is client-side, so your code checks every path; batches are 50% off, matched by custom_id.


Exam traps

  • Trap: "strict: true on my tool means the final reply is valid JSON." Truth: Strict tool use shapes tool inputs. JSON outputs (output_config.format) shape the response. You can use both.
  • Trap: "With structured outputs, I can skip the stop_reason check." Truth: A refusal or a max_tokens stop can leave output that doesn't match the schema. Check both stop_reason and parsed_output.
  • Trap: "Writing a rule in CAPITALS makes the model follow it better." Truth: Capitals tend to make current models over-apply the rule. Write plain, direct statements.

Module 3: Claude Code and MCP, safely

Memory hooks

  • My Code Looks So Ugly: Managed, Command line, Local, Shared, User, from highest to lowest.

Remember

  1. Pick the permission mode on purpose; bypassPermissions only in a throwaway sandbox.

  2. Deny rules are checked first; team gates go in .claude/settings.json, personal ones in settings.local.json.

  3. Keep CLAUDE.md short: commands, map, hard rules; it guides but doesn't enforce.

  4. Hooks read JSON on stdin; exit 2 blocks a PreToolUse call; PostToolUse can't undo, so use it to run tests.

  5. Package repeat work as skills; give subagents only the tools they need.

  6. MCP servers offer tools, resources and prompts over stdio or Streamable HTTP; stdio keeps stdout for protocol only.

  7. Never put the tenant in an MCP tool argument; fix it in the server's config.


Exam traps

  • Trap: "A deny rule on Read(./.env) means Claude can't reach .env." Truth: Rules are not a sandbox. cat .env in Bash, or a script, can still read it. Add hooks and OS-level isolation.
  • Trap: "Hooks are safe because Claude Code runs them, not the model." Truth: Hooks run with your user's permissions. Review them like any code; a hook in a cloned repo can be malicious.
  • Trap: "For a new remote MCP server, use the HTTP+SSE transport." Truth: HTTP+SSE is no longer a standard transport, and Claude Code marks SSE deprecated. Use Streamable HTTP.

Module 4: Prove it works in production

Memory hooks

  • Can Tom Buy Lunch, Cheese, Coffee? Cache, Trim, Batch, Lower effort, Cheaper model, Concurrency limits.

Remember

  1. Evals measure model-powered quality; unit tests (with a stubbed client) check your code.

  2. Grade with code first; use an LLM judge with a pass/fail rubric, calibrated against human grades.

  3. Re-run the whole eval set on every prompt or model change.

  4. Trace every call: tenant, model, effort, tokens, cache, latency, stop reason, cost.

  5. Retry 429/5xx/529; fix 400s; refusals are 200s that need their own path.

  6. Caching is a prefix match, stable content first; cache reads are cheap and don't count toward input-token rate limits.

  7. Injection defence is layers (server-set context, least-privilege tools, human approval, output checks); ship only with zero Stop items.


Exam traps

  • Trap: "Caching can only save money." Truth: Cache writes cost more than base input, and the 1-hour TTL costs more than the 5-minute one. The saving comes from the reads.
  • Trap: "Any prefix with cache_control gets cached." Truth: Prefixes shorter than the model's minimum length are silently not cached.
  • Trap: "Injection only matters for what the model does with tools." Truth: A draft that echoes an attacker's link or script is injection delivered to your users. Escape output before rendering it in HTML.

Module 5: Make it reusable

Memory hooks

  • Every Five Funny Cats Play: Eval case, Fix, Full eval run, Changelog entry, Pull request.

Remember

  1. Copy-paste is not reuse: one package, typed input and output, client passed in.

  2. Prompts are versioned files, model IDs are config; semver by behaviour (eval-moving prompt change = minor, schema change = major).

  3. The eval runs in CI on prompt, schema and model changes, with its own low-limit key.

  4. Requirements say what the feature never does; re-run evals on a new model ID before switching.

  5. Containers take all config from the environment and the key from a secret store.

  6. Bedrock uses its own SDK client, IAM auth and anthropic. IDs; batches and server-side fallback aren't on Bedrock or Google Cloud (Google managed).

  7. Draw trust boundaries; every crossing gets a check, and model output is untrusted.


Exam traps

  • Trap: "We use structured outputs, so the package can skip validating the result." Truth: Validate again in the package. The package boundary is a trust boundary too.
  • Trap: "Bedrock and Google Cloud follow Anthropic's retirement dates." Truth: Partner platforms set their own deprecation and retirement dates.
  • Trap: "A regional endpoint costs the same as global." Truth: On Bedrock, regional endpoints cost more than global. On Google Cloud, multi-region and regional both cost more.

↑ ↓ सार्नुहोस् · ↵ छान्नुहोस् · esc बन्द