---
title: "CLAUDE CODE の MOD は、あなたが目にする前に API キーを読み取り、コマンドを承認できる"
url: "https://claudemods.dev/ja/builds/a-claude-code-mod-can-read-your-api-keys-and-approve-command-be0b39"
source: "https://x.com/i/status/2109972738605539573"
source_type: "resource"
author: "Yaori"
author_handle: "Pashoke1"
stars: 0
category: "セキュリティ・プライバシー"
categories: ["security"]
tags: ["hooks", "permissions", "plugins", "sandboxing", "supply-chain", "validation"]
permission_level: null
scan_complete: false
added: "2026-10-16T02:02:55.750Z"
updated: "2026-10-13T11:41:16.000Z"
locale: "ja"
content_locale: "ja"
---

# CLAUDE CODE の MOD は、あなたが目にする前に API キーを読み取り、コマンドを承認できる

CLAUDE CODE の MOD は、あなたが目にする前に API キーを読み取り、コマンドを承認できる。30 秒で確認する方法はこちら。

## Description

理論ではありません。Anthropic 自身の MOD ページに書かれています。

MOD が一度ロードされると、次のことができます：

→ あなたのユーザーアカウントがアクセスできる任意の場所でファイルを読み書きする
→ 環境変数と設定ファイルを読み取る。API キーも含む
→ あなたが送信するすべてのプロンプトと Claude が行うすべてのツール呼び出しを見る
→ プロンプトやツール呼び出しを書き換える
→ あなたが尋ねられる前にツール呼び出しを承認する
→ モデルを呼び出してあなたの使用量を消費する

MOD はサンドボックス化もされていません。サンドボックス化は Claude が実行する Bash コマンドを隔離します。MOD が起動するプロセスはその外側で実行されます。

MOD が触れられない唯一のものは許可プロンプトです。それはそのプロンプトがあなたに表示する内容を変更できません。

ですから、見知らぬ人から何かをインストールする前の 30 秒チェックはこちらです：

01. ファイルを実行せずに取得する

git clone リポジトリ。まだインストールしないでください。

02. バリデータを実行する

claude plugin validate ./the-mod

コードを実行せずに読み取り、MOD が何をするかを正確に教えてくれます。

03. "hooks:" 行を読む

それがリッスンするイベント。テーマは何かを描画するはずです。テーマがすべてのツール呼び出しもフックするなら、理由を尋ねてください。

04. "calls:" 行を読む

それが Claude Code に求めるすべて。スキンが http.fetch を呼び出すのは危険信号です。コストトラッカーが自分のフォルダ外にファイルを書き込むのは危険信号です。モデルを呼び出すものはあなたの使用量を消費しています。

05. "env reads:" を探す

MOD が環境変数を読み取る場合、バリデータはその行を出力します。タイマーがあなたのキーを読む理由はありません。

06. 必要になる前にブレーキを知る

→ 1 つの MOD：/plugin、Installed タブ、それを無効にする
→ インストールしたすべての MOD、1 セッション：claude --safe-mode
→ インストールしたすべての MOD、毎セッション：~/.claude/settings.json の "disableAllHooks": true（これは設定フックとカスタムステータスラインも停止します）

自分でガード MOD を書く場合のもう 1 つの罠：スローするフックはスキップされ、それが止めるはずだったコマンドはとにかく実行されます。すべてのガードに .catch を与え、実際にブロックすることをテストしてください。

Claude があなたのために書く MOD にとっての良いニュース：それらはホットリロードを承認した後にのみロードされ、あなたが信頼したワークスペースでのみロードされ、誰もイエスと言えない claude -p では決してロードされません。

MOD は Claude Code に長い間起きた中で最高のものです。ただ、それらをあなたとして実行されるブラウザ拡張機能のように扱ってください。なぜなら、それが実際そうだからです。

完全な安全セクション、インストール順序、すべてのコマンドは以下の記事にあります。

## Original README

A CLAUDE CODE MOD CAN READ YOUR API KEYS AND APPROVE COMMANDS BEFORE YOU SEE THEM. HERE'S HOW TO CHECK ONE IN 30 SECONDS.

not a theory. it's written on Anthropic's own mods page.

once a mod loads, it can:

→ read and write files anywhere your user account can
→ read your environment variables and settings files, API keys included
→ see every prompt you send and every tool call Claude makes
→ rewrite a prompt or a tool call
→ approve a tool call before you're asked
→ spend your usage by calling a model

mods aren't sandboxed either. sandboxing isolates the Bash commands Claude runs. a process a mod starts runs outside it.

the one thing a mod can't touch is the permission prompt. it can't change what that prompt shows you.

so here's the 30-second check before installing anything from a stranger:

01. get the files without running them

git clone the repo. don't install yet.

02. run the validator

claude plugin validate ./the-mod

it reads the code without running it and tells you exactly what the mod does.

03. read the "hooks:" line

the events it listens to. a theme should be drawing things. if a theme also hooks every tool call, ask why.

04. read the "calls:" line

everything it asks Claude Code to do. a skin calling http.fetch is a red flag. a cost tracker writing files outside its own folder is a red flag. anything calling a model is spending your usage.

05. look for "env reads:"

if the mod reads environment variables, the validator prints that line. a timer has no reason to read your keys.

06. know your brakes before you need them

→ one mod: /plugin, Installed tab, disable it
→ every mod you installed, one session: claude --safe-mode
→ every mod you installed, every session: "disableAllHooks": true in ~/.claude/settings.json (this also stops your settings hooks and custom status line)

one more trap if you write your own guard mod: a hook that throws gets skipped, and the command it was meant to stop runs anyway. give every guard a .catch and test that it actually blocks.

good news for the mods Claude writes for you: they only load after you approve hot reload, only in a workspace you've trusted, and never in claude -p where nobody can say yes.

mods are the best thing to happen to Claude Code in a long time. just treat them like browser extensions that run as you, because that's what they are.

the full safety section, the install order and every command are in the article below.
