Communitygithub.com

HUD スキル

OMC HUD(ヘッドアップディスプレイ)の表示レイアウト、プリセット、表示要素を設定します。

HUD スキル とは?

このスキルは、Claude Code 上で動作する OMC(Oh My Claude Code)プラグインの一部であり、ステータスラインに表示される HUD(ヘッドアップディスプレイ)の設定と管理を行います。ユーザーは「minimal」「focused(デフォルト)」「full」の3つのプリセットから選択でき、さらに各表示要素(Ralph ループ進捗、PRD ストーリー、コンテキスト使用率、エージェント数、バックグラウンドタスク、Todo 完了率など)を個別に ON/OFF できます。自動セットアップ機能により、必要なスクリプトファイルと設定を生成し、スムーズに導入できます。また、実行中のサブエージェントの詳細を複数行で表示するマルチライン表示や、カラーコードによる警告表示(コンテキスト使用率が70%以上で黄色、85%以上で赤)など、開発ワークフローを可視化する豊富な機能を提供します。Windows と Unix 両方のパス形式に対応し、セーフモードによる ANSI コード除去など、ターミナル環境の互換性にも配慮されています。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode/tree/main/skills/hud

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

HUD スキル は何をしますか?

OMC HUD(ヘッドアップディスプレイ)をステータスラインに設定します。

注意: このガイド内の ~/.claude/... パスは、環境変数 CLAUDE_CONFIG_DIR が設定されている場合、その値が尊重されます。

クイックコマンド

コマンド説明
/oh-my-claudecode:hud現在の HUD ステータスを表示(必要に応じて自動セットアップ)
/oh-my-claudecode:hud setupHUD ステータスラインをインストール/修復
/oh-my-claudecode:hud minimal最小表示に切り替え
/oh-my-claudecode:hud focusedフォーカス表示に切り替え(デフォルト)
/oh-my-claudecode:hud fullフル表示に切り替え
/oh-my-claudecode:hud status詳細な HUD ステータスを表示

自動セットアップ

/oh-my-claudecode:hud または /oh-my-claudecode:hud setup を実行すると、システムは自動的に以下を行います:

  1. ~/.claude/hud/omc-hud.mjs が存在するか確認
  2. ~/.claude/settings.json に statusLine が設定されているか確認
  3. 不足している場合、HUD ラッパースクリプトを作成し設定を構成
  4. ステータスを報告し、変更があった場合は Claude Code の再起動を促す

重要: 引数が setup の場合、または ~/.claude/hud/omc-hud.mjs に HUD スクリプトが存在しない場合は、以下の手順に従って HUD ファイルを直接作成する必要があります。

セットアップ手順(以下のコマンドを実行)

ステップ1: セットアップが必要か確認:

node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR||p.join(require('os').homedir(),'.claude');console.log(f.existsSync(p.join(d,'hud','omc-hud.mjs'))?'EXISTS':'MISSING')"

ステップ2: プラグインがインストールされているか確認:

node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR||p.join(require('os').homedir(),'.claude'),b=p.join(d,'plugins','cache','omc','oh-my-claudecode');try{const v=f.readdirSync(b).filter(x=>/^\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));if(v.length===0){console.log('Plugin not installed - run: /plugin install oh-my-claudecode');process.exit()}const l=v[v.length-1],h=p.join(b,l,'dist','hud','index.js');console.log('Version:',l);console.log(f.existsSync(h)?'READY':'NOT_FOUND - try reinstalling: /plugin install oh-my-claudecode')}catch{console.log('Plugin not installed - run: /plugin install oh-my-claudecode')}"

ステップ3: omc-hud.mjs が MISSING の場合、または引数が setup の場合、正規テンプレートから HUD ラッパーとその依存関係をインストール:

HUD_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud"
mkdir -p "$HUD_DIR/lib"
cp "${CLAUDE_PLUGIN_ROOT}/scripts/lib/hud-wrapper-template.txt" "$HUD_DIR/omc-hud.mjs"
cp "${CLAUDE_PLUGIN_ROOT}/scripts/lib/config-dir.mjs" "$HUD_DIR/lib/config-dir.mjs"

重要: 必ず scripts/lib/hud-wrapper-template.txt の正規テンプレートからコピーしてください。ラッパーの内容をインラインで記述しないでください。テンプレートは唯一の信頼できる情報源であり、ドリフトテスト(src/__tests__/hud-wrapper-template-sync.test.ts、src/__tests__/paths-consistency.test.ts)によって保護されています。

ステップ4: 実行可能にする(Unix のみ、Windows ではスキップ):

node -e "if(process.platform==='win32'){console.log('Skipped (Windows)')}else{require('fs').chmodSync(require('path').join(process.env.CLAUDE_CONFIG_DIR||require('path').join(require('os').homedir(),'.claude'),'hud','omc-hud.mjs'),0o755);console.log('Done')}"

ステップ5: HUD を使用するように settings.json を更新:

${CLAUDE_CONFIG_DIR:-~/.claude}/settings.json を読み取り、statusLine フィールドを更新/追加します。

重要: コマンド内で ~ を使用しないでください。Unix では $HOME を使用して、マシン間でパスを移植可能に保ちます。Windows では、Windows がシェルコマンドで ~ を展開しないため、絶対パスを使用してください。

Windows の場合は、まず正しいパスを確認:

node -e "const p=require('path').join(require('os').homedir(),'.claude','hud','omc-hud.mjs').split(require('path').sep).join('/');console.log(JSON.stringify(p))"

重要: コマンドパスはすべてのプラットフォームでフォワードスラッシュを使用する必要があります。Claude Code は bash を介して statusLine コマンドを実行するため、バックスラッシュはエスケープ文字として解釈されパスが壊れます。

次に statusLine フィールドを設定します。Unix では移植可能なままで、次のようになります:

{
  "statusLine": {
    "type": "command",
    "command": "node ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud/omc-hud.mjs"
  }
}

Windows ではパスにバックスラッシュではなくフォワードスラッシュを使用:

{
  "statusLine": {
    "type": "command",
    "command": "node C:/Users/username/.claude/hud/omc-hud.mjs"
  }
}

Edit ツールを使用して、他の設定を保持しながらこのフィールドを追加/更新します。

ステップ6: 古い HUD スクリプトがあれば削除:

node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR||p.join(require('os').homedir(),'.claude'),t=p.join(d,'hud','omc-hud.js');try{if(f.existsSync(t)){f.unlinkSync(t);console.log('Removed legacy omc-hud.js')}else{console.log('No legacy script found')}}catch{}"

ステップ7: 変更を反映するために Claude Code を再起動するようにユーザーに伝えます。

表示プリセット

Minimal(最小)

必須項目のみを表示:

[OMC] ralph | todos:2/5

Focused(フォーカス、デフォルト)

関連するすべての要素を表示:

[OMC] branch:main | ralph:3/10 | US-002 | skill:planner | ctx:67% | agents:2 | bg:3/5 | todos:2/5

Full(フル)

エージェントの詳細を複数行で表示:

[OMC] repo:oh-my-claudecode branch:main | ralph:3/10 | US-002 (2/5) | ctx:[████░░]67% | agents:3 | bg:3/5 | todos:2/5
├─ O architect    2m   analyzing architecture patterns...
├─ e explore     45s   searching for test files
└─ s executor     1m   implementing validation logic

マルチラインエージェント表示

エージェント実行中、HUD は各行に詳細情報を表示:

  • ツリー文字(├─、└─)は視覚的な階層を示す
  • エージェントコード(O、e、s)はモデルティアカラーでエージェントタイプを示す
  • 実行時間は各エージェントの稼働時間を示す
  • 説明は各エージェントの実行内容を示す(最大45文字)

表示要素

要素説明
[OMC]モード識別子
repo:nameGit リポジトリ名(シアン)
branch:nameGit ブランチ名(シアン)
ralph:3/10Ralph ループ反復/最大
US-002現在の PRD ストーリー ID
skill:name最後にアクティブ化されたスキル(シアン)
ctx:67%コンテキストウィンドウ使用率
agents:2実行中のサブエージェント数
bg:3/5バックグラウンドタスクスロット
todos:2/5Todo 完了率

カラーコード

  • 緑: 正常/健全
  • 黄: 警告(コンテキスト >70%、ralph >7)
  • 赤: 重大(コンテキスト >85%、ralph が最大)

設定場所

HUD 設定は ~/.claude/settings.json の omcHud キー(または CLAUDE_CONFIG_DIR が設定されている場合はカスタム設定ディレクトリ)に保存されます。

旧設定場所(非推奨): ~/.claude/.omc/hud-config.json

手動設定

設定ファイルを手動で編集できます。各オプションは個別に設定でき、設定されていない値はデフォルト値が使用されます。

{
  "preset": "focused",
  "elements": {
    "omcLabel": true,
    "updateNotification": true,
    "ralph": true,
    "autopilot": true,
    "prdStory": true,
    "activeSkills": true,
    "lastSkill": true,
    "contextBar": true,
    "agents": true,
    "agentsFormat": "multiline",
    "backgroundTasks": true,
    "todos": true,
    "thinking": true,
    "thinkingFormat": "text",
    "permissionStatus": false,
    "apiKeySource": false,
    "profile": true,
    "promptTime": true,
    "sessionHealth": true,
    "useBars": true,
    "showCallCounts": true,
    "callCountsFormat": "auto",
    "safeMode": true,
    "maxOutputLines": 4
  },
  "thresholds": {
    "contextWarning": 70,
    "contextCompactSuggestion": 80,
    "contextCritical": 85,
    "ralphWarning": 7
  },
  "staleTaskThresholdMinutes": 30,
  "contextLimitWarning": {
    "threshold": 80,
    "autoCompact": false
  }
}

callCountsFormat

コールカウントバッジアイコンのスタイルを制御:

  • "auto"(デフォルト): macOS/Linux では絵文字、Windows/WSL では ASCII
  • "emoji": 強制的に 🔧 🤖 ⚡
  • "ascii": 強制的に T: A: S:

safeMode

safeMode が true(デフォルト)の場合、HUD は ANSI コードを除去し、ASCII のみの出力を使用して、同時更新時の端末レンダリングの破損を防ぎます。これは特に Windows やターミナルマルチプレクサを使用する場合に重要です。

agentsFormat オプション

  • count: agents:2
  • codes: agents:Oes(モデルティアのケーシングでタイプコード化)
  • codes-duration: agents:O(2m)es(実行時間付きコード)
  • detailed: agents:[architect(2m),explore,exec]
  • descriptions: O:analyzing code | e:searching(コード + 実行内容)
  • tasks: [analyzing code, searching...](説明のみ)
  • multiline: 各行に完全なエージェント詳細を複数行表示

トラブルシューティング

HUD が表示されない場合:

  1. /oh-my-claudecode:hud setup を実行して自動インストールと設定
  2. セットアップ完了後、Claude Code を再起動
  3. それでも動作しない場合、/oh-my-claudecode:omc-doctor を実行して完全な診断

旧文字列形式からの移行: 古い OMC バージョンでは statusLine をプレーンな文字列(例: "~/.claude/hud/omc-hud.mjs")として記述していました。最新の Claude Code(v2.1+)ではオブジェクト形式が必要です。インストーラまたは /oh-my-claudecode:hud setup を実行すると、旧形式の文字列が自動的に正しいオブジェクト形式に移行されます:

{
  "statusLine": {
    "type": "command",
    "command": "node ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hud/omc-hud.mjs"
  }
}

Node 24+ 互換性: HUD ラッパースクリプトは node:os(node:path ではなく)から homedir をインポートします。SyntaxError: The requested module 'path' does not provide an export named 'homedir' が発生した場合は、インストーラを再実行して omc-hud.mjs を再生成してください。

手動確認:

  • HUD スクリプト: ~/.claude/hud/omc-hud.mjs
  • 設定: ~/.claude/settings.json に type と command フィールドを持つオブジェクトとして statusLine が設定されていること

HUD はアクティブセッション中、約300msごとに自動更新されます。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

agent-doc-discipline

Writing-time discipline for documents agents consume (the five surfaces, specs, tickets, .omc/skills/) — every rule checkable and carrying a why, steps before reference, one meaning in one home, no restating what the environment already says. Mandatory at drydock seed generation and the launch C5 sediment pass; opt-in for any other agent-facing doc edit. The companion of minimal-code-discipline: that one disciplines code, this one disciplines papers.

ai-slop-cleaner

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

ask

Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly

ask-navigator

Shipyard

autopilot

Full autonomous execution from idea to working code

autoresearch

Stateful single-mission improvement loop with strict evaluator contract, markdown decision logs, and max-runtime stop behavior

cancel

Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state

configure-notifications

Configure notification integrations (Telegram, Discord, Slack) via natural language

debug

Diagnose the current OMC session or repo state using logs, traces, state, and focused reproduction

deepinit

Deep codebase initialization with hierarchical AGENTS.md documentation

deep-interview

Socratic deep interview with mathematical ambiguity gating before explicit execution approval

drydock

Lay the keel of the shipyard harness in any repo — the 4-pillar shared environment (Context, Rules, Tools, Standards) across 5 surfaces (CLAUDE.md, skills, design-system, mcp/cli, shared context) so that every human and agent inherits the same design language and anyone can ship. Run once per repo; re-run with --check to audit drift.

execute

Carry an approved task through to working, verified code

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup

graph

Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery

harbor

Harbor intake for external work — the captain only handles unresolved decisions. Sweeps incoming issues and PRs, verifies every claim before disposition, reuses every decision already made, and hands the maintainer a docket whose pending items each carry one question with options, recommendation, impact and evidence. Agent-autonomous for facts and for actions covered by standing authorization; signed for every new judgment. Never merges.

launch

Shipyard

loft

Loft the shape before cutting steel — answer a design question that prose cannot settle by building a throwaway artifact: a pure logic module in a clickable shell, or structurally different UI variants behind one route. The captain reacts to the artifact; the answer folds into the decision; the artifact never docks. Use when a design question stalls in words, when a navigator map carries a loft ticket, or when a spec discussion reaches

minimal-code-discipline

YAGNI-ladder coding discipline for writing changes — existence-first, reuse before writing, dependency ladder, shortest correct diff, with non-negotiables that must never be minimized away

omc-doctor

Diagnose and fix oh-my-claudecode installation issues

関連スキル