Fragmented tutorials for Claude Code are everywhere: some cover only npm install, some show a single diff screenshot, some mash MCP and permissions into one post. When you actually need to ship, you are not missing "another keyboard shortcut" — you are missing a complete path from CLI install to green CI.
This is the Cloud Mac AI Stack · L6 pillar handbook (L6-Q01): treating Claude Code as an end-to-end coding Agent from install, first-day trial, daily delegation, and MCP wiring through a production workflow tied to GitHub Runner. Decision and permission gates live in the L3 decision opener; step-by-step MCP install is in the MCP guide — this article threads the main spine only.
In one sentence
Production-grade Claude Code = CLAUDE.md boundaries + MCP least privilege + human review + Runner running CI independently. The Agent produces Diff; the Runner produces Fact.
How this guide is organized
This is not the full official Claude Code capability map — it is the L6-Q01 handbook spine. Each branch maps to a section below; anchor ids are in parentheses. Section headings carry skeleton refs that match this tree. Capabilities not drawn here (Hooks, sub-agents, enterprise hosting, etc.) belong in follow-on articles or official docs.
Install to production workflow · June 2026 Edition
Article spine (Claude Code complete handbook)
├── Environment (#prereq)
│ ├── macOS / Linux official support boundaries
│ ├── Local Mac mini / MacBook vs Cloud Mac
│ └── Node 18+ · network · Anthropic account / API Key
├── Install verification (#install)
│ ├── npm install -g @anthropic-ai/claude-code
│ ├── claude doctor · claude login
│ └── 5-step acceptance (repo root · /help · no 401)
├── First-day trial (#first-day)
│ ├── Small-scope delegation + all-green tests
│ ├── git diff to audit change scope
│ └── Build review habits (out of bounds → back to L3 decision)
├── Project boundaries (#claude-md)
│ ├── CLAUDE.md minimal template (install / test / do-not-touch)
│ └── Executable commands over prose
├── Daily rhythm (#daily)
│ ├── Three delegation tiers (high / collaborative / low)
│ └── Four-step loop (delegate → observe → review → merge)
├── Connection layer (#mcp)
│ ├── ~/.claude.json · mcpServers
│ ├── GitHub / CodeGraph / Fetch common combos
│ └── /mcp acceptance (details → MCP install guide)
├── CI Fact chain (#ci)
│ ├── Diff (Claude Code) vs Fact (Runner)
│ ├── feature branch → self-hosted Runner → green PR
│ └── secrets isolated from Agent environment
├── Production checklist (#production)
│ ├── CLAUDE.md / permissions / MCP / secrets / CI / review / cost
│ └── Trial vs production comparison table
└── Stack placement (#stack-map)
├── L0–L5 position in Cloud Mac AI Stack
└── Links: L3 decision · MCP guide · Runner execution engine
| Section | What you take away | Not covered here — go to |
|---|---|---|
| #prereq | When Mac is mandatory; Cloud Mac use cases | Buy vs rent |
| #install · #first-day | Copy-paste commands + first-day acceptance criteria | Windows / WSL · Homebrew → official docs |
| #claude-md | Project-level boundary template | .claude/rules/ · /compact → advanced topics |
| #daily | What to delegate vs what stays human | vs Cursor |
| #mcp | When to wire MCP and how to verify | MCP install guide · triple-connect |
| #ci | Diff→Fact split; feature branch → Runner → green PR | Runner execution engine · one job one workspace |
| #production | Trial vs production 7-item comparison | L3 permission decision |
| #stack-map | Where this article sits in L0–L5 Stack | L6-Q02 full architecture |
| #faq | Subscription vs API Key; is MCP required for production? | model pricing |
Environment: Mac or Cloud Mac?
Skeleton · #prereq · Environment
Claude Code officially supports macOS and Linux. Pure Web/backend work can run on a Linux VPS; anything involving xcodebuild, the iOS Simulator, or macOS-only toolchains needs a macOS environment.
- Local Mac mini / MacBook — 24GB RAM is steadier (16GB often swaps under Chrome + Docker + Claude Code); see M4/M5 sizing
- Cloud Mac — when you do not want to buy hardware first, or need dev/CI isolated from your daily machine; see buy vs rent
- Not recommended — running production secrets, an unisolated Agent, and CI Runner on the same daily laptop (see Runner isolation)
Software prerequisites: Node.js 18+, network access to Anthropic, and an Anthropic account (Claude Pro/Max/Team) or API Key.
Install and login (5-step acceptance)
Skeleton · #install · Install verification
Run these commands in the macOS Terminal (same on Cloud Mac):
# 1. Global CLI install npm install -g @anthropic-ai/claude-code # 2. Environment self-check (Node version, PATH, etc.) claude doctor # 3. Login (browser OAuth or API Key) claude login
| Step | Command / action | Success signal |
|---|---|---|
| 4 | cd to target repo root, run claude |
Interactive prompt appears; you can type natural-language delegations |
| 5 | Type /help or ask a simple question |
Normal reply, no 401 auth error |
Common install pitfalls
Do not start from a random subdirectory — MCP and CodeGraph indexing depend on working directory; run from the git repo root. Do not use sudo npm install — it causes permission chaos. Upgrade with npm update -g @anthropic-ai/claude-code.
First day: run your first delegation
Skeleton · #first-day · First-day trial
Install success is not "knowing how to use it." On day one, do one thing: small-scope change + all-green tests — build intuition for Agent behavior.
- Create or refine
CLAUDE.mdat the repo root (next section) - Start
claude; sample delegation: "Add a 'Local development' section to README — only touch README, no other files" - Watch whether the Agent reads files first, edits, then runs your verification commands
- Review scope with
git diff— confirm nothing out of bounds - Before merge, run test commands yourself (do not trust "Agent said tests passed")
Day-one goal is not speed — it is building review habits. If the Agent keeps editing wrong directories or running risky commands, go back to permission decision before touching production repos.
CLAUDE.md: project boundary spec
Skeleton · #claude-md · Project boundaries
CLAUDE.md is Claude Code's "project README for the Agent" — more about executable commands and forbidden actions than a human-facing README. Production repos almost always need one.
# Project: my-saas ## Setup pnpm install ## Tests (run all after code changes) pnpm test pnpm lint ## Do not modify - Do not edit .env or secrets/ - Do not upgrade major dependencies unless explicitly requested - Billing-related changes must include corresponding test updates ## Directory conventions - src/app — Next.js pages - packages/api — backend logic
After a solid CLAUDE.md, wrong-file edits and test-loop rounds usually drop noticeably — in our workstation benchmark, a complete CLAUDE.md vs a blank template differed by roughly 20% elapsed time.
Daily development workflow
Skeleton · #daily · Daily rhythm
Once trial passes, settle into a daily rhythm. Split work into three tiers instead of "throw everything at the Agent":
| Tier | Good for Claude Code | Keep human-led |
|---|---|---|
| High delegation | Cross-directory refactors, test backfill, migration scripts, repetitive fixes | — |
| Collaborative | Agent drafts PR descriptions, first-pass implementations | Architecture decisions, security-sensitive logic |
| Low delegation | — | Permission model design, production config, secret rotation |
Fix the daily loop to four steps:
- Delegate — state scope, acceptance criteria, and directories off limits
- Observe — which files the Agent read, which shell commands it ran
- Review —
git diff+ run tests yourself (match CLAUDE.md) - Merge — PR + code review; do not let the Agent commit straight to main
Split with Cursor: Cursor fits in-editor completion and small edits; Claude Code fits multi-file + shell + test-loop Agent work. Both can coexist — neither covers every scenario.
Wire MCP (connection layer)
Skeleton · #mcp · Connection layer
When the Agent must read GitHub Issues, query a code graph, or pull API docs, repo grep alone is not enough — wire MCP (Model Context Protocol), effectively a standard plug-in bus for Claude Code.
- Config entry —
mcpServersblock in~/.claude.json - Common combos — GitHub MCP (Issues/PRs), CodeGraph MCP (impact analysis), Fetch MCP (documentation)
- Acceptance — in Claude Code, type
/mcp; you should seemcp__github__*and similar tools
Step-by-step install and troubleshooting: MCP install guide (15 min); permission model: MCP least privilege. MCP is a necessary piece of production workflow, but not day-one mandatory — run the base flow without MCP first, then add GitHub MCP.
Hook up CI: Claude Code + Runner
Skeleton · #ci · CI Fact chain
Local Agent edits and green tests are not "production-grade" until you have a CI Fact chain isolated from the dev machine. Stack shorthand:
Claude Code produces Diff; GitHub Runner produces Fact.
Recommended workflow:
- Developer finishes changes with Claude Code on Cloud Mac / local Mac, pushes to a feature branch
- Self-hosted Runner (isolated from Agent environment) runs
xcodebuild test/pnpm test, etc. - PR requires green CI + human review before merge
- Production secrets live only on Runner or in a secrets manager — not in the Agent's daily shell
Runner registration and isolation: execution engine · queue and TCO · one job one workspace.
If Ollama + Claude Code + Runner share one machine, schedule memory so CI does not swap — see parallel scheduling.
Production checklist (pre-go-live)
Skeleton · #production · Production checklist
From "it runs" to "it ships" — walk this table:
| Check | Trial phase | Production-grade |
|---|---|---|
CLAUDE.md |
Basic install/test commands | Forbidden dirs, secrets notes, PR conventions |
| Agent permissions | Read-only sandbox or supervised write | Minimal shell; dangerous commands need confirmation |
| MCP | Optional | Read-only PAT; repo scope minimized |
| Secrets | Test .env.local |
Agent environment isolated from production secrets |
| CI | Local tests only | Runner isolated workspace; PR must pass CI |
| Review | You review diff yourself | Mandatory code review; no direct push to main |
| Cost | Not tracked | Watch token/subscription usage; split large delegations |
Full Stack map
Skeleton · #stack-map · Stack placement
Placing this article in the Cloud Mac AI Stack:
- L0 Foundation — why Cloud Mac
- L1 Execution — GitHub Runner (Fact layer)
- L2 Inference — Ollama private inference (optional — local embedding/small models)
- L3 Coding — this article · Claude Code complete handbook (Diff layer spine)
- L4 Connection — MCP triple-connect
- L5 Automation — OpenHands Agent platform
Stack full architecture diagram + five-module onboarding order lives in the pillar map L6-Q02 · Claude Code core architecture & Stack map — this handbook is the "coding Agent" segment.
FAQ
Skeleton · #faq · Supplemental Q&A
Do I need to buy a Mac to use Claude Code? Official support covers macOS and Linux. iOS/macOS builds require Mac — local or Cloud Mac.
Subscription vs API Key? Pro/Max subscription is easiest for personal trial; teams and CI integration often use API Key + usage controls. Cost comparison: model pricing.
Is MCP mandatory for production? Small repos can skip it; once you need GitHub Issues or cross-service docs, MCP is nearly standard.
Agent broke something? git checkout -- . or git stash; commit in small steps on branches — do not stack delegations on a dirty working tree.
Appendix · Further reading: post-WWDC 2026
Outside this article's spine. Apple baked AI assistants into Xcode 27 at WWDC 2026 — another option for pure Swift/iOS teams. Claude Code still wins on cross-stack terminal Agent + MCP + Runner integration — complementary roles, not replaced by Xcode. See WWDC26 AI breakdown.
- L3 decision: when to formally onboard the Agent
- Claude Code MCP install guide
- Mac mini workstation benchmark
- GitHub Runner execution engine
ZavCloud
No Mac yet? Rent one and run through this handbook
Cloud Mac mini, native macOS. Install the CLI, write CLAUDE.md, wire Runner — no hardware purchase first.
View Cloud Mac plans