Claude CLI: The Architect’s Assistant
Course Overview
Claude Code is the cutting-edge agentic CLI from Anthropic. In this course, you will learn to integrate Claude into your terminal workflow, build Agentic SOPs (Directives), and master the art of Tool-Augmented Reasoning for professional software engineering.
⚡ Instant QuickStart: The First Summon
Initialize Claude in your project in 30 seconds.
# 1. Install & Login
npm install -g @anthropic-ai/claude-code
claude login
# 2. The First Action
claude "Initialize a TODO.md in this project and audit my package.json for outdated deps."
Learning Objectives
- Master SOP-Driven Engineering using
directives/andPROMPT.md. - Leverage Claude’s ability to Self-Anneal Arcane Glossary The ability of an AI agent to detect its own errors (e.g., build failures) and automatically fix them without human intervention. (fix its own errors).
- Implement the 3-Layer Architecture (Directive, Orchestration, Execution).
- Use MCP (Model Context Protocol) Arcane Glossary Model Context Protocol. An open standard that allows AI models to connect with local tools, data, and APIs securely. to extend Claude’s reach into local databases.
Prerequisite Rituals
Verify your circle before starting
Technical Deep Dive: The 3-Layer Architecture
For maximum reliability, we structure agentic work in three layers:
- Layer 1: Directive (SOP): A markdown file in
directives/that defines what to do. - Layer 2: Orchestration (Agent): Claude reads the directive and decides which tools to call.
- Layer 3: Execution (Scripts): Deterministic Python/Node scripts that handle the “heavy lifting” (API calls, DB migrations).
Walkthrough: Building the “Self-Healing” Tool
Step 1: The Directive
Create directives/audit_site.md.
# Site Audit SOP
1. Check if the site is reachable via `curl`.
2. If down, check logs in `/var/logs/app.log`.
3. Propose a fix and execute if approved.
Step 2: The Orchestration
Invoke Claude with the directive.
claude "Follow the SOP in directives/audit_site.md for the local dev server."
Step 3: Self-Annealing Loop
If a tool fails, Claude is trained to read the error message, fix its own script, and try again. This is called Self-Annealing.
Pro Patterns: Directives vs. Prompts
- Prompts are for one-off questions.
- Directives are for repeatable, business-critical workflows.
- Rule of Thumb: If you’ll do it more than twice, write a directive.
Capstone Project: The Automated DevOps Agent
Build a system where Claude monitors a deployment.
- Write a Directive for checking build health.
- Link Claude to your Cloudflare Pages status through an MCP server.
- Implementation: Claude identifies a build failure, reads the log, and fixes the offending code automatically.
You are no longer coding alone. You have an architect by your side.