Claude Architect lessons
41 free animated lessons for Claude Certified Architect – Foundations (CCAR-F), each with key ideas, a worked example, exam traps and practice questions.
Claude Code fundamentals
- The agentic loop: Gather, act, observe, repeat: the loop behind every Claude Code session, and why you branch on stop_reason.
- Built-in tools: Glob finds files, Grep finds usages, Read reads them, Edit changes them: pick the dedicated tool, and keep Bash for what has none.
- Commands and checkpoints: /init, /context, /compact, /clear and /rewind: the commands that manage a session, and what checkpoints can and can't undo.
Configuration & workflows
- The CLAUDE.md hierarchy: Managed, user, project, local and subdirectory CLAUDE.md files: who shares each, when it loads, and why a teammate misses your rule.
- Path-specific rules: One .claude/rules file with a paths glob covers a file type across every folder, and loads only when Claude touches a matching file.
- Custom commands and skills: Turn a repeated prompt into /review for the whole team, and package occasional procedures as skills that load only when used.
- Plan mode vs direct execution: Plan mode lets Claude research but blocks edits until you approve. Use it for big or ambiguous changes; execute small, clear fixes directly.
- Iterative refinement: Concrete examples, failing tests, an interview first, sensible batching and early course-correction: how to steer Claude to the right result.
- Claude Code in CI/CD: claude -p with pre-approved tools, JSON output and hard limits; an independent reviewer; and the GitHub Action that answers @claude.
Agentic architecture & orchestration
- Workflows vs agents: Six patterns from one call to a free agent, and the rule for picking: if the steps are known, let code control the path.
- Coordinators and subagents: A coordinator splits the work, subagents dig in their own context windows, and only summaries come back. Hub-and-spoke, by design.
- Configuring subagents: Define a subagent, restrict its tools, and brief it fully: it starts with a fresh context and sees nothing you didn't pass.
- Enforcement and handoff: Prompts are probabilistic, code is deterministic. Put must-never-break rules in code, and hand off with a summary that stands alone.
- Hooks for tool calls: Hooks run your code before and after every tool call: block what's forbidden, normalise what comes back, before Claude reasons.
- Task decomposition: Perfect subagents can't save a narrow plan. Cover the whole question, size the pieces, fix the output format, and choose fixed vs dynamic.
- Sessions: resume and fork: Resume when history is valuable, fork to try another approach, start fresh with a summary when the context is stale.
Tool design & MCP
- Designing tool interfaces: Claude picks tools by reading their descriptions. Write them like docs: what, when, when not, input formats and boundaries.
- Structured error responses: When a tool fails, say so in a way Claude can act on: isError, a category, isRetryable and a useful message. Never an empty result.
- Distributing tools and tool_choice: Give each agent only the tools its role needs, constrain generic tools, and use tool_choice when a step must happen.
- MCP servers in Claude Code and agents: Connect tools and data once with MCP: transports, scopes, .mcp.json with env vars, tool names and where MCP fits in the SDK and API.
Prompt engineering & structured output
- Explicit criteria beat vague instructions: Too many false positives? Say exactly what counts, what doesn't, and what to do when unsure. "Be careful" is not a criterion.
- Few-shot prompting for consistency: A few well-chosen examples fix format and judgement better than more instructions. Always include the hard, ambiguous case.
- Structured output with schemas and tools: Get guaranteed JSON with structured outputs or a tool schema, design it with nullable fields and 'other' enums, and remember: shape is not truth.
- Validation, retry and feedback loops: Extract, validate in code, send back the specific errors, retry a bounded number of times, then route to a human.
- Batch processing, and when not to: The Message Batches API halves the cost of work nobody waits for. Match results by custom_id, plan for 24 hours, and keep blocking checks real-time.
- Independent and multi-pass review: A model checking its own work tends to agree with itself. Use a fresh reviewer, per-file passes plus an integration pass, and narrow checklists.
Context management & reliability
- Context is a budget, not a bucket: Long sessions lose facts in the middle. Keep a sourced case-facts block outside the history, trim tool output, and load the rest just in time.
- Escalation and ambiguity: Good agents know when not to act alone. Write escalation triggers as rules, gate high-stakes actions in code, and hand off with context.
- Error propagation across agents: When a subagent fails, the coordinator must know what failed, why, and whether to retry. Never let "failed" look like "empty".
- Context in large codebases: Exploring a big repository can flood the main context. Scope the task, search before reading, delegate exploration and keep a map.
- Human review and calibration: Route outputs to people by confidence and risk, then check that stated confidence matches real accuracy with stratified samples.
- Provenance and uncertainty: In multi-source synthesis, keep every claim tied to its source, surface conflicts, and let the model say "I don't know".
Permissions, hooks & security
- Permission rules and modes: Deny, then ask, then allow: how Claude Code decides whether a tool call runs, the rule syntax, and which permission mode fits which job.
- Hooks: events, matchers and exit codes: Hooks are handlers Claude Code runs at lifecycle events. Learn the events, matcher syntax, the stdin JSON and what exit code 2 does.
- Prompt injection and sandboxing: Text in files, pages and tool results can try to instruct Claude. Treat it as data, grant least privilege, gate risky actions and sandbox Bash.
- Plugins and enterprise governance: Package a team setup as a plugin, share it through a marketplace, and lock company policy in with managed settings users can't override.
RAG: chunking, embeddings & vector search
- The RAG pipeline: Do you even need RAG? If you do: ingest, chunk, contextualise, embed, index, then retrieve, rerank, generate and evaluate.
- Chunking strategies: Chunking decides what a passage is. Split by structure, keep tables whole, carry the heading path and store metadata.
- Embeddings and vector search: Embeddings put similar meanings close together; vector databases find neighbours fast. Add keyword search for exact identifiers.
- Contextual retrieval and reranking: Prepend a short Claude-written context to every chunk, index it twice, then rerank 150 to 20. Anthropic measured 67% fewer failures.
- RAG citations and evaluation: A finance policy assistant end to end: cited answers, permission to say "not found", and a test set that measures retrieval and answers.