My Take
How "I"Use Claude Code Effectively
There's no single "correct" way to use coding agents.
Every developer should build their own opinionated workflow.
by Tuan Dinh | UX Foundation
Boris Cherny (@bcherny) · Feb 12, 2026
The Original Talk
Using Claude Code Effectively
A great introduction to Claude Code features and best practices.
credited to Kranthi Kumar Muppala | UX Foundation
Image: Anthropic / code.claude.com
Why CLI Agents
Control & Transparency
Three pillars that separate CLI agents from IDE plugins.
|
IDE Agents (Copilot / Cursor) |
CLI Agents (Claude Code / OpenCode) |
| Context |
IDE decides what to send (32k–128k tokens) |
You control exactly what the agent knows (up to 1M tokens) |
| Tools |
Limited to editor actions, GitHub ecosystem |
Full system access: git, shell, 300+ MCP integrations |
| Cost |
$10–50/seat/month, usage caps |
Pay per token (API) or $20–200/month, no caps |
" IDE agents abstract these away, which limits power users. CLI agents make them explicit, which enables mastery. "
Core Mental Model
Context Engineering
The #1 skill in working with any coding agent is engineering the right context.
Static Context
Always loaded
CLAUDE.md · rules
Injected into every session automatically. Costs tokens whether relevant or not.
Project-available:
commands · agents · docs
— loaded when referenced
Dynamic Context
On-demand
MCP servers · skills · subagents · teams
Capabilities the agent reaches for at runtime — extending what it can know and do.
FRAMEWORK
Static context is the foundation. Dynamic context extends it.
CLAUDE.md
Your Project's Memory
Instructions the agent reads at the start of every session. Keep it stable, keep it small.
What belongs here
Stable, rarely-changing context:
# Code Conventions
- TypeScript strict mode
- Prefer composition over inheritance
# Project Layout
- Monorepo: apps/ and packages/
- API routes in src/api/
# Architecture
- Event-driven microservices
- PostgreSQL + Redis
/init — think twice
The init command dumps details the agent can already find in your code:
Build commands
→
already in package.json
Framework details
→
already in the code
Workflow steps
→
likely to change
These bloat your context and go stale fast.
KEY RULE
Only put what's stable and not already in code. Less is more.
Static Context
The Agent's Persistent Memory
Files and instructions loaded into every session automatically.
Hierarchy
1
Project-level
Shared with team via version control
2
User-level
Your personal preferences across projects
3
System-level
Managed by admin policies
| Tool | Config File |
| Claude Code | CLAUDE.md |
| Gemini CLI | GEMINI.md |
| Codex CLI | AGENTS.md |
| Cursor | .cursorrules |
PRINCIPLE
Every CLI agent reads a project file. The format differs, the principle is identical.
Beyond CLAUDE.md
Rules, Commands & Agents
Organize context by when and how it's needed.
Rules
.claude/rules/
Path-specific instructions loaded only when matching files are accessed.
Always validate request body
Return proper HTTP status codes
Commands
.claude/commands/
Reusable prompts invoked with /command-name.
Run tests, build, and deploy
to staging environment
Custom Agents
.claude/agents/
Specialized role definitions for different tasks.
You are a code reviewer.
Focus on security issues.
Advanced Static Context
Docs & Diagrams as Context
The better your project is documented, the better the agent performs.
Feed the Agent
Architecture docs System design, data flow, service boundaries |
API specs OpenAPI/Swagger, GraphQL schemas |
Design docs Specs, RFCs, decision records in docs/ |
Diagrams draw.io, mermaid → referenced in CLAUDE.md |
# Architecture
See docs/architecture.md for
system design overview.
# API
See docs/api-spec.yaml for
endpoint definitions.
# Diagrams
See docs/diagrams/ for
data flow and service maps.
KEY INSIGHT
Documentation is now a force multiplier — it feeds both humans and agents
Dynamic Context · MCP
Connect to Everything
Model Context Protocol — an open standard letting agents call external tools at runtime.
$ claude mcp add playwright \
npx @playwright/mcp@latest
$ claude mcp add --transport http \
context7 https://mcp.context7.com/mcp
⚠ Only install servers you trust — a malicious MCP can read files, exfiltrate data, or execute arbitrary code.
(Demo)
What You Can Do
Automate browsers Test UIs, fill forms, take screenshots |
Query databases PostgreSQL, MongoDB, Redis |
Fetch documentation Up-to-date library docs via Context7 |
Integrate services GitHub, Linear, Slack, Figma |
KEY RULE
If the agent needs external tools or data, connect an MCP server
Recipe →
Dynamic Context · Skills
On-Demand Expertise
Folders of instructions, scripts, and resources — loaded only when relevant.
SKILL.md
template.md
examples/
sample.md
scripts/
validate.sh
Not just markdown — skills can contain code, templates, and executables.
How it works
Metadata loads first (~100 tokens) to check relevance.
Full instructions load only when matched.
Code and references load as needed.
Progressive disclosure — minimal context cost.
Skills vs MCP
Skills = workflow & process — how to approach a task
MCP = data & tools — what the agent can access
KEY RULE
If the agent should know it sometimes, make it a skill
Recipe →
Skills Mastery
Curate, Don't Hoard
20-30 targeted skills beat hundreds of generic ones.
Install 200+ marketplace skills
→
~20% activation accuracy
One giant skill.md file
→
Wastes tokens every load
Curate 20-30 targeted skills
→
High accuracy, low overhead
Proper Architecture
skill.md = summary/SOP
Short trigger + workflow
references/ = deep knowledge
Loaded only when needed
Progressive disclosure — don't front-load tokens
Skills Mastery
Use Skill to Create Skill
The skill-creator skill builds new skills for you — meta, but effective.
> /skill-creator Create a deployment
skill that runs tests, builds,
deploys to staging, then promotes
to production after smoke tests.
✓ Created: skills/deploy/
SKILL.md
checklist.md
scripts/validate.sh
Describe what you want → skill-creator scaffolds the full skill folder with instructions, templates, and scripts.
Example Skills You Can Create
TDD Skill
Enforces red → green → refactor cycle. Writes failing test first, always.
Code Review Skill
Structured checklist: security, performance, tests, style.
Deployment Skill
Runs checks, builds, deploys, verifies. Can't skip steps.
Security
Protect Your Secrets
Coding agents can read sensitive files by default. Lock them down.
{
"permissions": {
"deny": [
"Read(.env*)",
"Read(*.pem)",
"Read(*.key)",
"Read(**/secrets/**)"
]
}
}
The Risk
By default, agents can read .env files — API keys, passwords, and credentials may be sent to external servers.
Protection Checklist
✓ Add global deny rules in settings.json
✓ Use .claudeignore for project exclusions
✓ Never store unencrypted secrets on disk
✓ Use secrets managers instead
KEY RULE
Deny rules always win. Protect secrets globally.
Recipe →
Permissions
Control Agent Access
Settings permissions are interpreted by the LLM. Hooks are deterministic.
Settings Permissions
Allow: Bash(npm run build)
Deny: Bash(rm -rf *)
Deny: Read(.env*)
The LLM decides whether a command matches — it can rationalize exceptions, especially in long sessions.
Hooks — Deterministic
$ /hookify Block rm -rf with
home paths
Regex/code checks at shell level. No LLM involved. Binary pass/fail — can't be convinced otherwise.
⚠ Use both: settings for intent, hooks for enforcement. Prompts can be bypassed — deterministic code cannot.
KEY RULE
If it must be blocked every time, use a hook — not a permission rule
Recipe →
Plan Mode
Think Before You Build
Lightweight and covers ~70% of daily use cases.
Tips
Edit the plan in your editor before implementing
Save plans to plans/ in your repo
For multi-file features, break into sequential plan files
Limitations
Plan lives only in the conversation — no structured spec, no review loop, no checkpoints.
For complex features, you need more rigour than plan mode provides.
KEY RULE
If it touches more than 2–3 files, plan first
Recipe →
Delegation Framework
Superpowers: Structured Delegation
Skills don't just add knowledge — they add discipline.
Brainstorm
Explore requirements, design spec
↓
Write Plan
Break into phases → spec reviewed → approved
↓ plan breaks into phases
sequential or parallel · TDD enforced per phase
↓ results merge
Review
Automated quality gates per task + final review
Each Phase is a Skill
Can't skip brainstorming. Spec gets reviewed before execution. Sub-agents work on plan tasks in parallel.
github.com/obra/superpowers
End-to-End
Putting It All Together
A real workflow from idea to shipped code.
1
Secure the workspace first
Deny rules for secrets, hooks for enforcement, trusted MCP only
2
Static context sets the stage
CLAUDE.md, rules, architecture docs loaded automatically
3
Brainstorm with skills
Dynamic context: skill explores requirements, produces design doc
4
Plan then implement
Plan mode or Superpowers spec → verified implementation
5
Context splits when needed
/clear, new sessions, subagents for heavy reads
6
Review with code review skill
Automated quality gates before merge
Agent Teams
When One Session Isn't Enough
Coordinate multiple agents working together with shared tasks and messaging.
| Subagents | Agent Teams |
| Context |
Own window, results return to caller |
Own window, fully independent |
| Communication |
Report back to main agent only |
Teammates message each other directly |
| Coordination |
Main agent manages all work |
Shared task list, self-coordination |
| Best for |
Focused tasks, only result matters |
Complex work needing collaboration |
| Token cost |
Lower (summarized results) |
Higher (separate instances) |
Agent Teams
How to Set Up a Team
Describe the task, Claude creates the team.
> Create an agent team to refactor
the auth module. Spawn three
teammates:
- One for backend logic
- One for tests
- One for API docs
✓ Team created: auth-refactor
3 teammates spawned
Shift+Down to cycle teammates
Best Practices
3–5 teammates for most workflows
5–6 tasks per teammate
Avoid file conflicts — each teammate owns different files
Require plan approval for risky tasks
Display: in-process (Shift+Down) or split panes (tmux/iTerm2)
The Big Picture
The Delegation Spectrum
Choose the right level for the task.
Autocomplete
AI suggests lines
Single Agent
AI builds features
Subagents
AI delegates tasks
Agent Teams
AI collaborates
" Most work is single-agent. Reserve teams for genuinely parallel problems. "
Summary
Quick Reference
The key rule for each topic.
CLAUDE.md
If the agent should always know it, put it here
Skills
If the agent should know it sometimes, make it a skill
MCP Servers
If the agent needs external tools or data, connect an MCP server
Plan Mode
If it touches more than 2–3 files, plan first
Verification
If the agent can't verify it, you'll be debugging it
Context
If you're starting a new task, start a new session
Security
Deny rules always win. Protect secrets globally.
Permissions
Start strict, add allowlists as patterns emerge
Hooks
If an action must happen every time, make it a hook
Getting Started
Your Progression Path
Build your skills progressively.
1
Day 1START HERE
Install Claude Code · Create CLAUDE.md · Use plan mode for your first task · Set up security deny rules
2
Week 1
Add MCP servers for your tools · Set up permissions · Practice /clear between tasks · Add verification to prompts
3
Month 1
Build custom skills for team workflows · Use subagents for research · Establish context management habits · Model matching
4
AdvancedPOWER USER
Superpowers delegation framework · Agent teams for complex projects · Parallel sessions with worktrees · Headless mode in CI/CD