ポッドキャストに戻るClaude
Claude Code 101
最初の Claude Code プロンプト
You talk to Claude Code like you would talk to any AI assistant.
Claude Code との対話は、他の AI アシスタントと話すのと同じように行えます。
When entering your prompt, here are some things that you can consider that can both protect and make things easier for you.
プロンプトを入力する際、保護にもなり便利にもなる、いくつかの点を考慮することができます。
You can choose whether Claude auto accepts every file change it suggests or require it to ask you for explicit permission each time.
Claude が提案するすべてのファイル変更を自動的に承認させるか、毎回明示的な許可を求めるかを選択できます。
With shift plus tab, you can cycle between both modes.
shift+tab を使うと、2 つのモードを切り替えることができます。
In auto accept mode, it will automatically approve an edit or creation of a file, but ask your permission to run commands.
auto-accept モードでは、ファイルの編集や作成は自動的に承認されますが、コマンドの実行には許可を求めます。
There isn't a right or wrong way.
正しいやり方も間違ったやり方もありません。
It's just whatever you feel the most comfortable with.
あなたが最も快適に感じる方法で構いません。
Within this shift tab menu is the plan mode.
この shift+tab メニューの中に plan mode があります。
Plan mode takes your prompt and uses read-only tools to analyze your code base and do research on your suggested implementation.
plan mode はプロンプトを受け取り、読み取り専用ツールを使ってコードベースを分析し、提案した実装についてリサーチを行います。
It will also ask you questions on items that it wants clarification on.
また、明確化が必要な項目についてあなたに質問することもあります。
It then returns to you a long detailed plan that it can execute on in more detail.
その後、より詳細に実行できる長い詳細計画を返してくれます。
Plan mode works great for planning complex changes or doing a safe code review.
plan mode は複雑な変更の計画や安全なコードレビューに最適です。
A lot of the time you're asking Claude to do multi-step implementations towards a feature and this is exactly what plan mode excels at.
多くの場合、ある機能に向けてマルチステップの実装を Claude に依頼することがありますが、これはまさに plan mode が得意とするところです。
So, why don't we give it a try?
では、試してみましょうか?
I have an application here that desperately needs a dark mode toggle.
ここに、ダークモードの切り替え機能がどうしても必要なアプリケーションがあります。
So, I'm going to use Claude Code to implement this for me.
そこで、Claude Code を使ってこれを実装してもらいます。
So, I'm in the root directory of my project and I'm going to hit the shift tab a couple times to go into plan mode.
今、プロジェクトのルートディレクトリにいますので、shift+tab を何回か押して plan mode に入ります。
Then, let's write out the prompt.
それでは、プロンプトを書きましょう。
My app needs a dark mode implemented across the entire app.
アプリ全体にダークモードを実装する必要があります。
Can you create a toggle switch on the header that allows user to toggle between light mode and dark mode?
ユーザーがライトモードとダークモードを切り替えられるトグルスイッチをヘッダーに作成してもらえますか?
I need you to find a good contrast color that works based on my existing light
既存のライト
And let's let Claude plan this out.
Claude に計画を立ててもらいましょう。
And after reviewing, I think it looks pretty good.
レビュー後、かなり良さそうだと思います。
At the end of all this, we can see explicitly what Claude did and how it came to its conclusion.
これらすべての最後に、Claude が何をしてどのように結論に至ったかを明確に確認することができます。
And the dark mode is looking pretty good.
ダークモードはかなり良さそうです。
When using Claude Code, try to be as descriptive as possible with your prompt.
Claude Code を使用する際は、プロンプトをできるだけ詳細に記述するようにしましょう。
If you want to stay in the loop at every step, you can do that.
すべてのステップで関与し続けたい場合は、そうすることができます。
Use plan mode to let Claude get a little bit more in the nitty-gritty with what you want to achieve before executing on that plan.
plan mode を使って、計画を実行する前に Claude に達成したいことをより細かく把握させましょう。