Mastering Claude
Code
Practical tips to get more from Claude Code
Recording: [Link]
Boris Cherny
May 2025
CONFIDENTIAL
Follow along:
npm install -g @anthropic-ai/claude-code
CONFIDENTIAL 2
Claude Code is a new kind of AI assistant
● Terminal-based, not IDE
● Works with all tools
● Fits into all existing workflows
● General purpose – you can use it for almost anything
● Infinitely hackable
CONFIDENTIAL 3
Optimize your setup
Get set up:
● /allowed-tools Customize tool permissions
● /terminal-setup Enable shift+enter to insert newlines
● /install-github-app Tag @claude on your issues & PRs
● /theme Enable light/dark mode
● /config Turn on notifications
● 🌐 Turn on MacOS dictation
CONFIDENTIAL 4
Getting your feet wet
Codebase Q&A
CONFIDENTIAL 5
Use Claude Code to answer questions
about your codebase
● The easiest way for new users to start with Code
● Zero setup needed
● Your data stays local
CONFIDENTIAL 6
Use Claude Code to answer questions
about your codebase
Example prompts:
> How is @[Link] used?
> How do I make a new @app/services/ValidationTemplateFactory?
> Why does recoverFromException take so many arguments? Look through git
history to answer
> Why did we fix issue #18363 by adding the if/else in @src/[Link] API?
> In which version did we release the new @api/ext/[Link] API?
> Look at PR #9383, then carefully verify which app versions were impacted
> What did I ship last week?
CONFIDENTIAL 7
“
Tip #1: use codebase Q&A as a way to dip
your feet into Claude Code
Tip #2: practice prompting, and start to
understand what Claude Code “gets”
immediately vs. what needs more specific
instructions
CONFIDENTIAL 8
You are no longer a padawan
Editing code
CONFIDENTIAL 9
Use tools to get
things done
Claude Code ships with a dozen
tools out of the box. Tools are what
makes Claude Code so powerful.
Built-in tools: bash, file search, file
listing, file read and write, web
fetch and search, TODOs,
sub-agents
CONFIDENTIAL 10
Steer Claude to use tools your way
Example prompts:
> Propose a few fixes for issue #8732, then implement the one I pick
> Identify edge cases that are not covered in @app/tests/[Link],
then update the tests to cover these. think hard
> commit, push, pr
> Use 3 parallel agents to brainstorm ideas for how to clean up
@services/aggregator/feed_service.cpp
CONFIDENTIAL 11
Plug in your team’s tools
Tell Claude about your bash tools
> Use the barley CLI to check for error logs in the last
training run. Use -h to check how to use it.
Tell Claude about your MCP tools
$ claude mcp add barley_server -- node myserver
> Use the barley MCP server to check for error logs in
the last training run
CONFIDENTIAL 12
Common workflows
Explore › plan › confirm › code › commit
> Figure out the root cause for issue #983, then propose a few fixes. Let
me choose an approach before you code. ultrathink
Write tests › commit › code › iterate › commit
> Write tests for @utils/[Link] to make sure links render properly
(note the tests won’t pass yet, since links aren’t yet implemented). Then
commit. Then update the code to make the tests pass.
Write code › screenshot result › iterate
> Implement [[Link]]. Then screenshot it with Puppeteer and iterate till
it looks like the mock.
CONFIDENTIAL 13
“
Tip #3: teach Claude to use your tools
Tip #4: tailor the workflow to the task
CONFIDENTIAL 14
Down the rabbit hole
Give Claude context
CONFIDENTIAL 15
More context =
better performance
● Claude does better with more context
● There are a number of ways to give Claude
more context:
○ [Link]
○ Slash commands
○ At-mentioning filenames
○ (coming soon: MCP resources)
CONFIDENTIAL 16
Give Claude more context
Auto-add common bash commands, files, and style
conventions to every session:
● /<enterprise root>/[Link] Shared across all projects
● ~/.claude/[Link] Shared across all projects
● project-root/
○ [Link] Checked in
○ [Link] Not checked in
(Shortcut: type #)
CONFIDENTIAL 17
Give Claude more context
Pull in context on demand:
● ~/.claude/commands/[Link] Type /user:foo
● project-root/
○ .claude/commands/[Link] Type /project:foo
○ a/ Type @a
■ commands/[Link] Type /project:a:foo
■ [Link] Pulled in on demand
■ [Link] Type @a/[Link]
CONFIDENTIAL 18
“
Tip #5: the more context you give Claude,
the smarter it will be
Tip #6: take time to tune context
Is it for you or your team? Do you want to
add it automatically or lazily?
CONFIDENTIAL 19
Scaling up
Work with your team
CONFIDENTIAL 20
Share
permissions, Enterprise policy
memory, and
MCP servers
with your team Global (just me)
Build once, use everywhere
Project (checked in)
Project (just me)
CONFIDENTIAL 21
Share with your team
Enterprise policy
Global (just me) Project (shared) Project (just me)
(shared)
/Library/Application
Memory Support/ClaudeCode/CLA ~/.claude/[Link] [Link] [Link]
[Link]
Slash
- ~/.claude/commands/ .claude/commands/ -
commands
/Library/Application
Permissions Support/ClaudeCode/man ~/.claude/[Link] .claude/[Link] .claude/[Link]
[Link]
MCP servers - claude mcp .[Link] claude mcp
CONFIDENTIAL 22
Share with your team
Enterprise policy
Global (just me) Project (shared) Project (just me)
(shared)
/Library/Application
Memory Support/ClaudeCode/CLA ~/.claude/[Link] [Link] [Link]
[Link]
Slash
- ~/.claude/commands/ .claude/commands/ -
commands
/Library/Application
Permissions Support/ClaudeCode/man ~/.claude/[Link] .claude/[Link] .claude/[Link]
[Link]
MCP servers - claude mcp .[Link] claude mcp
CONFIDENTIAL 23
CONFIDENTIAL 24
“
Tip #7: configure [Link], MCP servers,
permissions, and slash commands for your
team, and check them into git
CONFIDENTIAL 25
Interlude: Keybindings
Key combos for common tasks:
● Shift+tab to auto-accept edits
● # to create a memory
● ! to enter bash mode
● @ to add a file/folder to context
● Esc to cancel
● Double-esc to jump back in history, --resume to resume
● ctrl+r for verbose output
CONFIDENTIAL 26
Leveling up
Scripting Claude
CONFIDENTIAL 27
Claude Code SDK
● Use the SDK for programmatic, low-level Your agentic application
access to Claude Code
● Useful for CI and non-interactive contexts,
automation, and a building block for Claude Code SDK
interactive apps
● Currently supports CLI (TypeScript & Python
SDKs coming soon) Anthropic, Bedrock, or Vertex API
$ claude -p \ Claude models
“what did i do this week?” \
--allowedTools Bash(git log:*)
--output-format json
CONFIDENTIAL 28
Claude Code SDK
● Use the SDK as a unix utility: pipe in, pipe out Your agentic application
$ git status | Claude Code SDK
claude -p "what are my changes?" \
--output-format=json |
Anthropic, Bedrock, or Vertex API
jq '.result'
"Your changes are:..." Claude models
CONFIDENTIAL 29
Interlude: Multi-claude
There are many ways to run more claudes in parallel:
● Use multiple checkouts in separate terminal tabs
● Use one checkout with git worktrees
● SSH + TMUX
● Github Actions, launch jobs in parallel
CONFIDENTIAL 30
Thank you
npm install -g @anthropic-ai/claude-code
CONFIDENTIAL
31