Claude Code Complete Guide
Your AI pair programmer that understands entire codebases, automates workflows, and ships features autonomously.
Everything you need to master Claude Code for cloud infrastructure, FinOps, and development velocity.
š On This Page
What is Claude Code?
Claude Code is an agentic coding tool from Anthropic that works with your local repository. Unlike autocomplete tools, it understands your entire codebase, executes tasks autonomously, and manages specialized sub-agents.
Contextual Understanding
Reads entire codebase, CLAUDE.md files, and project conventions
Direct Execution
Edits files, runs commands, tests code, and commits changes
Specialized Agents
Deploy sub-agents for infra, security, FinOps, and docs
How Claude Code Works
Agentic Workflow
Claude Code plans, executes, and iterates autonomously ā no micromanagement needed
- 1Analyze: Scans codebase using grep/find/glob (no RAG pipeline)
- 2Plan: Creates execution plan based on context and request
- 3Execute: Edits files, runs tests, validates, handles errors
- 4Commit: Creates meaningful commits and pushes to branch
š„ļø Available Platforms
Natural language commands in terminal
Inline diff reviews in your IDE
claude.ai ā Code tab
ā” Key Capabilities
- Edits multiple files simultaneously
- Runs terminal commands & scripts
- Integrates with external tools via MCP
- Handles git workflows end-to-end
- Fetches latest info from the web
Project Structure
Anatomy of a Claude Code Project
Claude Code uses specific files and folders to organize configuration, agents, and context
my-project/ ā āāā .claude/ ā āāā agents/ ā ā āāā infra.md ā ā āāā docwriter.md ā ā āāā finops.md ā āāā settings.yaml # Project-wide config ā āāā memory.json # Context checkpoints ā āāā CLAUDE.md # Main repo instructions āāā src/ ā āāā CLAUDE.md # Module-specific context ā āāā ... āāā README.md
.claude/ Directory
Private metadata: agents, settings, memory, logs
CLAUDE.md Files
Project conventions, architecture, coding standards
Key Files & Configuration
CLAUDE.md Files
Your project's "playbook" ā teaches Claude your conventions, architecture, and rules
Example: Root CLAUDE.md
# CLAUDE.md ā Root
## Project Overview
Multi-cloud infrastructure for Azure & OCI
## Coding Guidelines
- Use Terraform for IaC
- All resources tagged: env, app, owner
- Azure naming: AZ-RG-{region}{env}-{service}
## Test Commands
- `pytest` for unit tests
- `terraform validate` for infraSub-Agents (.claude/agents/*.md)
Specialized assistants with focused expertise and custom permissions
FinOpsAgent
- ⢠Cost optimization analysis
- ⢠SKU recommendations
- ⢠Monthly reports
InfraAgent
- ⢠Network topology review
- ⢠NSG/security validation
- ⢠Key Vault policies
Example: .claude/agents/finops.md
# FinOpsAgent
Focus: Cost optimization across Azure & OCI
Capabilities:
- Analyze Terraform for inefficient SKUs
- Recommend storage tiers and VM sizes
- Generate monthly cost reports
Allowed Tools:
- readFile, writeFile
- runCommand("az", "oci")
Default Model: claude-sonnet-3.5CLI Commands
Quick Reference
Essential commands for daily workflows
claudeStart interactive Claude Code session
claude -p "your prompt here"Run single prompt
claude --continueResume previous session
claude --model claude-sonnet-4.1Choose specific model
claude agents listView available sub-agents
Real-World Use Cases
Infrastructure & DevOps
Automate reviews, enforce policies, maintain consistency
š Security Audits
"Review NSG rules allowing 0.0.0.0/0"Scans, flags violations, suggests private endpoints
šļø IaC Refactoring
"Standardize Terraform naming to snake_case"Refactors modules, updates refs, runs validate
FinOps & Cost Optimization
Identify waste, optimize spending, enforce governance
Real Example
Growth team processed 100s of ad variations in minutes instead of hours using specialized agents
š° SKU Analysis
"Analyze VM SKUs, suggest cheaper alternatives"Report with savings + migration steps
š·ļø Tag Enforcement
"Add cost center tags to untagged resources"Updates Terraform, commits with attribution
Development Velocity
Ship faster with automated testing, reviews, and docs
ā Test Generation
"Write comprehensive tests for auth service"Unit, integration, e2e with edge cases
š Refactoring
"Extract DB logic into repository layer"Creates abstractions, updates calls, maintains tests
Why Teams Choose Claude Code
70-80% Time Savings
Reduce routine tasks from hours to minutes with autonomous execution
Significant Cost Savings
FinOps teams identify thousands in cloud waste automatically
Higher Code Quality
Automated reviews catch issues before they ship to production
Knowledge Sharing
Capture institutional knowledge in agents and CLAUDE.md files
Getting Started
- 1
Install Claude Code
npm install -g @anthropic-ai/claude-codeOr use VS Code/JetBrains extensions, or access via claude.ai
- 2
Create CLAUDE.md
Add to repo root with project overview, conventions, cloud naming rules
- 3
Define Sub-Agents (Optional)
Create specialized agents in .claude/agents/ for FinOps, infra, security
- 4
Run Your First Command
claude -p "Explain the architecture of this project"
Tips for Cloud & FinOps Teams
Include Cloud Standards
Add naming conventions and tagging rules in root CLAUDE.md for governance
FinOpsAgent
Review SKU choices, budget optimizations, monthly cost reports
MCP Integrations
Connect to az costmanagement and oci usageapi for real-time data
Version Control
Track all agent definitions in Git for audit trails and consistency
Resources
š Official Resources
š ļø Community
Ready to Transform Your Workflow?
Start using Claude Code to automate infrastructure, optimize costs, and ship faster.