[2/6] Claude Code: Feature Overview and Capabilities
This is part 2 of a 6-part series on Claude Code.
2.1 Background of Claude Code
Claude Code is the official CLI tool launched by Anthropic in 2024, designed to bring Claude's powerful capabilities directly into developers' command-line environments.
Development Timeline:
- Early 2024: Anthropic released Claude 3 series models (Opus, Sonnet, Haiku)
- Mid 2024: Launched Claude Code CLI, supporting basic code generation and file operations
- Late 2024: Added advanced features like Skills, Hooks, Planning Mode
- 2025: Became one of the mainstream AI programming tools, forming a competitive landscape with Cursor and Cline
Core Positioning:
Claude Code is not a "code completion tool," but an "AI software engineer assistant."
Essential difference from GitHub Copilot:
- Copilot: Provides real-time code suggestions in the editor (passive)
- Claude Code: Accepts high-level task descriptions, autonomously executes complete development workflows (active)
Technical Advantages:
- Large Context Window: Sonnet 4 supports 200K tokens, sufficient to understand entire small-to-medium projects
- Tool Calling Capabilities: Can execute bash commands, read/write files, call APIs, manage git
- Programmable Extensions: Deep customization of workflows through Skills and Hooks
- MCP Integration: Model Context Protocol supports connecting external data sources and tools
2.2 Core Concepts Overview
Before diving into practice, understand these core concepts:
| Concept | Purpose | Analogy | Official Docs |
|---|---|---|---|
| CLAUDE.md | Project constitution for AI, defining rules and constraints | README + coding standards | CLAUDE.md Guide |
| Skills | Executable scripts encapsulating complex operations | npm scripts | Skills Docs |
| Slash Commands | Quick prompt templates | IDE code snippets | Commands Docs |
| Hooks | Intercept and validate AI behavior | Git hooks | Hooks Docs |
| Planning Mode | Plan approval workflow for large tasks | Technical design review | Planning Mode |
| Subagents | Delegate subtasks to specialized AI | Microservices architecture | Agents Docs |
| MCP | Model Context Protocol, connecting external tools | API gateway | MCP Spec |
Core Workflow:
User provides requirement → Claude reads CLAUDE.md → Calls Hooks for validation
↓
Executes Skills (automated operations)
↓
Generates code → Runs tests → Commits to git
↓
Returns result → User reviews
2.3 Tool Comparison: Claude Code vs. Competitors
| Feature | Claude Code | Cursor | Cline | GitHub Copilot | Gemini CLI |
|---|---|---|---|---|---|
| Code Generation | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
| Command Execution | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐ |
| Context Understanding | ⭐⭐⭐⭐⭐ (200K) | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
| Programmability | ⭐⭐⭐⭐⭐ (SDK) | ⭐⭐⭐ | ⭐⭐ | ⭐⭐ | ⭐⭐ |
| Security Control | ⭐⭐⭐⭐⭐ (Hooks) | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ |
| UI Friendliness | ⭐⭐ (Pure CLI) | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ |
| Learning Curve | Medium | Low | Medium | Low | Medium |
| MCP Support | ✅ Native | ❌ | ✅ Integrated | ❌ | ❌ |
Real Usage Experience Comparison (based on Finance project):
Claude Code:
- ✅ Advantage: Complete CLI autonomy, extremely efficient once accustomed, highly customizable
- ✅ Advantage: Skills and Hooks build powerful workflows (like
/mysql-exec,/git-commit-push) - ❌ Disadvantage: Initially uncomfortable with pure command-line interface, lacks visual error hints
- Suitable for: Developers comfortable with command line, projects requiring high automation
Cline (VS Code Integration):
- ✅ Advantage: User-friendly interface, intuitive error hints, seamless IDE integration
- ✅ Advantage: Supports MCP, can connect external tools and data sources
- ❌ Disadvantage: Weaker customization than Claude Code, dependent on VS Code
- Suitable for: Developers accustomed to IDEs, value visual feedback
Cursor:
- ✅ Advantage: Out-of-the-box, lowest learning cost, excellent UI design
- ❌ Disadvantage: Weaker programmability, difficult to build complex automation workflows
- Suitable for: Personal projects, rapid prototypes, AI programming beginners
Selection Recommendations:
- Personal projects/rapid prototypes → Cursor (UI friendly, out-of-the-box)
- Enterprise projects/custom needs → Claude Code (programmable, auditable, deep automation)
- Team collaboration/need visualization → Cline (VS Code integration, user-friendly interface)
- Pure code completion → GitHub Copilot (lightweight, integrated in editor)
2.4 Why Choose Claude Code
Among many AI programming tools, I ultimately chose Claude Code as the primary tool for the Finance project, for the following core reasons:
1. Complete CLI Autonomy
Claude Code can not only generate code, but also:
- Execute bash commands (run tests, build projects, start services)
- Manage git (stage, commit, push, create branches)
- Operate databases (through Skills encapsulating MySQL operations)
- Build and deploy (Docker images, Kubernetes configs)
Real Case:
You: Add expense budget feature, including backend API, frontend page, database migration
Claude:
1. [Create database migration script]
2. [Execute /mysql-exec database/add_budget_table.sql]
3. [Generate ExpenseBudget.java, BudgetService.java, BudgetController.java]
4. [Run ./mvnw test to verify backend]
5. [Create BudgetManagementView.vue]
6. [Run npm run build to verify frontend]
7. [Execute /git-commit-push "feat: add expense budget management"]
Done! Feature complete and pushed to GitHub.
2. Powerful Context Understanding
- 200K token window (Sonnet 4): Can "see" the entire Finance project
- Smart Context Selection: Automatically reads relevant files (via
@mentionsin CLAUDE.md) - Session Memory: Maintains context consistency across multiple requests
Real Data:
- Finance project has 127 Java files and 33 Vue components
- Claude Code can understand cross-layer dependencies (e.g., which backend API frontend calls, database table structure)
- Generated code maintains naming and architecture consistency (referencing design principles in CLAUDE.md)
3. Programmability (Skills & Hooks)
Encapsulate complex operations through Skills, control AI behavior through Hooks.
My Skills Examples:
/setup-java: Configure Java 17 environment + load database credentials/mysql-exec: Execute SQL files/queries, automatically read.envcredentials/git-commit-push: Stage → Commit (Conventional Commits) → Push/docker-build-push: Multi-architecture image build (amd64/arm64)
Hooks Example (prevent AI from committing when tests fail):
# .claude/hooks/pre-tool-use.sh
if [[ "$TOOL_NAME" == "Bash" ]] && [[ "$COMMAND" =~ "git commit" ]]; then
if [ ! -f /tmp/tests-passed ]; then
echo "❌ Tests have not passed. Run tests first."
exit 1
fi
fi
4. Security and Controllability
- Permission Management: Configure which commands AI can execute (e.g.,
rm -rf) - Hook Interception: Validate before AI executes operations (e.g., must run tests before commit)
- Audit Logs: All operations recorded in
.claude/logs/ - Sandbox Mode: Test AI behavior in isolated environment
Real Results: In 71 commits of the Finance project, not a single one caused code loss or corruption due to AI misoperation.
5. Real Data Validation
In the Finance project, 100% of the code was generated by Claude Code, including:
- 127 Java backend files (Controllers, Services, Repositories, Models)
- 33 Vue components (complete frontend interfaces)
- 25 database tables with all migration scripts and stored procedures
- Docker containerization configs and CI/CD workflows
Project Scale:
- Backend Code: 15,748 lines (Java)
- Frontend Code: 25,131 lines (Vue/JavaScript/TypeScript, 33 components)
- Database: 25 tables, 11 migration scripts
- Total Code: Approximately 41,000 lines
- Development Cycle: November 2025 - present
- Net Development Time: Approximately 20 hours (fragmented time on weekends and evenings)
- Efficiency Improvement: Estimated 4-5x compared to traditional development
Decision Factors for Choosing Claude Code:
- ✅ Project requires high automation (backend + frontend + database + deployment)
- ✅ I'm comfortable with command-line operations, don't depend on IDE
- ✅ Need programmability (Skills/Hooks) to build standardized workflows
- ✅ Value security and auditability (enterprise-level requirements)
If you meet these criteria, I also recommend Claude Code:
- Comfortable with bash/zsh and other command-line tools
- Project requires cross-layer operations (code + database + deployment)
- Hope to build reusable automated workflows
- Value code quality and security control
2.5 Quick Start
Install Claude Code:
# macOS/Linux
npm install -g @anthropic/claude-code
# Configure API Key
export ANTHROPIC_API_KEY=your-api-key
# Launch
claude
First Task:
You: Create a simple Express.js server, listen on port 3000, return Hello World
Claude: [Generate server.js, package.json, run npm install, start server]
You: Visit http://localhost:3000 to verify
Claude: [Provide test command curl http://localhost:3000]
Recommended Learning Path:
- Read official documentation: https://docs.claude.ai/docs/claude-code
- Try simple tasks (generate code, run tests)
- Learn CLAUDE.md configuration (detailed in Chapter 3)
- Create first Skill (examples in Chapter 3)
- Configure Hooks to control AI behavior
Next Chapter Preview: Chapter 3 will dive into the complete development lifecycle of the Finance project, showing how to build a production-grade full-stack application from scratch using Claude Code.
