health
Gemini CLIの設定に問題があり、指示無視や動作不安定な場合に、その設定を監査し深刻度別に問題を特定するSkill。
📜 元の英語説明(参考)
Audits the full six-layer Gemini CLI config stack when Gemini ignores instructions, behaves inconsistently, hooks malfunction, or MCP servers need auditing. Flags issues by severity. Not for debugging code or reviewing PRs.
🇯🇵 日本人クリエイター向け解説
Gemini CLIの設定に問題があり、指示無視や動作不安定な場合に、その設定を監査し深刻度別に問題を特定するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
🥷
ヘルス: 6層スタックの監査
現在のプロジェクトのGemini CLIセットアップを、以下の6層フレームワークと照合して監査してください。
GEMINI.md → rules → skills → hooks → subagents → verifiers
違反を見つけてください。不整合な層を特定してください。プロジェクトの複雑さに合わせてのみ調整してください。
出力言語: 以下の順序で確認してください。(1) GEMINI.mdの## Communicationルール(ローカルよりもグローバルが優先されます)、(2) ユーザーの最近の言語、(3) 英語。
ステップ0: プロジェクトの階層を評価する
1つ選択してください。その階層の要件のみを適用してください。
| 階層 | シグナル | 期待されること |
|---|---|---|
| シンプル | 500ファイル未満、貢献者1人、CIなし | GEMINI.mdのみ。スキル0-1個。フックはオプション。 |
| 標準 | 500-5Kファイル、小規模チームまたはCI | GEMINI.md + ルール1-2個。スキル2-4個。基本的なフック。 |
| 複雑 | 5Kファイル超、複数貢献者、アクティブなCI | 完全な6層セットアップが必要。 |
ステップ1: データを収集する
収集スクリプトを実行してください。まだ解釈しないでください。
bash "${GEMINI_SKILL_DIR:-$HOME/.agents/skills/health}/scripts/collect-data.sh"
ツールが不足している場合、セクションが(unavailable)と表示されることがあります。
jqがない場合 → 会話セクションが利用できませんpython3がない場合 → MCP/hooks/allowedToolsセクションが利用できませんsettings.local.jsonがない場合 → hooks/MCPが利用できないことがあります(グローバルのみのセットアップでは正常です)
(unavailable)は、発見ではなく、データ不足として扱ってください。それらの領域をフラグ付けしないでください。
ステップ1b: MCPライブチェック
すべてのMCPサーバーをテストしてください。サーバーごとに1つの無害なツールを呼び出してください。エラーの詳細とともにlive=yes/noを記録してください。enabled: falseを尊重してください(フラグ付けせずにスキップしてください)。APIキーについては、環境変数が設定されているかのみを確認してください(echo $VAR | head -c 5)。完全なキーは決して出力しないでください。
ステップ2: 分析する
階層を確認してください。その後、ルーティングしてください。
- シンプル: ローカルで分析してください。サブエージェントは使用しません。
- 標準/複雑: 2つのサブエージェントを並行して起動してください。資格情報は
[REDACTED]に編集してください。- エージェント1 (コンテキスト + セキュリティ):
agents/inspector-context.mdを読んでください。CONVERSATION SIGNALSセクションをフィードしてください。 - エージェント2 (コントロール + 動作):
agents/inspector-control.mdを読んでください。検出された階層をフィードしてください。
- エージェント1 (コンテキスト + セキュリティ):
- フォールバック: サブエージェントが失敗した場合、その層をローカルで分析し、「(analyzed locally)」とメモしてください。
ステップ3: レポートする
ヘルスレポート: {プロジェクト} ({階層}階層、{ファイル数}ファイル)
[PASS] 合格したチェック(表、最大5行)
発見の形式
- [severity] <症状> ({ファイル}:{行}、不明な場合を除く)
理由: <1行の理由>
アクション: <修正するための正確なコマンドまたは編集>
Action:はコピー&ペースト可能でなければなりません。「Xを調査する」や「Yを検討する」とは決して書かないでください。修正が不明な場合は、診断コマンド名を記述してください。
[!] 致命的 -- 今すぐ修正
ルール違反、危険なallowedTools、MCPオーバーヘッドが12.5%を超える、セキュリティ上の発見、漏洩した資格情報。
例:
- [!]
settings.local.jsonがgitにコミットされている(MCPトークンを公開しています) 理由: 漏洩したトークンにより、インストールされたMCPサーバーを介したリモートコード実行が可能になります アクション:git rm --cached .gemini/settings.local.json && echo '.gemini/settings.local.json' >> .gitignore
[~] 構造的 -- 近日中に修正
GEMINI.mdのコンテンツが間違った層にある、フックの欠落、過大な説明、検証者のギャップ。
[-] 段階的 -- あると良いもの
古い項目、グローバルとローカルの配置、コンテキストの衛生、古いallowedToolsエントリ。
問題がない場合: すべての関連するチェックが合格しました。修正すべき点はありません。
非目標
- 確認なしに修正を自動適用することは決してありません。
- 複雑な階層のチェックをシンプルなプロジェクトに適用することは決してありません。
落とし穴
| 何が起こったか | ルール |
|---|---|
| ローカルオーバーライドを見逃した | settings.local.jsonも常に読んでください。コミットされたファイルをシャドウします。 |
| サブエージェントのタイムアウトがMCP障害として報告された | MCP障害はライブプローブから発生し、データ収集からは発生しません。 |
| 間違った言語で問題が報告された | まずGEMINI.mdのCommunicationルールを尊重してください。 |
| 意図的にノイズの多いフックを壊れているとフラグ付けした | フックを「壊れている」と呼ぶ前に尋ねてください。 |
| フックが発火していないように見えたが、実際には発火していた -- 後続のUI要素がその上にレンダリングされた | フックの発火順序は視覚的な順序ではありません。フックの設定を再編集する前に、(a) --debugで確認するか、出力をパイプで確認し、(b) 差分ダイアログ、許可プロンプト、またはその他のUI要素が上にレンダリングされてフックの出力が画面外に押し出されていないか確認し、(c) その後初めてフック自体を疑ってください。 |
デザインシステム監査
以下の状況でアクティブ化してください: 「フォントが読み込まれない」、「スタイルの一貫性がない」、「デザインシステムトークン」、または視覚的なレンダリングのバグ
確認事項:
- フォントスタック: @font-faceパス、ファイルの存在、CORSヘッダー
- トークンのずれ: デザインシステムトークンを参照すべきハードコードされた値
- フォールバックチェーン: ターゲットプラットフォームにフォントが存在するか
- CSS変数: デザインシステムをバイパスするインラインスタイル
Action:行とともに発見事項を報告し、修正を適用する前に尋ねてください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Health: Audit the Six-Layer Stack
Prefix your first line with 🥷 inline, not as its own paragraph.
Audit the current project's Gemini CLI setup against the six-layer framework:
GEMINI.md → rules → skills → hooks → subagents → verifiers
Find violations. Identify the misaligned layer. Calibrate to project complexity only.
Output language: Check in order: (1) GEMINI.md ## Communication rule (global over local); (2) user's recent language; (3) English.
Step 0: Assess project tier
Pick one. Apply only that tier's requirements.
| Tier | Signal | What's expected |
|---|---|---|
| Simple | <500 files, 1 contributor, no CI | GEMINI.md only; 0-1 skills; hooks optional |
| Standard | 500-5K files, small team or CI | GEMINI.md + 1-2 rules; 2-4 skills; basic hooks |
| Complex | >5K files, multi-contributor, active CI | Full six-layer setup required |
Step 1: Collect data
Run the collection script. Do not interpret yet.
bash "${GEMINI_SKILL_DIR:-$HOME/.agents/skills/health}/scripts/collect-data.sh"
Sections may show (unavailable) when tools are missing:
jqmissing → conversation sections unavailablepython3missing → MCP/hooks/allowedTools sections unavailablesettings.local.jsonabsent → hooks/MCP may be unavailable (normal for global-only setups)
Treat (unavailable) as insufficient data, not a finding. Do not flag those areas.
Step 1b: MCP Live Check
Test every MCP server: call one harmless tool per server. Record live=yes/no with error detail. Respect enabled: false (skip without flagging). For API keys, only check if the env var is set (echo $VAR | head -c 5), never print full keys.
Step 2: Analyze
Confirm the tier. Then route:
- Simple: Analyze locally. No subagents.
- Standard/Complex: Launch two subagents in parallel. Redact credentials to
[REDACTED].- Agent 1 (Context + Security): Read
agents/inspector-context.md. FeedCONVERSATION SIGNALSsection. - Agent 2 (Control + Behavior): Read
agents/inspector-control.md. Feed detected tier.
- Agent 1 (Context + Security): Read
- Fallback: If a subagent fails, analyze that layer locally and note "(analyzed locally)".
Step 3: Report
Health Report: {project} ({tier} tier, {file_count} files)
[PASS] Passing checks (table, max 5 rows)
Finding format
- [severity] <symptom> ({file}:{line} if known)
Why: <one-line reason>
Action: <exact command or edit to fix>
Action: must be copy-pasteable. Never write "investigate X" or "consider Y". If the fix is unknown, name the diagnostic command.
[!] Critical -- fix now
Rules violated, dangerous allowedTools, MCP overhead >12.5%, security findings, leaked credentials.
Example:
- [!]
settings.local.jsoncommitted to git (exposes MCP tokens) Why: leaked token enables remote code execution via installed MCP servers Action:git rm --cached .gemini/settings.local.json && echo '.gemini/settings.local.json' >> .gitignore
[~] Structural -- fix soon
GEMINI.md content in wrong layer, missing hooks, oversized descriptions, verifier gaps.
[-] Incremental -- nice to have
Outdated items, global vs local placement, context hygiene, stale allowedTools entries.
If no issues: All relevant checks passed. Nothing to fix.
Non-goals
- Never auto-apply fixes without confirmation.
- Never apply complex-tier checks to simple projects.
Gotchas
| What happened | Rule |
|---|---|
| Missed the local override | Always read settings.local.json too; it shadows the committed file |
| Subagent timeout reported as MCP failure | MCP failures come from the live probe, not data collection |
| Reported issues in wrong language | Honor GEMINI.md Communication rule first |
| Flagged intentionally noisy hook as broken | Ask before calling a hook "broken" |
| Hook seemed not to fire, but it did -- a later UI element rendered above it | Hook firing order is not visual order. Before re-editing the hook config: (a) confirm with --debug or by piping output, (b) check whether a diff dialog, permission prompt, or other UI element rendered on top and pushed the hook output offscreen, (c) only then suspect the hook itself. |
Design System Audit
Activate when: "font not loading", "style inconsistency", "design tokens", or visual rendering bugs
Check:
- Font stack: @font-face paths, file existence, CORS headers
- Token drift: Hardcoded values that should reference design tokens
- Fallback chain: Fonts exist on target platform
- CSS variables: Inline styles bypassing the design system
Report findings with Action: lines, then ask before applying any fix.