From oh-my-harness
Interactive setup wizard for oh-my-harness: configures test enforcement, guard rails, convention detection, weight routing, and multi-model verification in Claude Code projects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oh-my-harness:harness-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Initialize oh-my-harness for the current project. This is the plugin equivalent of `oh-my-harness init`.
Initialize oh-my-harness for the current project. This is the plugin equivalent of oh-my-harness init.
When this skill is invoked, immediately execute the workflow below.
In plugin mode, hooks and CLAUDE.md are already provided by the plugin system automatically. This setup only creates the project-level configuration file.
Check if .claude/.omh/harness.config.json exists.
Run the duck ASCII art to greet the user:
bash "$CLAUDE_PLUGIN_ROOT/lib/duck.sh" 2>/dev/null || bash "$(dirname "$(realpath "$0")")/../../lib/duck.sh" 2>/dev/null || true
Output the following message (adapt naturally, keep it concise and friendly):
Welcome to oh-my-harness!
Smart defaults for Claude Code — test enforcement, guard rails,
convention detection, and model routing, all in one harness.
Let's set up your project in a few quick steps.
Ask the user the following questions using AskUserQuestion (ask all at once):
Question 1 — Installation Scope
"설치 범위를 선택해주세요."
.claude/settings.local.json — 이 프로젝트에만 적용~/.claude/settings.json — 모든 프로젝트에 적용Question 2 — Project Detection
"프로젝트 컨벤션을 자동 감지할까요?"
Question 3 — Feature Profile
"어떤 기능 프로필을 사용할까요?"
Question 4 — Commit Convention
"커밋 메시지 컨벤션은?"
type(scope): description🎨 descriptionQuestion 5 — Weight Routing & 검증 (무게 비례 하네스)
"작업 무게(Tier)에 따라 검증 강도를 자동 조절할까요? Tier 3(무거운 작업)은 완료 전
/omh-verifyN-라운드 독립검증을 강제합니다."
/omh-verify는 Claude 외에 GPT(codex)·Gemini를 독립 검증자로 로테이션할 수 있습니다. 설치 여부를 감지:
which codex >/dev/null 2>&1 && echo "codex: ✓" || echo "codex: ✗"
which gemini >/dev/null 2>&1 && echo "gemini: ✓" || echo "gemini: ✗"
감지된 CLI가 있으면 AskUserQuestion으로 제안:
"GPT/Gemini도 독립 검증에 넣을까요? (감지됨: {codex, gemini 중 설치된 것})"
선택에 따라 verify.lenses 배열을 구성한다(미설치 모델은 제외). 둘 다 없으면 이 질문은 건너뛰고 Claude 단독으로 동작한다(graceful degrade).
Based on the user's answers:
Project scope selected → Config and hooks target .claude/settings.local.json (this project only)
User scope selected → Config stays in .claude/.omh/ but hooks are registered in ~/.claude/settings.json (applies to all projects)
Auto-detect selected → Run convention detection (scan project root for package.json, pyproject.toml, go.mod, Cargo.toml, build.gradle, pom.xml) and save to .claude/.omh/conventions.json
Manual selected → Ask for language, test framework, linter, formatter, build tool
Full profile → Use all default features as-is
Minimal profile → Set all features to false except: testEnforcement, dangerousGuard, commitConvention, autoGitignore
Custom profile → Ask the user which features to enable using AskUserQuestion with multiSelect
Commit convention → Set commitConvention.style to the chosen value (auto, conventional, gitmoji)
mkdir -p .claude/.omh
Write the config to .claude/.omh/harness.config.json with the user's choices merged into the following default template.
IMPORTANT: Feature keys MUST match exactly — hooks read these exact names.
{
"version": 1,
"features": {
"conventionSetup": true,
"testEnforcement": true,
"contextOptimization": true,
"autoPlanMode": true,
"ambiguityDetection": true,
"dangerousGuard": true,
"contextSnapshot": true,
"commitConvention": true,
"scopeGuard": false,
"usageTracking": true,
"autoGitignore": true,
"weightRouting": true
},
"testEnforcement": { "minCases": 2, "promptOnMissing": true },
"modelRouting": { "quick": "haiku", "standard": "sonnet", "complex": "opus" },
"autoPlan": { "threshold": 3 },
"ambiguityDetection": { "threshold": 2, "language": "auto" },
"commitConvention": { "style": "auto" },
"scopeGuard": { "allowedPaths": [] },
"multiAgent": { "maxAgents": 4, "useWorktree": true, "tmuxSession": "omh-agents" },
"tier3": { "taskThreshold": 5, "fileThreshold": 5, "domainKeywords": [] },
"verify": {
"rounds": 3,
"stopWhenClean": true,
"autoFix": false,
"lenses": [
{ "model": "claude", "via": "native-subagent", "focus": "correctness" },
{ "model": "gpt", "via": "codex", "cmd": "codex exec", "focus": "convention" },
{ "model": "gemini", "via": "gemini", "cmd": "gemini -p --approval-mode plan", "focus": "regression" }
]
}
}
weightRouting선택에 따라features.weightRouting를 토글하고, Question 5 / 모델 감지 결과로verify.rounds,verify.autoFix,verify.lenses를 구성한다. Tier3의domainKeywords에 프로젝트 핵심 도메인(예: 결제·매출 관련 용어)을 넣으면 해당 작업이 자동으로 Tier 3로 분류된다.
false except: testEnforcement, dangerousGuard, commitConvention, autoGitignoreif ! grep -q '.claude/.omh/' .gitignore 2>/dev/null; then
echo -e "\n# oh-my-harness\n.claude/.omh/" >> .gitignore
fi
Register the oh-my-harness HUD in the user's Claude Code settings.
IMPORTANT: $CLAUDE_PLUGIN_ROOT is NOT available in statusLine context (it's a global setting, not a plugin hook). Use a dynamic path lookup instead.
Write the statusLine config to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "bash -c 'node \"$(ls ~/.claude/plugins/cache/oh-my-harness/*/*/hud/omh-hud.mjs 2>/dev/null | head -1)\"'"
}
}
If statusLine is already set to a non-harness value, ask the user before overwriting.
Show the duck one more time, then output:
oh-my-harness is ready!
Scope : {Project|User (Global)}
Project : {language} | test: {testFramework} | lint: {linter} | fmt: {formatter}
Config : .claude/.omh/harness.config.json
Features : {N} active ({disabled features list})
Commit : {commitStyle}
Weight : {weightRouting on/off} | verify {rounds}라운드, autoFix {on/off}
Verifiers: {claude (+gpt) (+gemini) — 감지·선택된 모델}
HUD : enabled (restart Claude Code to see status line)
Hooks are provided automatically by the plugin.
Use /set-harness to change settings anytime.
If .claude/.omh/harness.config.json already exists:
If "Reset to defaults" is chosen, delete the existing config and run the First-Time Welcome flow above.
settings.local.json — hooks come from hooks/hooks.jsonCLAUDE.md — the root CLAUDE.md is injected by the plugin systemProvides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub hoya324/oh-my-harness --plugin oh-my-harness