機能深掘り

Claude Code の権限:どのツールが確認してくるのか、許可を保存するには

Claude Code の作業はすべて決まり切った組み込みツール経由で、一部は実行前に必ず止まって聞いてきます。実際のセッション 1 回分の権限プロンプトを、許可リストを書き出す選択肢まで含めて、スクリーンショット順に解説します。

Claude Code Bash command approval for git add src/app/globals.css offering Yes, Yes and do not ask again for git add commands in the project directory, and No with feedback
git add に対する Claude Code の承認プロンプト。2 番目を選ぶと、このプロジェクト用の許可リストが作られます。

全 13 ステップの図解ウォークスルーで、読了約 5 分。各ステップはソース動画の対応する瞬間へリンクしています。

要点

Claude Code は組み込みツールで仕事をします——ファイルを読む Read、1 ファイルを直す Edit、コマンドを打つ Bash——プロンプトでツール名を指定する必要は一切ありません。Anthropic のドキュメントには各ツールに Permission Required の印が付いていて、Read・Grep・LS・TodoWrite は黙って走り、Bash・Edit・MultiEdit・Write・Web 系は止まって聞きます。編集プロンプトの答えは 3 つだけ:Yes、Yes and don't ask again this session(alt+m)、No + 直してほしい内容。Bash コマンドを「今後聞かない」で承認すると、Bash(git add:*) のようなルールが .claude/settings.local.json の permissions.allow に保存されます。このファイルは個人用なのでコミットしません。セッション中まとめて確認を止めたければ、alt+m で accept edits モードに切り替えます。

ソース動画

このページは Net Ninja の Claude Code シリーズ第 4 課に沿って、組み込みツールと権限プロンプトを実セッション 1 回分で順に追っています。各スクリーンショットは映っている正確な瞬間へリンクしています。

スクリーンショットは動画のフレームを制作者へのクレジット付きで使用しています。本文は独自執筆です。手順は 2026 年 9 月に動画と照合済みです。

Claude Code が最初から持っているツール

決まった組み込みツール群と、どれが先に聞くかを示すドキュメントの列。

  1. 1

    Anthropic のツール一覧に「許可が必要か」の列がある

    何も打つ前から、Claude Code には組み込みツールが揃っています。ファイルを開く Read、1 ファイルを直す Edit、コマンドを実行する Bash、作業中にチェックリストを描く TodoWrite など。Claude Code の設定ドキュメントには Permission Required という列があり、Bash・Edit・MultiEdit・NotebookEdit・Write・WebFetch・WebSearch が Yes、Read・Glob・Grep・LS・NotebookRead・Task・TodoWrite が No です。同じページに「許可ルールは /allowed-tools か permission settings で設定できる」とも書かれています。

    Anthropic Claude Code settings documentation listing every built-in tool with a Permission Required column that marks Bash, Edit, MultiEdit and Write as Yes while Read, Grep, LS and TodoWrite are No
    Bash と Edit は許可が必要、Read は不要。1:19 から視聴
  2. 2

    読み取りは素通り、編集はそこで止まる

    違いは 1 画面で分かります。Claude Code は layout.tsx を 43 行読んだだけで何も聞きませんでした。続けて同じファイルに Update をかけた瞬間、「Do you want to make this edit to layout.tsx?」で停止します。左のエディタにはすでに diff が開いているので、承認する前に中身をちゃんと読める状態です。

    Claude Code terminal inside VS Code where a Read of layout.tsx completed silently and the Update call right below it paused on a Do you want to make this edit to layout.tsx prompt
    Read は静かに完了、Update は返事待ち。0:46 から視聴

ファイル編集を 1 回ずつ承認する

1 つの CSS ファイルに 1 つ足しただけで、確認は 3 回出ました。

  1. 3

    編集が必ずつう依頼をする

    実演はテーマ変数を 1 つ足す依頼です:「@src/app/globals.css Add another theme variable to the CSS file called highlight, and make it a pastel yellow」。@ での参照でファイルがコンテキストに入り、Claude Code は 66 行を全部読んで(確認なし)から考え始めます。

    Claude Code prompt that @-mentions src/app/globals.css to add a highlight theme variable in pastel yellow, answered by a Read of 66 lines and a Pontificating status line
    @ 参照でファイルを用意、読み取りは無料。2:02 から視聴
  2. 4

    編集プロンプトの答えは 3 つ

    「Do you want to make this edit to globals.css?」の出せる選択肢は 1. Yes、2. Yes, and don't ask again this session (alt+m)、3. No, and tell Claude what to do differently (esc) の 3 つだけ。追加予定の --highlight: #fef3c7 はエディタ側にすでに表示され、ボックスには「Visual Studio Code で変更を開いた」旨と「Save file to continue...」も出ています。作者はここであえて素の Yes を選び、この後の流れを見せてくれます。

    Claude Code edit permission dialog for globals.css offering Yes, Yes and do not ask again this session with the alt+m shortcut, and No with an explanation, beside a diff adding --highlight: #fef3c7
    承認、このセッションは承認、拒否して指示。2:23 から視聴
  3. 5

    同じファイルで 2 回目の承認

    1 つ目が反映されて「Updated src/app/globals.css with 1 addition」と出た後、Claude Code は同じファイルの別の箇所へ移動するので、また聞いてきます。ここが意外に感じられる点です。許可はファイル単位ではなく編集単位で出ます。ライトモードの変数はすでに入り、ダークモードの方はプロンプトの後ろで待っている状態です。

    Second Claude Code approval request for the same globals.css file, showing the light-mode highlight already applied and the dark-mode variable still waiting for permission
    同じファイル内の新しい塊は、新しい確認とセット。2:38 から視聴
  4. 6

    小さな変更 1 件に承認 3 回

    3 回目を承認すると --color-highlight: var(--highlight) の対応付けも入り、Claude Code は作業内容を要約します。ライトモード #fef3c7、ダークモード #fbbf24 のパステルイエローで、テーマ節に対応する対応付けも追加済み、と。CSS 変数 1 つに yes を 3 回——許可リストが解消したいのはまさにこの摩擦です。

    Claude Code terminal after three separate approvals on one file, listing the added --color-highlight token mapping and summarising the pastel yellow values for light and dark mode
    yes 三回、CSS 変数一個。2:56 から視聴

Bash コマンドをプロジェクト用に許可する

Bash プロンプトの 2 番目を選ぶと、settings.local.json が自動で作られます。

  1. 7

    Bash はリポジトリを見る限り聞いてこない

    次の依頼は単純に「can you make a commit」。Claude Code は Bash を 3 回連続で呼びます——git status、git diff、git log --oneline -5——いずれも承認では止まらず、結果は「ctrl+r to expand」で折りたたまれています。触る前に何が変わったかを集めているわけで、この読み取り専用の Bash 呼び出しは今回のセッションでは確認を 1 つも消費していません。

    Claude Code Bash tool running git status, git diff and git log one after another with no approval prompt after a request to make a commit, each result collapsed behind ctrl+r to expand
    status、diff、log はそのまま走り切る。3:13 から視聴
  2. 8

    許可リストを書き出しているのはこのプロンプト

    続いて git add src/app/globals.css を実行しようとしたところで、今度は聞かれます。ボックスにはコマンド本体と、Claude が付けた 1 行の説明(「Stage the globals.css file with highlight theme variable」)、そして 1. Yes、2. Yes, and don't ask again for git add commands in D:\tutorials\sandbox\@claude\shinobi、3. No, and tell Claude what to do differently (esc)。2 番目の具体的さに注目です。コマンド名もプロジェクトのフォルダも、選択肢の文言そのものに書かれています。

    Claude Code Bash command approval for git add src/app/globals.css whose second option reads Yes, and do not ask again for git add commands in the project directory
    「このプロジェクトでは git add を今後聞かない」。3:26 から視聴
  3. 9

    ルールはその場で有効になる

    2 番目を選ぶとコマンドは即実行され、許可は同じセッション内で効き始めます。git add は Git 自身の CRLF 警告だけを残して完了。次に控えていた git commit は、やはり単独で「Do you want to proceed?」を出します——新しいルールは git add だけを対象にしていて、他には及びません。

    Claude Code terminal where the just-allowed git add command has already run and only the following git commit still needs a Do you want to proceed answer
    git add は許可済み、git commit はまだ聞く。3:34 から視聴
  4. 10

    その許可はどれに書かれたのか

    「今後聞かない」を選ぶと、プロジェクト直下に .claude/settings.local.json が作られます——エクスプローラーで、変更済みとして表示されている globals.css の隣に見えます。事前にテンプレートを置く必要も設定する必要もなく、恒久的な許可を出した瞬間にファイルが現れて、エディタがそのまま開いてくれます。

    VS Code explorer showing the .claude folder Claude Code created at the project root containing settings.local.json, next to a globals.css marked as modified
    .claude/settings.local.json は Claude Code 側が生成する。3:40 から視聴
  5. 11

    allow 配列をキーごとに読む

    中身はごく小さいです。permissions というオブジェクトに allow、deny、ask の 3 つの配列。Claude Code が書き込んだルールは文字列 'Bash(git add:*)'——ツール名、コマンドの接頭辞、続けてコロンとアスタリスクで「この後は何でも」という意味です。空の deny と ask は同じ仕組みを逆方向に使ったものです。手で項目を足すこともできます。ダイアログは単に素早く打つための近道で、作者の言う通りリストは自分が編集して構わないものです。

    settings.local.json in Claude Code with a permissions object whose allow array holds the rule Bash(git add:*), shown alongside empty deny and ask arrays
    permissions.allow に Bash(git add:*) が入る。4:10 から視聴

accept edits モード

セッション中は確認を止めて、使い終わったら戻す。

  1. 12

    セッション中の確認をまとめて止める

    聞かれないようにする 3 つ目の方法は、ルールではなくモードです。alt+m(Windows。作者の話では Mac では ctrl+m の可能性あり)を押すと、入力ボックスの下にある表示が光ります:「accept edits on (alt+m to cycle)」。この瞬間から、このチャットでのファイル編集は確認なしに進みます。有効範囲はセッション内で、新しいセッションを開けばまた聞かれます。「to cycle」とある通り、alt+m は単一のスイッチを切り替えるのではなくモードを順に回します。

    Claude Code input area displaying the highlighted accept edits on indicator with alt+m to cycle, meaning further file edits in this session run without permission prompts
    プロンプト下に「accept edits on (alt+m to cycle)」。4:22 から視聴
  2. 13

    もう一度回して確認に戻る

    alt+m をもう一度押すと入力欄から表示が消え、編集が 1 回ずつの承認に戻ったことが分かります。許可リストは影響を受けません——settings.local.json の Bash(git add:*) はそのまま残り、次回セッションでも有効です。

    Claude Code prompt box with the accept edits indicator gone after cycling the mode again, so file edits return to per-change approval
    表示が消えれば、確認も戻る。4:42 から視聴

よくある質問