💻

Claude Code Overview

Aug 21, 2025

Overview

This lecture provides a comprehensive, start-to-finish guide on using Claude Code, covering its key features, best practices, advanced configurations, and agentic workflow automation to maximize productivity with AI coding assistants.

Installing and Getting Started with Claude Code

  • Installation is simple with a single command for Mac/Linux; Windows users are advised to use the Linux subsystem.
  • Use /init in your IDE terminal to set up Claude Code and initialize the claw.md global rules file.
  • You can begin using Claude Code immediately by entering commands for tasks or questions about your repository.

Global Rules and System Prompts (claw.md)

  • claw.md acts as the system prompt for Claude Code, containing high-level instructions, best practices, and coding patterns.
  • You can have multiple claw.md files for different project parts (e.g., frontend/backend).
  • For easier team sharing, keep detailed patterns outside claw.md and reference them within it.
  • Other AI coding assistants support similar global rule documents.

Permission Management

  • By default, Claude asks for permission before making changes; you can allow certain safe commands (e.g., ls, cd, python) in settings.local.json.
  • Avoid permitting dangerous commands like rm or wildcards (e.g., bash *); use explicit allow-lists.*

Custom Slash Commands

  • Create reusable workflows by adding markdown files in the commands directory inside .claw.
  • Slash commands can be parameterized using $arguments.
  • Useful for priming context, automating codebase analysis, and more.

Using MCP Servers

  • MCP servers extend Claude Code by connecting external tools (e.g., Serena for codebase semantic retrieval).
  • Add MCP servers via CLI and permit their actions in settings.local.json.
  • MCP servers like Archon provide advanced task and knowledge management.

Context Engineering & PRP Framework

  • The PRP (Product Requirement Prompt) framework is a three-step process: define your feature, generate a comprehensive context document (PRP), then execute it.
  • Validate all generated PRPs before execution for accuracy and completeness.

Sub Agents & Parallel Execution

  • Sub agents have specialized prompts, separate context windows, and can work on delegated tasks in parallel.
  • Define sub agents in the agents folder within .claw.
  • Parallel agent execution is managed using git worktrees, allowing simultaneous feature development across branches.

Claude Hooks

  • Hooks add custom automation (e.g., logging, scripts) at specific lifecycle events by defining actions in a JSON file and referencing bash scripts.
  • Hooks run after events like tool use, edits, or agent calls.

GitHub CLI Integration

  • Claude Code can use GitHub CLI to manage issues and PRs directly.
  • Custom slash commands can automate fixing issues, testing, committing, and opening pull requests.

YOLO Mode and Dev Containers

  • Run Claude Code in "YOLO mode" (no permission prompts) safely by using isolated dev containers (Docker-based).
  • Anthropic provides official dev container files for safe, autonomous coding assistant execution.

Key Terms & Definitions

  • claw.md — System prompt file containing global rules for Claude Code.
  • MCP server — External tool/service integrated with Claude Code for enhanced capabilities.
  • Slash command — Custom reusable prompt or workflow, triggered with /.
  • PRP (Product Requirement Prompt) — Structured context document for guiding code generation.
  • Sub agent — Specialized agent handling delegated tasks within Claude Code.
  • Hooks — Automated actions triggered after specified Claude Code events.
  • Dev container — Isolated Docker-based environment for safe, autonomous AI coding.

Action Items / Next Steps

  • Install Claude Code and initialize with /init command.
  • Set up claw.md with project rules and best practices.
  • Configure settings.local.json for permissions and hooks.
  • Explore custom slash commands, sub agents, and MCP integrations.
  • Review the linked GitHub repo and templates for examples.
  • Try running Claude Code in a dev container for secure autonomous mode.