ホーム 暮らし Mastering Claude Code in 30 Minutes (Official Anthropic Workshop / Featuring Boris Cherny)

Mastering Claude Code in 30 Minutes (Official Anthropic Workshop / Featuring Boris Cherny)

東條 淳平 東條 淳平 • 更新: • 公開: • 読了約 53 分
目次

Mastering Claude Code in 30 Minutes
(Official Anthropic Workshop / Featuring Boris Cherny) Hello everyone. I'm Boris. I'm a member of the Technical Staff at Anthropic, and I created Claude Code. Today, I'm going to talk about practical tips and tricks for using Claude Code. I won't spend much time on history or theory; I'll keep it very practical. Before we dive in, could I get a quick show of hands?
Could those who have already used Claude Code please raise your hands? (Looking at the hands)
Oh, that's great! I'm happy to see so many hands up. For those who didn't raise your hands—
(I know you shouldn't really do this during a talk, but) if possible, please open your laptops right now and try entering the following command. This will install Claude Code. You'll be able to try it out along with me for the rest of today's talk.


Claude Code? Claude Code is a new type of AI assistant, and there have been many generations of AI coding assistants until now. Most of them were like, 'Oh, you just need a JS if-statement here,' or 'If you have an if-statement, it'll work,' just completing code line by line or a few lines at a time.
Claude Code is not like that.It is a fully agentictool. It's designed to build entire features, write entire functions, write entire files, or fix entire bugs all at once. And the great thing about Claude Code is that it works with all the tools you're already using. You don't have to change your entire workflow. Whether the IDE you're using is VS Code, Xcode, or a JetBrains IDE, it's fine. Some people at Anthropic say they'll never let it go, butthey use Claude Code toobecause Claude Code works in any IDE (※2) and any terminal. It works locally, remotely, over SSH (※1), or in team environments—it works in any environment.It's highly versatile.Those who haven't used a free-form coding assistant like this before might not know what to do at first. When you open it, you might just see a prompt bar and wonder, 'What am I supposed to type here?' But this is a power tool, so you can use it for many things. However, because it can do so much, we don't force a specific workflow on you. As an engineer, I think you should be able to use it however you like.



When you open Claude Code for the first time, there are a few things I'd like you to do to set up your environment. It's very simple.

Please run the terminal setup. This will allow you to use Shift+Enter for line breaks. You won't need to use backslashes anymore. It makes things a bit easier to use. Also, you can use /theme to switch to light mode, dark mode, or the daltonized theme. And with /install GitHub app, you can install the GitHub app we announced today. You'll be able to mention @claude in GitHub Issues and Pull Requests. Just run this command in your terminal. You can customize permission settings for frequently used tools so you aren't asked every time. This is convenient. I set up the things I'm often asked about in advance. What I actually do is not type prompts into Claude Code by hand. If you're on macOS, turn on Dictation in System Settings under Accessibility. Then, you can just press the dictation key twice and speak your prompt. This is really great. You can talk to Claude Code like you're talking to another engineer. You don't have to type a lot of code. When you're just starting with Claude Code, I think it's so flexible that you might not know where to begin. The number one thing I recommend is to start withQ&A about your codebase. Just ask questions about your codebase.


I teach this during Anthropic's new hire training. On the first day of technical onboarding, they download and set up Claude Code and immediately start asking questions about the codebase. In the past, technical onboarding used to be a burden on the team. You had to ask other engineers, search for code, and learn how to use tools, which took time. But with Claude Code, you just ask a question, and it explores the codebase and answers you.



Thanks to this, Anthropic's technical onboarding has gone from 2-3 weeks in the past to about 2-3 days now. The good thing about Q&A is that it doesn't create any indexes at all. It doesn't create a database on a remote server. It doesn't upload your code anywhere. Everything stays local. It doesn't train generative models on your code either. You are in control. There are no indexes or anything. So there's no setup required. Once you download and launch Claude Code, you don't have to wait. You can start right away.


You can use it right away. This is a technical talk, so I'll be showing you quite specific prompts and concrete code examples so that you can improve or level up your Claude Code experience. For example, you can ask questions like, 'Where and how is this specific piece of code used?' or 'How do I instantiate this object?'
Claude Code doesn't just do a text search and give you an answer; it goes a step deeper. It looks for examples of how this class is instantiated and how it's actually used, and returns a much deeper answer.
It feels like reading a wiki or documentation, rather than just searching with Command + F. Another thing I often do is ask about Git history.
For example, 'Why does this function have 15 arguments? And why are the names of these arguments so strange?'
I'm sure everyone has one or two functions or classes like this in your codebase. Claude Code looks at the entire Git history, finds out when these arguments were added, who added them, what the situation was at the time, and what issue the commit was linked to, and summarizes it all for you.
And you don't even have to give it very detailed instructions. You can just ask it to 'look at the Git history' and it will do it.
The reason it can do that is not because we wrote 'look at the Git history' in the system prompt.
It's just because the model is excellent. If you tell it to use Git, it knows how to use Git properly. I'm really lucky to be able to build on such a wonderful model.
I also often ask about GitHub Issues. It uses the Web Fetch tool to retrieve the issue and also investigates the surrounding context.
This is quite amazing. What I do at our weekly stand-up every Monday is ask, 'What did I ship this week?'

Claude Code looks at the logs, and since it knows my username, it neatly summarizes the achievements I released this week. I just copy and paste that into our Docs.



So, the best tip for those who haven't used Claude Code yet is this: when you show it to someone for the first time or onboard a team, definitely start with codebase Q&A. Don't start by using flashy tools or making it edit code right away. First, have them ask questions about the code. By doing that, they will naturally learn how to write prompts, and they will understand the boundaries of 'What can Claude Code do?', 'How much will it do on its own?', 'Where does it need a little help?', 'Can it be done in one-shot?', 'Does it need two turns? Three turns?', and 'When do I need interactive mode or a REPL?'




Once you get used to Q&A, the next step is to start editing code. This is the next phase. The coolest part about using an LLM as an agent is that once you give it tools, it figures out how to use them on its own, almost like magic.

Actually, Claude Code isn't given that many tools. It has a small toolset, including file editing tools, batch command execution tools, and file search tools. It combines these on its own to explore code, brainstorm, and eventually perform edits.



You don't need to give specific instructions like 'use this tool, then use that tool.' You just say 'do this,' and Claude Code figures out how to do it itself, combining tools in the appropriate order. It does it naturally according to the code. There are really many ways to use it. What I sometimes do is have Claude Code brainstorm or create a plan before I let it write any code.


I highly recommend this. Sometimes I see people install Claude Code and immediately ask, 'Implement this huge feature that's about 3000 lines long.' Sometimes it works perfectly on the first try, but other times it ends up creating something completely different from what I imagined. The easiest way to get the results you want is to make it think first. Just ask it, 'Brainstorm ideas, create a plan, and check with me before writing the code.' You don't need to use Plan Mode or any special tools. Just asking Claude is enough. Saying 'Create a plan before writing code' is all you need. Also, let me introduce another one I use often: 'This commit, push PR.'
This is like a spell I use all the time. There's nothing particularly special about it, but because Claude is smart, it interprets it correctly. In other words, it creates a commit, pushes it to the branch, and even creates a Pull Request on GitHub.
You don't need to explain anything in detail. It looks at the code, looks at the history, checks the git log itself, matches the commit format, and commits and pushes in the correct way.


Also, this isn't something instructed via a system prompt. The model is capable of doing it naturally. As things get a bit more advanced, it starts to leverage your team's tools. This is where Claude Code really shows its true potential. There are mainly two types of tools. The first is batch tools.
For example (this is a hypothetical example), suppose there is a command-line tool called 'Barley CLI'. If you tell Claude Code about it and instruct it to 'check how to use it with Dash and use it,' it will work efficiently.
If you save frequently used tools in a cloud note (cloud MD), it will remember them for other sessions as well.
This is a method often used within Anthropic, and external customers use it the same way. The second is MCP tools.
Similarly, just tell Claude Code about the MCP tools and how to use them, and it will start using them immediately. This is extremely powerful.
When dealing with a new codebase, if you tell it all the tools your team already uses, Claude Code will use those tools to do the work for you.


There are several common workflows, and this is what I mentioned earlier. The flow is to explore a bit, make a plan, and check with me before starting to write code. The other two methods on the right become extremely powerful when Claude has tools to verify its own work. For example:

  • Write unit tests

  • Take a screenshot with Puppeteer

  • Taking screenshots of the iOS simulator

and so on. By doing this, Claude can iterate and improve on its own. This is truly amazing.
For example, if you ask it to 'create a web screen based on this mockup,' it can do a pretty good job on the first try. But after 2 or 3 iterations, it becomes almost perfect. The trick is to give Claude a tool to verify its own results.
If you do that, it can try things repeatedly and keep getting better. The results will be much better. It's the same for any task. Whether it's unit tests, integration tests, or screenshots of an app or website, just make sure to give it a way to check the results.
Then, Claude will iterate and improve on its own, getting better and better.



It's the same for any task.
Whether it's unit tests, integration tests, or screenshots of an app or website, just make sure to give it a way to check the results.
Then, Claude will iterate and improve on its own, getting better and better. This is the next step. Teach Claude how to use your team's tools and find a workflow that fits your work.

  • When you want it to write code immediately

  • When you want it to brainstorm some ideas

  • When you want it to create a plan

  • When you want it to iterate and improve repeatedly

If you know what you want it to do, you can give Claude the perfect instructions.

Once you've mastered the tools, the next step is to start providing Claude with plenty of context. The more information it has, the smarter the decisions Claude can make.
It's the same as when an engineer works on a codebase, holding a lot of information in their head about how the system works and the history behind it. There are several ways to provide information to Claude.
The easiest way is to use a special file called CLAUDE.md. How to do it:

  • Just create a file named CLAUDE.md and place it in the project folder where you launched Claude (the root folder).

  • Then, the contents of this file will be automatically read at the beginning of every session.

  • This means Claude will use that information from the very first interaction.


Claude Code's Flash Commands (.claude slash commands) 'You can also use Flash Commands. These are slash commands placed inside a .claude folder. This folder can be placed in your home directory for personal use, or committed within a project to be shared with the team. Here are some examples of slash commands that Claude Code itself has. For example, when you are in the Claude Code repository, you might see issues being labeled automatically. That is exactly this workflow in action. The command name is /label-issues, and it runs the same thing as the GitHub Action I mentioned this morning. When Claude Code executes this slash command, it automatically labels the issue appropriately. Since humans don't have to do it manually, it saves a significant amount of time. Of course, you can also mention specific files (explicitly add them to the context). And as I mentioned earlier, if you place a .claude.md file in a project directory or a nested subdirectory, it will be automatically incorporated into the context when you are working in that directory.'






This slide explains how to efficiently share and manage Claude's context (memory, settings, custom prompts, etc.) with your team. The point is "build once, use everywhere," which is a mechanism for scaling enterprise use and team collaboration.
Once you get better at using it, think a bit more about the "hierarchy" of how information is ingested. You can ingest not just CLAUDE.md, but also settings (config) and all information related to Claude in a hierarchical manner.

  • Project-specific settings:
    Information dedicated to your Git repository (project folder).
    You can register it in Git to share with the team, or keep it as your own personal setting.

  • Global settings:
    Settings that can be used commonly across all projects.

  • Enterprise policy:
    Settings decided by the entire company can be automatically applied to all employees and all teams.
    This is a mechanism to distribute "common global settings for everyone" all at once.


Explanation (simple) Enterprise policy: Settings applied uniformly across the company. Global: Personal settings common to all your projects. Project (shared): Project-specific settings shared with the team (recommended). Project (just me): Project-local settings used only by you.
This slide is packed with information, but it can be applied to many things. The same method can be used for slash commands (/commands), permission settings, etc. Example: How to use Enterprise Policies

  • When you want to automatically allow commands used by the entire team
    → Just write it in the Enterprise Policies file.
    When an employee executes that command, it is automatically approved and ready to use.

  • When you want to prohibit dangerous commands
    → If you write "this URL is strictly prohibited from being fetched" in the configuration file,
    employees cannot override it on their own.
    You can keep your codebase safe.

For MCP servers:

  • Create a file called mcp.json and register it in the codebase (Git).

  • When someone uses Claude Code in that project, a screen will automatically appear prompting them to install the MCP server.

  • It can be easily shared with the team.


Claude includes many useful tools for managing this information. For example:

  • Type /memory to see all currently loaded memory files.

Examples of what is loaded:

  • Enterprise Policy

  • Your user memory

  • Project-wide CLAUDE.md

  • Nested CLAUDE.md files that only apply to specific folders

and so on. You can use /memory to select and edit specific memory files. Also, when you want to have Claude remember something by typing # (hashtag), you can choose which memory file to save it to.


This is the next step. Make sure to properly configure CLAUDE.md, MCP servers, and the tools your team uses. A major benefit is that once you set it up, everyone can share it. Real-world example (Anthropic's app repository): There is a repository where Anthropic keeps all the code for their web and mobile apps.
They share a Puppeteer MCP server across the team.

  • They have registered a file called mcp.json in Git.

  • Any engineer working in that repository can use Puppeteer immediately.

  • They can automatically run end-to-end tests, take screenshots, and iterate on improvements based on the results.

Key point:
Everyone can use Puppeteer immediately without having to install it themselves.



  • Shift + Tab
    Switches to a mode that automatically accepts edits.
    (Bash commands still require approval, but file edits are automatically accepted.)
    → Useful when Claude is heading in the right direction or when you are iterating on tests. You can just ask it to "undo" later if needed.

  • # (Hashtag)
    When you want to tell Claude, "Remember this."
    Example: "Use this tool like this from now on."
    → Automatically saved to CLAUDE.md.

  • ! (Exclamation mark)
    Use this when you want to run a command directly on your local machine.
    The executed command and its result are stored in Claude's memory, so you can use them in your next instruction.
    Useful when running long commands.

  • Escape key
    You can safely stop Claude at any time, even while it is working.
    The session will not be corrupted.
    → Press this when you want to interrupt and say, "Change this here," or when you want to make a correction.

  • Press Escape twice
    You can go back one step in the history.

  • Ctrl + R
    Displays the entire full output that Claude is seeing.

  • After ending a session
    You can resume the previous session with claude --resume or claude --continuum.

Knowing these shortcuts will make working with Claude much faster and more comfortable!
Even if you are a terminal beginner, please feel free to try them out.



Next, I want to talk about the Claude Code SDK. As I mentioned briefly earlier, Sid will be giving a very detailed talk about the SDK in the room right next door. If you haven't tried it yet, please give it a go. When you use Claude with the -P flag, that is the SDK functionality. We have added many useful features in the last few weeks. What you can do with the SDK

  • You can build your own programs to use Claude.

  • You can pass prompts (instructions).

  • You can specify the tools you want to use (e.g., allowing only specific commands).

  • You can also choose the output format → standard JSON or Streaming JSON (when you want to receive results bit by bit).

This SDK is the same one that the Claude Code core uses. Real-world usage examples:

  • Using it daily for CI (automated testing).

  • Incident response (handling issues when they occur).

  • Various automation pipelines.

What's really convenient is that you can use it just like a standard Unix tool. "Input instructions → get results in JSON"
→ You can pipe (|) it to combine it with other commands and use it freely.

A natural English translation (in simple terms): Using pipes (|) is also very convenient. For example:

  • Pipe the results of git status into Claude

  • Process the results with jq and use them

The combinations are endless! The Claude Code SDK allows for new ways of working, like using it as a "super-smart Unix tool." We have only just begun to scratch the surface of its potential, but new use cases are being discovered all the time. Other useful examples:

  • Read a huge log file from a GCP bucket, pipe it into Claude, and ask, "Tell me about the interesting parts or issues in this log."

  • Fetch data with the Sentry CLI, pipe it through, and have Claude analyze it

You can easily create a workflow where you fetch data and then have Claude process it.


Finally, this is the most advanced way to use it. I usually run one Claude (Quad) at a time, but I open multiple terminal tabs and run Claude for different repositories. Power users at Anthropic (people who use it very skillfully) almost always do the following:

  • Connect via SSH

  • Manage Claude sessions using tmux

  • Check out the same repository multiple times and run multiple Claudes in parallel

  • Use Git worktree to separate tasks while working

It still takes a bit of effort, but it is now possible to run multiple Claudes simultaneously for parallel work. Since you can run many Claudes in a single repository at the same time, the amount of work you can get done increases significantly. We are currently working on improvements to make using multiple instances simultaneously even easier.


↓ Please come by. Let's talk.

n9d3f08d86730



For those who found this presentation difficult, I've created a cheat sheet.


同じカテゴリの記事

東條 淳平

スポーツと芸能が交差する話題を担当。大会公式記録と所属先の発表を突き合わせ、数字は必ず出典付きで扱います。

おすすめの関連記事