Agentic Coding for Modern Engineers
Engineering Team Training
Understanding agentic coding and how it transforms the way we build software.
A command-line tool that brings agentic AI directly into your terminal
Unlike traditional autocomplete, Claude Code can autonomously navigate your codebase, edit multiple files, run commands, and execute complex multi-step tasks.
Works directly in your terminal where you already live. No context switching, no browser tabs—just you and your code.
Claude Code reads and understands your entire project structure, dependencies, and coding patterns to provide contextual assistance.
Traditional AI Assistants: You ask a question, get a response, copy-paste code, manually apply changes, and repeat.
Agentic Coding: You describe a goal, and the AI autonomously explores files, makes edits, runs tests, and iterates until the task is complete.
Claude Code can create branches, commit changes, run your test suite, and even debug failing tests—all from a single prompt.
Understanding the models that power Claude Code and when to use each one.
Choose the right model for your use case
Highest capability for complex reasoning, research, and nuanced tasks. Best for difficult coding problems.
Excellent balance of speed and capability. Great for everyday coding tasks and Claude Code default.
Lightning fast responses for simple tasks. Ideal for quick lookups and simple generations.
Get up and running on macOS with Homebrew in minutes.
Claude Code is available as a Homebrew cask, making installation simple and fast.
Prerequisites:
• Homebrew package manager
• Anthropic API key or
Claude Pro/Max subscription
Bring Claude Code capabilities directly into your favorite editor.
Seamless integration with your development environment
Official Claude extension with inline suggestions, chat panel, and full Claude Code integration.
Native Claude integration built into Zed. Enable via Settings → AI → Claude.
Works with IntelliJ, PyCharm, WebStorm. Install via JetBrains Marketplace.
Works in any terminal—iTerm2, Warp, Alacritty, or your preferred app.
Specialized AI assistants for complex workflows and parallel task execution.
Specialized AI assistants with independent context and focused capabilities
Each sub-agent maintains its own conversation context, preventing context pollution in your main Claude session while handling specialized tasks.
Define specific roles, expertise areas, and workflows. Sub-agents can be code reviewers, debuggers, web search specialists, or domain experts.
Granular control over which tools each agent can use. Security agents get read-only access, while developer agents get full file editing capabilities.
Explore: Fast, read-only codebase search and analysis using Haiku model for speed. Perfect for quick lookups.
Plan: Research-focused agent using Sonnet model for gathering codebase context and creating implementation plans.
General-Purpose: Handles complex multi-step tasks with access to all available tools and the Sonnet model.
When creating custom sub-agents, you can select which tools they have access to. This provides granular control over agent capabilities.
File Operations:
• Read: Read file contents
• Write: Create new files
• Edit: Modify existing files
• Glob: Pattern-based file search
Code Operations:
• Grep: Search code with regex
• Bash: Execute shell commands
Advanced Tools:
• WebSearch: Search the web for current
information
• WebFetch: Fetch and analyze web
content
• Task: Launch other sub-agents
Use the /agents command for guided setup
In Claude Code, type /agents to open the interactive menu. Choose "Create new agent" to start the setup wizard.
Define the agent name (e.g., "web-search-specialist"), description (when Claude should use it), select which tools the agent can access (Read, Write, Edit, Bash, etc.), and optionally specify the AI model to use.
Create the agent's behavior in .claude/agents/agent-name.md with YAML frontmatter and custom instructions.
Claude will automatically use your custom agent based on its description. Refine the prompt and tool access as needed.
A real sub-agent from this workshop repository that handles internet research and fact-checking.
File: .claude/agents/web-search-specialist.md
Purpose: Retrieve current information, verify facts, and find documentation.
Unlock parallel processing, specialization, and cleaner workflows
Multiple agents can work on different files simultaneously. One agent reviews code while another writes tests.
Each agent maintains focused conversations. No muddled context from unrelated tasks polluting your main session.
Domain-specific expertise with optimized prompts. Higher success rates for specialized tasks like security audits or SEO.
Build once, use everywhere. Share agents across projects via ~/.claude/agents/ or commit to repos for team collaboration.
Automate workflows with slash commands and intelligent orchestration.
Essential commands available out of the box
Get help, check system status, and manage settings
Switch AI models, visualize context usage, track token costs
Request code reviews and comprehensive security audits
Manage sub-agents, track tasks, edit project memory files
Project-level: .claude/commands/ — Shared via git with your team
User-level: ~/.claude/commands/ — Personal across all projects
Filename becomes command name: deploy.md → /deploy
Dynamic commands with context injection
Access all arguments as a single string: /fix-issue 123 → $ARGUMENTS = "123"
Individual access like shell scripts: /review-pr 42 high → $1=42, $2=high
Execute bash commands and inject output into context: !`git status`
Reference files directly: @src/utils/helpers.js for auto-completion and inclusion
Commands can invoke sub-agents for specialized tasks, creating powerful multi-agent workflows.
Automatic: Claude delegates based on agent descriptions
Explicit: "Use the code-reviewer sub-agent"
Chain commands and sub-agents for complex automation
Orchestrate test-writer → implementer → refactoring specialist for test-driven development
Backend architect → Database designer → Frontend developer → Test automator → Deploy
Analyze issue type dynamically and route to appropriate specialist agent for resolution
Dependency scanner → Code reviewer → Secret detector → Vulnerability report generator
Give Claude persistent context about your codebase, conventions, and workflows.
A markdown file that becomes part of Claude's system prompt, providing persistent context about your project.
Hierarchical Loading:
• User-level: ~/.claude/CLAUDE.md
• Project-level: ./CLAUDE.md
• Subdirectory: ./subdir/CLAUDE.md
Claude automatically loads all applicable files, with more specific contexts taking precedence.
Context persists across all chat sessions, no need to repeat yourself
Share coding conventions, architecture patterns, and team standards automatically
Studies show 5-10% accuracy improvement with well-crafted project memory
Claude can automatically analyze your codebase and generate a starter CLAUDE.md file for you.
What Gets Generated:
Languages, frameworks, and key dependencies
Directory layout and file organization
Detected coding conventions and architectural patterns
Build, test, run scripts from package.json or Makefile
Customize your memory file with information that helps Claude work better with your specific codebase.
Formatting rules, naming conventions, preferred patterns
Component patterns, state management, API design
Development workflows, test runners, deployment
Testing approach, documentation style, review process
Phoenix (Elixir) projects auto-generate an AGENT.md file with helpful context.
Key Sections:
• Framework-specific patterns (LiveView, Contexts)
• Directory structure conventions
• Database migration workflow
• Testing best practices
• Common Mix commands
Tips for creating effective project memory files
Include concrete examples of preferred patterns, not just general guidelines
Update memory files when conventions change or new patterns are adopted
User-level for personal preferences, project-level for team standards
Show preferred vs. avoided patterns with code snippets for clarity
Note project-specific quirks, workarounds, or common pitfalls to avoid
Reference external documentation, ADRs, or wiki pages for deeper context
Automate workflows with deterministic control over Claude's behavior.
Hooks are shell commands or LLM prompts that execute automatically at specific points in Claude Code's lifecycle.
Why Use Hooks?
Guarantee behavior without relying on AI memory or prompts
Auto-format code, run tests, enforce policies automatically
Connect Claude to linters, formatters, CI/CD pipelines
Block dangerous operations, validate inputs, audit actions
10 event types covering the entire Claude Code lifecycle
Before tool execution - validate inputs, block operations
After tool completes - format code, run tests, log actions
On permission dialogs - auto-approve/deny based on policy
Before prompt processing - add context, validate requests
On notifications - customize delivery, send to external systems
Session begins - load context, initialize environment
Session terminates - cleanup, archive artifacts, logging
Agent finishes - quality gates, force continuation
Subagent completes - control multi-agent workflows
Before history compaction - preserve critical context
Automatically format JavaScript and TypeScript files after editing with Prettier.
Configuration:
1. Hook triggers on PostToolUse
2. Matches Edit|Write tools
3. Reads file path from stdin JSON
4. Runs Prettier on matching files
5. Silent failure (|| true) won't block Claude
Method 1: /hooks Command
1. Type /hooks in Claude
Code
2. Select event type (PostToolUse, etc.)
3. Add matcher pattern (Edit|Write)
4. Enter command or script path
5. Choose global or project scope
Method 2: Manual Setup
File Structure:
Hook Script Template:
Security, reliability, and performance guidelines
Use
cat | jq -r '.tool_input.file_path'
instead of environment variables (they're
unreliable)
Use || true and
2>/dev/null to prevent hooks
from blocking Claude on errors
Check for path traversal (../),
sensitive files (.env), dangerous
patterns
Always use "$file_path" not
$file_path
to prevent shell injection
Exit 0 to continue, exit 2 to block with error message in stderr
Enable verbose mode to see hook execution logs and errors
Connect Claude Code to external tools, data sources, and where your data lives.
MCP uses a client-server architecture with three key components.
The AI application you interact with. Manages multiple clients and provides the user interface.
Connector that communicates with one MCP server. Provides isolation and security.
Provides tools, resources, and prompts. Examples: GitHub, Filesystem, PostgreSQL.
Communication:
• JSON-RPC 2.0 protocol
• STDIO or HTTP transport
• One client per server
• Host manages all connections
Method 1: CLI (Recommended)
After adding:
1. Restart Claude Code
2. Verify with claude mcp list
3. Check status with /mcp
Method 2: Config File
Use the /mcp command to enable/disable servers during your session.
Why Disable Servers?
Each server consumes context window space even when not used
Fewer active servers = faster startup and response times
Enable only servers relevant to your current work
The Problem: MCP servers consume tokens from your 200k context window.
• 20 servers = 66,000+ tokens
• Single server = 14,000 tokens
• Loaded even if not used
• Less room for actual work
Solution: Use
/context to monitor usage.
Example /context Output:
Tip: Disable high-usage servers with
/mcp
Common servers to extend Claude Code capabilities
Read/write files, manage directories, search project files
Manage issues, PRs, repositories, search code, CI/CD automation
Commit history, branches, staging, repository analysis
Database queries, schema inspection, data manipulation
Knowledge graph-based persistent memory across sessions
Privacy-focused web and local search for research
Send messages, read channels, team communication automation
Browser automation, screenshots, web scraping, testing
Modular instruction packages that activate automatically to enhance Claude's capabilities.
Specialized instruction packages that expand Claude's capabilities
Skills inject ~400 tokens of context only when needed. Claude autonomously detects when a skill is relevant and activates it automatically.
Each skill lives in
~/.claude/skills/<name>/ with
a SKILL.md file containing YAML frontmatter and
markdown instructions.
Without skills, AI-generated designs converge to similar patterns. Skills provide domain expertise to create distinctive, production-grade outputs.
Transforms generic AI interfaces into distinctive, production-grade designs through four key vectors.
Typography:
Dynamic font pairing, hierarchy, responsive sizing
Color & Theme:
Sophisticated palettes, semantic color systems, dark mode
Motion:
Purposeful animations, micro-interactions, transitions
Backgrounds:
Gradients, textures, depth, visual interest
Skills are automatically activated when Claude detects relevant context. No explicit invocation needed.
Installation: Use the
claude skill install command to add skills
from the official registry or custom sources.
Automatic Activation: Claude analyzes your request and codebase, then activates relevant skills autonomously.
Official skills for common development and productivity tasks
Frontend design expertise - typography, color, motion, backgrounds
Excel spreadsheet manipulation and data analysis
PowerPoint presentation creation and formatting
Word document generation and editing
PDF parsing, extraction, and manipulation
Enforce brand consistency across outputs
Build team-specific skills for your frameworks, conventions, and workflows.
Structure: Each skill is a folder with a SKILL.md file containing YAML frontmatter and instructions.
Best Practices:
• Keep skills focused on one domain
• Include concrete examples
• ~400 tokens max for efficiency
• Test with representative tasks
Multiply your productivity by running multiple Claude Code instances simultaneously.
Multiple working directories from a single repository
Git worktrees allow you to check out multiple
branches simultaneously in different
directories. No more git stash or
git checkout when switching tasks.
All worktrees share the same Git repository objects (saving disk space), but each has its own independent working directory with different file states.
Run multiple Claude Code instances in parallel—each working on a different feature in its own isolated worktree without interfering with each other.
Master these commands to manage multiple parallel development streams efficiently.
Each worktree is a separate directory with its own checked-out branch. Perfect for having Claude Code work on multiple features simultaneously.
Transform sequential AI iteration into parallel exploration
Create separate worktrees for each feature. Launch Claude Code in each directory—one agent refactors authentication while another builds data visualization. No context switching.
Create multiple worktrees from the same starting point. Run different Claude instances implementing the same feature in different ways. Compare results and merge the best approach.
Each Claude Code session maintains its own deep, focused context about a specific task. Treat AI coding sessions like long-running processes with ongoing dialogues.
Need to fix a production bug? Create a hotfix worktree instantly without disrupting your feature work. No stashing, no commits, no interruptions.
Maximize productivity while keeping your workflow clean
Use clear naming conventions like
project-feature-name. Create a
.worktrees/ directory to keep all
worktrees organized and add it to
.gitignore.
Use your primary repository directory for the main/master branch as a reference. Do all feature work in separate worktrees to avoid accidental commits to main.
Don't create 20+ worktrees. Create them for
active tasks, then remove them when done. Use
git worktree prune regularly to
clean up stale metadata.
Multiple Claude Code instances consume API credits and system resources. Balance parallelization with your available resources and budget.
When a task completes: cd back to
main, git worktree remove the
directory, then git branch -d if
the branch was merged.
Extend Claude Code's capabilities with modular extensions for commands, agents, skills, and tools.
Modular extensions that enhance Claude Code with custom capabilities
Plugins package slash commands, subagents, skills, hooks, MCP servers, and LSP servers together for easy installation and team sharing.
Over 243+ plugins available through the official Anthropic marketplace and community registries like claude-plugins.dev.
Install plugins directly from GitHub
repositories using
/plugin marketplace add owner/repo.
Team-wide consistency through project
configuration.
The building blocks of Claude Code plugins
Custom shortcuts for frequently-used operations like /deploy, /review, or /fix-issue
Purpose-built agents for specialized development tasks with custom tools and prompts
Connections to external tools and data sources through Model Context Protocol
Event handlers that customize Claude's behavior at key workflow points (PreToolUse, PostToolUse, etc.)
Domain expertise packages that inject specialized knowledge automatically when relevant
Language Server Protocol integration for real-time code intelligence and analysis
Prerequisites:
• Supported IDE (VS Code or JetBrains)
• Node.js 18+ and npm
• Anthropic account for OAuth
Installation Methods:
1. Interactive: /plugin menu in Claude
Code
2. CLI:
claude plugin install
<plugin>@<marketplace>
3. Add marketplace first, then install plugins
Community favorites and official recommendations
Real-time context usage, active tools, running agents, and todo progress display
Captures coding sessions, compresses with AI, and injects context into future sessions
Up-to-date, version-specific documentation and code examples for libraries
Semantic code search MCP making your entire codebase available as context
Enterprise-grade AI orchestration platform for complex workflows
Autonomous development loop for continuous iteration until task completion
Autonomous AI development that ships code while you sleep.
The Ralph Loop (aka Ralph Wiggum technique) is an autonomous development loop that keeps Claude Code working until task completion.
Core Concept:
A Stop hook intercepts Claude's exit attempts and re-feeds the same prompt, creating continuous iterations. Each cycle builds on previous work with full git history and file state preserved.
Named After: The Simpsons character Ralph Wiggum - embodying persistent iteration despite setbacks.
Basic Command:
Key Parameters:
--max-iterations: Safety limit (ALWAYS
use this!)
--completion-promise: Exact text
signaling task completion
Cancel Command:
Documented success stories from the community
Teams shipped six complete repositories overnight for approximately $297 total in API costs using Ralph loops.
One developer reported completing a $50,000 contract using Ralph loops with API costs under $300.
Fully autonomous migration from React v16 to v19 without human intervention during a 14-hour overnight session.
Each iteration reads test output and file changes, allowing Claude to fix mistakes from previous runs automatically.
Critical guidelines for effective autonomous development
This is your primary safety mechanism. The completion-promise uses exact string matching and can fail. A 50-iteration loop on large codebases can cost $50-100+ in API credits.
Ralph works best with binary, testable success conditions. "All tests pass" is better than "code looks good". Include specific acceptance criteria.
Particularly effective for new projects with clear requirements. Excellent for TDD, refactoring, migrations, and test coverage improvements.
Don't aim for perfect on first try. Ralph philosophy: failures are predictable and informative. Use them to tune prompts iteratively.
When NOT to Use Ralph:
Design decisions, UX choices, production debugging with business context
Vague goals without testable criteria will burn through tokens without progress
Monitor first few iterations before leaving overnight. Budget API credits accordingly.
Key Principles:
Where to find and learn more about Claude Code plugins
github.com/anthropics/claude-plugins-official - Anthropic-managed, high-quality plugins
claude-plugins.dev - 243+ plugins with CLI for automatic discovery and installation
github.com/hesreallyhim/awesome-claude-code - Curated skills, hooks, and plugins
code.claude.com/docs/en/plugins - Complete reference for creating and using plugins
Built-in at /plugins/ralph-wiggum/ or awesomeclaude.ai/ralph-wiggum
claudecodeplugins.io - 544+ skills with fuzzy search and interactive tutorials
Persistent task management for complex, multi-session development workflows.
The evolution of task management in Claude Code (January 2026)
Unlike old Todos that vanished when you closed your session, Tasks persist and coordinate across multiple sessions. Your work context survives restarts.
Tasks leverage the Task Tool - the foundational parallel processing engine that enables Claude to delegate to sub-agents for file operations, code analysis, and research.
Run up to 10 parallel sub-agents simultaneously, each with isolated context. Intelligent queuing handles additional requests automatically.
Foreground Tasks:
- Block main conversation until complete
- Permission prompts passed through to user
- MCP tools available
- Full interactive control
Background Tasks:
- Run concurrently while you work
- Inherit parent permissions
- Auto-deny unapproved operations
- No MCP tools available
- Press Ctrl+B to background a task
Essential commands for working with Tasks
List and manage all background tasks. Toggle view with Ctrl+T.
Interactive interface to view, create, edit, and delete custom subagents.
List background bash processes. Press K to kill any background process.
Toggle task list view. Shows up to 10 tasks with status indicators.
Background a currently running task. Tmux users: press twice.
Ask Claude to continue a previous task with full context preserved.
Storage Locations (Priority Order):
1. --agents CLI flag (session-only)
2. .claude/agents/ (project-level)
3. ~/.claude/agents/ (user-level)
4. Plugin's agents/ directory
Key Configuration:
- name: Unique identifier
- description: When to delegate
- tools: Read, Edit, Bash, etc.
- model: sonnet, opus, haiku, inherit
Maximize productivity with effective task workflows
Reset context window frequently to avoid token bloat. Scope each chat to one project or feature for best results.
Task success rates improved from 50% to 75% when writing one markdown file per task. Clear structure helps Claude understand intent.
Ask Claude to make a plan before coding. Don't let it code until you confirm the plan. Skip planning only if you can describe the diff in one sentence.
Isolate high-volume operations (tests, logs, docs) in sub-agents to preserve main context availability. Subagents cannot spawn other subagents.
Understanding the relationship between Tasks and Subagents.
Key Insight:
Subagents use the Task Tool as their underlying execution engine. They are management layers, not separate features.
Task Tool: Foundational parallel processing engine
Subagents: Persistent, reusable configurations on top of Task Tool
Resume work seamlessly across sessions
Resume the most recent conversation with full context preserved.
Select from recent conversations by name or ID.
Give sessions descriptive names for easy identification later.
Resume with a new session ID, preserving original for reference.
Share task list across sessions. Set to project name for persistence.
Triggers at ~95% capacity. Override with CLAUDE_AUTOCOMPACT_PCT_OVERRIDE.
Claude Code has a 200,000 token context window. Every piece of information consumes tokens from this budget.
Use /context command to see your current token usage breakdown across all components.
Token Budget Breakdown:
• System prompt: ~3,200 tokens (1.6%)
• System tools: ~12,000 tokens (6%)
• MCP servers: ~66,000 tokens (33%)
• Reserved: ~45,000 tokens (22.5%)
• Available: ~42,000 tokens (~21%)
• Your conversation: remaining space
Automatic conversation summarization to prevent context overflow
When your context window reaches approximately 190,000 tokens (~95% full), Claude Code automatically summarizes the conversation to free up space.
Auto-compact keeps recent messages intact and summarizes older parts of the conversation. Critical information and code changes are preserved.
Use /compact command to manually
trigger summarization anytime you want to free
up context space proactively.
Without auto-compact, hitting the 200K token limit would crash the session. Summarization prevents data loss and maintains continuity.
Preserve your precious context budget
Each MCP server can consume 14K-82K+ tokens.
Only enable servers you actively need. Use
/mcp command to disable unused
servers.
While agents only use ~0.3% per invocation, frequent delegation adds up. Use agents for complex tasks, but handle simple operations directly.
Regularly check /context to see
token breakdown. Understand what's consuming
your budget and optimize accordingly.
Large file reads consume conversation tokens. Use grep/glob to narrow down before reading entire files. Be mindful of reading many files at once.
Before starting a major task, use
/compact to summarize and free up
space for the work ahead.