Claude Code

Working effectively with Claude Code — the agentic, terminal-native coding tool — from mental model to hooks, skills, and real workflows.

8 parts · written by Pratik Dhanave. Start with Part 1 →

← All series · All posts

Part 1 · ·6 min read

What Claude Code Is

An agentic coding tool that lives in your terminal, reads and edits your real codebase, runs commands, and works through multi-step tasks — not an autocomplete, but a collaborator you delegate to.

The opener to a Claude Code series: what an agentic, terminal-native coding tool actually is — it takes a goal and executes multi-step work on your real codebase, with permissions keeping you in control — and the mental model that makes it click.

Part 2 · ·6 min read

The Core Workflow

Getting great results from Claude Code is less about clever prompts and more about a disciplined loop: give context, specify clearly, let it work, review, and steer.

The disciplined loop that gets great results: explore → plan → execute → review, specifying like you'd brief a colleague, steering actively, managing context, and right-sizing delegation to the checks (tests) the agent can loop against.

Part 3 · ·6 min read

CLAUDE.md and Project Configuration

The single highest-leverage setup step for Claude Code is a good CLAUDE.md — the file where you write down, once, the context and conventions you'd otherwise repeat every session.

The highest-leverage setup step: a good CLAUDE.md that gives durable project context (build/test commands, conventions, gotchas, what not to do), how it layers, and the settings/permissions that tune autonomy safely and shareably.

Part 4 · ·6 min read

MCP: Connecting Claude Code to Your Tools

The Model Context Protocol lets Claude Code reach beyond your codebase — into your databases, issue trackers, docs, and services — through a standard, pluggable interface.

The Model Context Protocol lets Claude Code reach beyond the codebase into databases, trackers, docs, and services through a standard interface — what MCP is, how to connect servers, and treating each server as a least-privilege trust decision.

Part 5 · ·5 min read

Subagents and Parallel Work

Subagents let Claude Code delegate a focused task to a separate agent with its own context — keeping the main conversation clean and letting independent work run in parallel.

Subagents delegate a focused task to a separate agent with its own context — for context isolation and parallelism. When to delegate (independent, context-heavy, specialized), defined agent types, and keeping the main session as accountable orchestrator.

Part 6 · ·6 min read

Hooks and Automation

Hooks turn "please always run the formatter" from a hope into a guarantee — deterministic shell commands that fire on Claude Code's lifecycle events, no matter what the model decides.

Hooks are shell commands that fire deterministically on lifecycle events — auto-format on edit, block edits to protected paths, run checks, notify. When to use a hook (guarantee) vs CLAUDE.md (influence) vs permissions (gate), and keeping them safe.

Part 7 · ·6 min read

Skills and Slash Commands

Slash commands and skills turn a workflow you keep re-explaining into something you invoke by name — packaging repeatable expertise so you (and your team) don't prompt it from scratch every time.

Packaging repeatable workflows: custom slash commands for frequent explicit tasks, and skills — self-contained procedures the agent loads when relevant — turning tribal knowledge into invokable, versioned team assets. Matching the mechanism to frequency.

Part 8 · ·6 min read

Claude Code in Production Workflows

Beyond the interactive terminal, Claude Code can run headless in scripts and CI — which unlocks automation, and raises the stakes on permissions, review, and trust.

The capstone: running Claude Code headless in scripts and CI (PR review, batch ops, scheduled jobs) — and the guardrails it demands: least privilege, sandboxing, gating the produced artifact with human review, and the series' layered recap.

This series is part of a larger body of work by Pratik Dhanave, an Agentic AI Architect writing about production AI systems, distributed systems, and cloud-native engineering. Explore all course series, browse every post, or find topics via the tag index.