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.
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.