====== Claude Code ====== **Claude Code** is an AI-powered agentic coding assistant from **Anthropic** that operates directly in the terminal. It understands entire codebases, automates development tasks, and can work autonomously for extended periods. Released to general availability on May 22, 2025 alongside Claude 4, Claude Code represents Anthropic's vision for seamless developer-AI collaboration. Claude Code is powered by **Claude Opus 4**, capable of sustained performance on long-running tasks requiring thousands of steps over several hours. ===== How It Works ===== Claude Code functions as a terminal-based agent that can browse and act on files with the same capabilities as a developer. It operates through: * **Terminal Interface** — The primary CLI for invoking Claude with commands and natural language instructions * **IDE Integration** — Native extensions for VS Code and JetBrains display proposed edits inline * **Code Execution** — Built-in sandboxed execution for running code and scripts * **File System Access** — Direct project file access for contextual understanding and modifications * **MCP Integration** — Dynamic tool discovery and execution through Model Context Protocol servers ===== Key Features ===== **Agentic Coding**: Claude Code enables autonomous multi-feature app development, complex codebase modifications, bug fixing, and feature building through intelligent automation rather than just suggestions. **Hooks**: Extensible event handlers that trigger on specific workflow events. Hooks enable custom pre- and post-processing of agent actions, security policies, and workflow automation. **MCP Integration**: The MCP connector enables Claude to discover and execute tools dynamically. Instead of loading all available tools, Claude searches for relevant ones — for example, searching 'github' loads only ''github.createPullRequest'' and ''github.listIssues'' rather than all 50+ available tools. **Skills System**: Skills are markdown files and deterministic scripts stored on the filesystem that agents can discover and use. Agents see only short names and descriptions initially, loading full content on demand. **CLAUDE.md**: Project-specific context documentation files. Claude Code reads CLAUDE.md files to understand project conventions, coding standards, and important context. HTML comments in CLAUDE.md are hidden from auto-injection to reduce noise. **Background Tasks**: Support for background automation via GitHub Actions, including scheduled recurring tasks like morning PR reviews, overnight CI failure analysis, and weekly dependency audits. **Programmatic Tool Calling**: Claude can orchestrate multiple tools through Python code in a sandboxed environment, dramatically improving accuracy — internal knowledge retrieval improved from 25.6% to 28.5%. ===== Supported Workflows ===== * **PR Review**: Tag Claude Code on pull requests to respond to reviewer feedback, fix CI errors, or modify code * **Terminal Development**: Interactive bash mode with improved discoverability * **IDE Development**: VS Code and JetBrains extensions showing inline edits * **Complex Navigation**: Substantially improved codebase understanding (navigation errors reduced from 20% to near zero) * **Multi-File Refactoring**: Enhanced precision for complex changes across multiple files ===== Code Example ===== # Using Claude Code SDK programmatically from anthropic import Anthropic client = Anthropic() # Define tools the agent can use tools = [ { "name": "bash", "description": "Run a bash command", "input_schema": { "type": "object", "properties": {"command": {"type": "string"}}, "required": ["command"] } }, { "name": "edit_file", "description": "Edit a file with search and replace", "input_schema": { "type": "object", "properties": { "path": {"type": "string"}, "old_text": {"type": "string"}, "new_text": {"type": "string"} }, "required": ["path", "old_text", "new_text"] } } ] # Run the agent loop messages = [{'role': 'user', 'content': 'Fix the failing test in tests/test_api.py'}] response = client.messages.create( model="claude-opus-4-20250514", max_tokens=4096, tools=tools, messages=messages ) ===== Comparison to Other Tools ===== ^ Feature ^ Claude Code ^ Cursor ^ GitHub Copilot ^ | Interface | Terminal CLI | VS Code fork | VS Code extension | | Autonomy | Full autonomous agent | Agent + suggestions | Primarily suggestions | | Duration | Multi-hour sustained work | Interactive sessions | Real-time completions | | Codebase Understanding | Deep, cross-file | Semantic search | File-level context | | Background Work | GitHub Actions automation | None | None | ===== References ===== * [[https://code.claude.com/docs/en/overview|Claude Code Documentation]] * [[https://www.anthropic.com/news/claude-4|Claude 4 Announcement]] * [[https://github.com/anthropics/claude-code|Claude Code GitHub Repository]] * [[https://www.anthropic.com/engineering/advanced-tool-use|Anthropic Engineering — Advanced Tool Use]] ===== See Also ===== * [[claude_agent_sdk]] — Claude Agent SDK for building custom agents * [[cursor]] — Cursor AI code editor * [[devin]] — Devin autonomous AI software engineer * [[computer_use]] — Computer Use and GUI agents