Ops Command Center v3.2.1
AIA-CC-2024 Ready
Created Dec 23, 2024

Claude Code: The Complete Guide (From Install to AI-Powered Workflows)

Everything you need to master Claude Code — install, architecture, agents, hooks, and the spec-driven workflow that changes how you build software.

Tools
General
Joshua Schultz
-
Claude
Tags:
#claude code #ai tools #automation #productivity #agentic ai #prompt engineering #agents #skills
Article Content

Most people see “Code” in the name and assume Claude Code is for developers. It isn’t — or at least, it isn’t only for developers. I use it for marketing campaigns, financial analysis, content strategy, business operations, and yes, software development. It’s a cognitive amplifier for any complex, multi-step task.

But here’s the thing: most people use it at maybe 20% of its capability. They type a prompt, get a response, and move on. That’s like buying a CNC machine and using it as a drill press. The architecture underneath Claude Code — agents, skills, hooks, commands — is what turns it from a nice chatbot into a genuine productivity system.

This guide walks you through that architecture from scratch.

The Mindset Shift: It’s Not a Coding Tool

Claude Code excels at any complex work that benefits from:

  • Persistent memory — it remembers your project context across interactions
  • File access — it reads, writes, and organizes documents
  • Tool integration — it connects to external services
  • Specialized expertise — domain-specific agents bring focused knowledge
  • Quality gates — automated verification catches mistakes

I’ve used it for P&L analysis, SEO audits, sales proposals, documentation overhauls, and content creation. The “Code” in the name is misleading — think of it as a command center for getting complex work done.

The key insight: push as much work as possible to deterministic, non-token-consuming parts of the system. Scripts, templates, and YAML files cost zero tokens and execute with 100% reliability. Reserve the AI for what actually requires judgment.

Claude Code six-layer architecture from thin orchestration to thick deterministic layers

The Architecture: Six Layers That Work Together

Understanding these six layers is the difference between 2x results and 10x results.

Layer 1: CLAUDE.md — The Foundation

A markdown file that loads into every session. Think of it as the company handbook — universal context that applies to everything.

Keep it under 300 lines (60 is ideal). Include your tech stack, project structure, build commands, workflow expectations, and critical rules. Point to detailed docs for specifics — don’t paste them inline.

Where it lives:

~/.claude/CLAUDE.md           # Global (all projects)
./CLAUDE.md                   # Project root (team shared)
./CLAUDE.local.md            # Personal overrides (gitignored)

Research shows LLMs reliably follow 150-200 instructions. Claude Code’s system prompt uses ~50. Your CLAUDE.md gets the rest. Make every line count.

Layer 2: Commands — Workflow Triggers

User-triggered prompt templates that standardize complex workflows. Think of them as department procedures — you invoke them when you need a specific workflow.

# .claude/commands/analyze-pl.md

Analyze the provided P&L statement with focus on:
1. Revenue trends and growth patterns
2. Cost structure and margin analysis
3. Seasonality detection
4. Cash flow estimation
5. Profit lever identification

Use the financial-analyst agent and financial-statement-analysis skill.
Output a comprehensive report with visualizations.

Invoke with /project:analyze-pl. Commands are thin — orchestration only, no procedures. The procedures live in skills.

Layer 3: Agents — Specialized Experts

Domain-specific AI personas with focused capabilities, tools, and permissions. These are your expert consultants.

# .claude/agents/legendary-copywriter.md
---
name: legendary-copywriter
description: Master copywriter channeling Kennedy, Halbert, Hormozi techniques
tools: Read, Write, Edit, Bash, WebSearch, WebFetch
model: sonnet
skills: hormozi-offer-analysis, sugarman-copywriting-framework
---

You are a master copywriter trained in direct response techniques...

Agents define what and why, not how. The how lives in skills.

Layer 4: Skills — Expert Knowledge

Self-contained knowledge packages that agents load on-demand. These are your training manuals — detailed procedures, decision trees, and domain expertise.

Skills use progressive disclosure: the agent sees the description (~100 tokens), decides if it’s relevant, loads the full skill (~1,000 tokens), and references supporting files only if needed. Maximum expertise, minimum context consumption.

Layer 5: Hooks — Automated Guarantees

Shell commands that execute automatically at specific lifecycle points. This is where determinism lives.

ApproachReliabilitySpeedContext Cost
”Please format your code”~70%SlowUses tokens
Hook: prettier —write100%FastZero tokens

Hooks turn suggestions into guarantees. Configure them for formatting, linting, type checking, security scanning — anything with a binary right/wrong answer.

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Edit|Write",
      "hooks": [{"type": "command", "command": "prettier --write $CLAUDE_FILE_PATHS"}]
    }],
    "Stop": [{
      "matcher": "*",
      "hooks": [{"type": "command", "command": "npm run typecheck && npm run lint"}]
    }]
  }
}

Layer 6: Plugins and MCP — External Connections

Connect Claude to external tools via MCP (Model Context Protocol):

claude mcp add github --scope user
claude mcp add obsidian --scope project

This gives Claude access to GitHub PRs, knowledge bases, web research, browser automation, and anything else with an MCP server.

👉 Tip: Start with just CLAUDE.md and one command. Add agents when you find yourself repeating the same expertise setup. Add skills when agents need detailed procedures. Add hooks when you catch yourself wishing Claude would “just always do X.” Build the layers as you need them, not all at once.

Spec-Driven Development: The Most Important Workflow

Here’s the workflow pattern that changed everything for me.

One fix in a spec saves you 100,000 bad lines of code.

Review PointLeverageWhy
Research review10x+Prevents architectural misunderstandings
Plan review5-10xCatches strategy errors before building
Build review1xVerifies correctness (too late to pivot)

The three phases:

Phase 1: Planning. Create requirements, design, and task breakdown. Human approves at each stage. This is where you catch the mistakes that would cost 100x to fix later.

Phase 2: Implementation. Execute tasks one at a time with approval gates. Delegate to specialized agents for domain expertise.

Phase 3: Quality. Automated quality gates — coverage thresholds, security scans, complexity checks — produce structured reports. Not “it works” but “it’s verified against specific criteria.”

Benefits of spec-driven development:

  • 1-2 iterations typical instead of 5-10
  • Features aligned to requirements, not interpreted loosely
  • Technical debt prevented instead of accumulated
  • Auditable trail from requirement to implementation
  • Quality verified against specific, measurable criteria

YAML, Templates, and Checklists

These three tools keep Claude targeted and fed the exact data it needs:

YAML as mini databases — quality gates, configuration values, decision criteria. Version controlled, human readable, zero interpretation errors.

Markdown templates — exact output format every time. Claude fills in blanks instead of inventing structure. Consistent across runs.

Checklists — binary pass/fail verification. Executable by scripts or Claude. Progressive (stop at first failure). Auditable.

Together, they ensure Claude doesn’t guess, hallucinate, or vary. It orchestrates deterministic operations and fills structured outputs.

Getting Started: Day 1 to Month 1

Day 1: Basic Setup

Create your CLAUDE.md with project overview, tech stack, key commands, and workflow rules. Create one command for your most common workflow. Test it.

Week 1: Expand

Add specialized agents for common tasks. Configure hooks for automatic formatting and quality checks. Create more commands for standardized workflows.

Month 1: Master

Implement spec-driven development. Build your skill library. Optimize your context — measure what’s working, remove what isn’t, document what you learn.

👉 Tip: The businesses winning with AI aren’t the ones with the biggest budgets. They’re the ones who understand the architecture, build systematic workflows, and iterate on what works. Claude Code is the same — it rewards systematic thinking over brute-force prompting.

Quick Reference

Essential Commands

CommandPurpose
/clearReset conversation
/compactCompress context, preserve decisions
/resumeContinue previous session
/rewindUndo to previous checkpoint
/permissionsManage tool permissions
/project:nameRun project command

Keyboard Shortcuts

ShortcutAction
EscapeInterrupt current operation
Escape EscapeGo back, retry different approach
Shift+TabToggle auto-accept mode
#Let Claude update files automatically
TabFile path completion

CLI Flags

FlagPurpose
-p "prompt"Headless mode (no REPL)
-cContinue most recent session
-r "session"Resume specific session
--model opusUse Opus model
--agent nameUse specific agent

Sources and Further Reading


Continue reading:

Back to AI Articles
Submit Work Order