From claude-config-doctor
This skill should be used when the user asks about "Harness Engineering", "HE成熟度", "ハーネスエンジニアリング", "hooks のベストプラクティス", "AIエージェントの制御", "harness maturity", or needs guidance on implementing harness engineering patterns in their Claude Code setup. This skill provides conceptual guidance and best practices. For auditing the current HE maturity level, use the `/doctor --he` command instead.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-config-doctor:harness-engineeringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Harness Engineering(ハーネスエンジニアリング)のコンセプトと、Claude Code における実践方法のガイド。
Harness Engineering(ハーネスエンジニアリング)のコンセプトと、Claude Code における実践方法のガイド。
⚠️ Experimental: HE モードは実験的機能です。本ガイドは HE 関連記事群のコンセプトを Claude Code 向けに整理したものであり、元記事の主張と本プラグイン独自の解釈を区別して記載しています。
[HE原則] AIコーディングエージェントが「正しく動作せざるを得ない環境」を構築する手法。 Bouchard の3層分類で位置づけられる:
| 層 | 問い | Claude Code での対応 |
|---|---|---|
| Prompt Engineering | 何を聞くか | ユーザーの入力 |
| Context Engineering | 何を渡すか | CLAUDE.md, skills, agents, MCP |
| Harness Engineering | どう動作させるか | hooks, linters, evaluator agents, progress files, tests |
出典: Bouchard "Harness Engineering: The Missing Layer Behind AI Agents"
Note: このスキルは HE の考え方・ベストプラクティスを提供するガイダンスです。現在の設定の HE 成熟度を診断するには、
/doctor --heコマンドを使用してください。
Note: この5段階モデルは元記事群のコンセプトを参考に本プラグインが独自に段階化したものです。元記事にこのモデル自体は存在しません。詳細は
references/he-checklist.mdを参照。
| Level | Name | 概要 |
|---|---|---|
| 1 | Prompt Engineering | CLAUDE.md が存在し基本的な指示がある |
| 2 | Context Engineering | skills/agents で必要な情報をオンデマンド提供 |
| 3 | Safety Harness | 安全ゲートで危険な操作を構造的にブロック |
| 4 | Feedback Loop | ツール実行後に linter/formatter を自動フィードバック |
| 5 | Full Harness | evaluator パターン、セッション継続性、自動改善ループ |
[HE原則] 元記事では custom linter、構造テスト、アーキテクチャ制約など幅広い手段が言及されている。
[Claude Code固有] Claude Code では hooks API を通じて以下のように実装できる:
| Hook | 配置 | 用途 |
|---|---|---|
| PreToolUse | グローバル推奨 | 安全ゲート(destructive操作ブロック) |
| PostToolUse | プロジェクトごと | 品質フィードバック(formatter, linter, 型チェック) |
| Stop | 場合による | セッション永続化、テスト通過確認 |
Note: hooks の配置戦略(グローバル vs プロジェクト)は元記事では言及されておらず、Claude Code の設定構造に基づく本プラグインの推奨です。
[HE原則] 設計原則: 成功時は silent、エラー時のみ agent に通知(出典: HumanLayer)。
git log + progress file を読む手順を CLAUDE.md に記述(出典: Anthropic)Note: 以下の導入順序は元記事の示唆に基づく本プラグインの推奨であり、唯一の正しい順序ではありません。
npx claudepluginhub nyoki/my-claude-plugins --plugin claude-config-doctorExplains harness engineering framework for AI code quality: context engineering, architectural constraints, and garbage collection via living HARNESS.md documents.
Diagnoses Claude Code harness health (hooks, skills, agents, rules, MCP, eval) across 8 dimensions, scores 0-24 with S-D grades, and provides improvement suggestions. Scans ~/.claude/. Triggers: harness audit, 하네스 진단.
Initializes and repairs Harness project configuration: CLAUDE.md, Plans.md, hooks, sync, CI/CD, Codex CLI, memory setup, agent config, and mirror sync.