5 min

Claude Code: From Command-Line Tool to a Real AI Agent - Lessons from a CTO

Claude Code isn't just a command-line tool - it's a real AI agent. Here's my roundup of tricks from Patrick, CTO of an AI-native startup: CLAUDE.md, GitHub integration, the Explore - Plan - Execute framework and the double-escape trick.

Also in: Tiếng Việt · 中文 · 한국어 · 日本語

Hey everyone! Today I want to talk about Claude Code - a tool lots of people use while tapping maybe 10% of what it can do. A video from Patrick (CTO of an AI-native startup) and his team totally opened my eyes on how to turn Claude Code from an ordinary chatbot into a seriously powerful AI agent.

What is Claude Code and why should you care?

From what I gathered after watching the video and digging around a bit, Claude Code isn't just a command-line tool - it's the first real AI agent in the coming wave of powerful AI agents.

The core difference: Claude Code vs Cursor

Patrick explained it really clearly:

ToolWhere it shines
Claude CodeExcellent at multi-step processing. Give it a big task and it breaks it into subtasks and works through them one by one. Great for starting a project from scratch.
CursorStill good for solving specific problems and targeting specific files or lines of code, since selecting them is easy.

Fun fact: Patrick says he spins up a new project “every other couple of days” thanks to Claude Code alone. That's a jaw-dropping productivity boost.

Tips for using Claude Code effectively

1. CLAUDE.md - “the README for Claude Code”

This is your main context file. When you run /init, it will:

  • Build an overview of the codebase
  • Analyze all the files
  • Understand the startup processes and structure

Pro tip from Patrick: Create a CLAUDE.md file for every subfolder. That way Claude doesn't have to “grep like crazy” and can track each function and file in detail.

2. GitHub integration - the real game changer

This is the part that made me go WOW:

  • Run a single command and Claude Code sets itself up with your GitHub repo
  • You can tag Claude just like you'd tag a real developer
  • It creates issues, writes checklists, executes, and even handles code review
I can run 30 different commands at once, have Claude Code generate PRs for all the features and tag Claude at the end. By the time I get home, everything's done.
— Patrick

3. Commands - share your “super prompts”

Commands in Claude Code = prompts saved as files, which you can:

  • Share across projects
  • Share with your team
  • Turn into comprehensive workflows

For example, Patrick has a super long but very effective codebase analyzer command, and he even built a GitHub action to run it straight from the GitHub interface.

The “Explore - Plan - Execute” framework

This is the core methodology Patrick recommends:

mermaidflowchart LR
  E["Explore: read the codebase, build context"] --> P["Plan: split work by risk level"]
  P --> X["Execute: code one PR at a time"]
  E -->|"wrong overview? /clear and redo"| E
The Explore - Plan - Execute loop

1. Explore phase

text# Instead of jumping straight into execution, do this:
"Prepare to work on this. Read the codebase, understand the structure."

Important: Make Claude spend tokens to build up context. If the overview is wrong, /clear and start over - don't try to patch it.

2. Plan phase

Patrick doesn't use plan mode; he prefers:

text"Think hardest. Write function names in 1-3 sentences about what they do. Write test names in 5-10 words about behavior they cover."

Risk-based planning:

Small

Don't overthink it, just write the code

Medium-Large

Break into testable, deployable PRs

High-risk

Take 2-3 shots at the plan and review carefully

3. Execute phase

Use the context you built during the explore phase. Patrick recommends:

text"Work on PR1. Think hard. Write elegant code. NO backwards compatibility."

Double escape - the magic technique

This is the real gem from the video:

  1. After exploring and building context (7 minutes, 50k tokens)
  2. Hit double escape to fork the conversation
  3. Open a new tab and hit resume
  4. Now you can have 5 terminals sharing the same amazing context
If you get a smart Claude, keep it and reuse it over and over.
— Patrick

Test Driven Development (TDD) with Claude - surprisingly good

Patrick hates TDD when coding himself, but with Claude:

Claude writes a failing test, then writes code that makes the test pass. It does an excellent job.
— Patrick

More sharp insights

Context management

Model selection

  • Sonnet is the default; Opus costs 4x as much
  • The Max plan ($200/month) for unlimited usage - Patrick highly recommends it
  • Sonnet 4 with thinking hard is sometimes better than Opus for many tasks

The enterprise-ready problem

Claude “loves to be enterprise ready” - you have to fight against this because it produces overly complex solutions.

MCP (Model Context Protocol) - extending what it can do

Claude Code supports MCPs to:

  • Connect to Google Drive, Jira, Slack
  • Add custom developer tooling
  • Extend functionality beyond coding

Agent swarms - the near future

The video also mentions agent swarms - multiple containers running in parallel to solve a problem, then comparing results manually or via an LLM judge. A friend of Patrick's set up 3 Opus instances with acceptance criteria and style guides.

Bottom line - who should use Claude Code?

After analyzing the video and doing some extra research, I think Claude Code is a good fit for:

✅ Should use

  • Developers who want to automate repetitive tasks
  • Teams that need consistent workflows
  • Projects with large, complex codebases
  • People who start new projects often

❌ Maybe not yet

  • Beginners not yet comfortable with the command line
  • Small projects under 1,000 lines
  • People who prefer a visual IDE experience like Cursor

The future of AI coding

Patrick stresses that the close collaboration between Anthropic's ML team and product team is what sets Claude Code apart. Opus 4 and Sonnet 4 are tuned to “badly want to use bash commands” - perfectly aligned with Claude Code.


Have you tried Claude Code yet? Share your experience!

P.S.: The original video is over 2 hours of extremely dense content. I recommend watching the whole thing if you're serious about AI coding tools.