root-cause-first

root-cause-first is a skill for Claude Code from jx-hxxx/hi-vibe. It costs 88 tokens per session (1,113 once invoked), scanned A, original, MIT.

A debugging discipline that requires finding the underlying cause of a bug before changing the code. It also sets rules for handling errors, fallbacks, retries, and temporary diagnostics.

In plain words
What is it for?
Use it when reproducing bugs, examining logs and stack traces, correcting error handling, or deciding whether a fallback is justified.
Why use it?
It prevents fixes that merely hide failures, such as silently ignoring exceptions or returning misleading default values.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the hi-vibe plugin — 6 skills, 10 commands, 2 agents, 5 hooks shipped together

Good fit Use it when reproducing bugs, examining logs and stack traces, correcting error handling, or deciding whether a fallback is justified.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jx-hxxx/hi-vibe/root-cause-first
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jx-hxxx/hi-vibe --skill root-cause-first
Clone the repo
git clone --depth 1 https://github.com/jx-hxxx/hi-vibe

Made for: Claude Code.

Or install hi-vibe, the plugin that ships this one along with the rest of its 6 skills, 10 commands, 2 agents, 5 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for root-cause-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/jx-hxxx/hi-vibe/root-cause-first/github.svg)](https://agentmods.dev/skills/jx-hxxx/hi-vibe/root-cause-first)
Your own site
<a href="https://agentmods.dev/skills/jx-hxxx/hi-vibe/root-cause-first"><img src="https://agentmods.dev/badge/skills/jx-hxxx/hi-vibe/root-cause-first/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for root-cause-first

Your own site · 80×15
<a href="https://agentmods.dev/skills/jx-hxxx/hi-vibe/root-cause-first"><img src="https://agentmods.dev/badge/skills/jx-hxxx/hi-vibe/root-cause-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.01113
Opus 5 $0.00044 $0.00557
Sonnet 5 $0.00018 $0.00223
Haiku 4.5 $0.00009 $0.00111

Measured 12d ago against content hash 702752696856, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

root-cause-first scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/root-cause-first/SKILL.md · 76 lines

What it actually says

root-cause-first

답변 언어: 이 지침은 한국어로 쓰였지만, 출력은 항상 사용자가 대화에서 쓰는 언어를 따른다 (한국어→한국어, 영어→영어). 기존 문서·코드에 언어가 있으면 그쪽을 우선한다.

증상을 가리는 코드는 수정이 아니다
원인을 모르면 "모른다"고 말한다
fallback은 설계 결정이지 응급처치가 아니다

이 선을 넘으면: 에러가 조용히 삼켜져 코드가 "돌아가는 척"하고, 사용자는 문제가 있다는 사실조차 모른 채 시한폭탄을 안고 간다. 피드백 루프가 죽고, 이 스킬은 무의미해진다.

금지 패턴

작성하려는 코드에 아래가 들어가면 멈추고 원인을 먼저 찾아라:

  • except: / except Exception: pass / catch (e) {}
  • 실패를 숨기는 || defaultValue, ?? fallback, or 0, or ""
  • 크래시만 멎게 하려고 추가하는 가드 (if not x: return)
  • 로그 없는 retry 루프
  • 테스트를 통과시키려고 프로덕션 코드에 더하는 방어 코드
  • 호출부마다 반복되는 중복 방어 — 처리는 경계(핸들러/미들웨어)에서 한 번

fallback 허용 기준 (셋 다 만족해야 함)

  1. 요구사항이 "우아한 저하"를 명시한다 (예: 시세 API 죽어도 화면은 뜬다)
  2. 실패가 외부적·예상 가능하다 (네트워크, 외부 API, 사용자 입력)
  3. 실패가 여전히 드러난다 (로그 + 가능하면 사용자에게 표시)

하나라도 아니면 에러를 전파하라. 에러 메시지는 "무엇이 어떤 입력으로 실패했는지"를 담는다.

버그 수정 루프

  1. 재현한다 (재현 못 하면 재현 조건부터 찾는다)
  2. 스택트레이스/로그로 원인 위치를 특정한다 — 추측으로 고치지 않는다
  3. 원인을 고친다 (증상 지점이 아니라)
  4. 진단용 임시 로깅을 제거한다
  5. 원래 재현 케이스로 검증한다

원인 규명 시도가 2번 실패하면: try/except로 감싸서 "일단 되나 보자" 하지 말고, 멈추고 사용자에게 솔직하게 말하라 — 지금까지 확인한 것, 배제한 가설, 다음으로 확인할 것.

hi-vibe catch — 반사실적 발견에만 공을 밝힌다

이 규율이 사용자가 그대로 넘어갔을 것을 붙잡았을 때만(예: 조용히 삼켜질 뻔한 에러, 증상만 가리던 fallback, 원인 대신 방어코드로 덮으려던 것) 답변 맨 끝에 한 줄을 더한다. 세 조건을 모두 만족할 때: ① 이 규율이 짚었다(사용자가 자발적으로 지적한 게 아니다) ② 진짜 결함·잘못된 처리다(스타일이 아니다) ③ 이 규율을 적용하기 전엔 레이더 밖이었다 — 안 짚었으면 그대로 배포됐을 것이다.

형식(문구는 사용자 언어로, 👋 hi-vibe 접두사는 고정 — 나중에 grep 가능하게): 👋 hi-vibe가 방금 <무엇>을 잡았어요 — root-cause 규율. (고쳐줬으면 "…을 잡아서 고쳤어요.")

과장 금지(핵심): 셋 중 하나라도 아니면 넣지 마라. 사용자가 이미 짚은 것, 스타일 수준 지적에 공을 붙이면 신뢰가 깨진다. 이 표기는 자화자찬이 아니라, 조용히 도는 규율이 실제로 무엇을 살렸는지를 보이게 하는 창이다.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 76 lines · 88 tokens per session scan A 702752696856

Subscribe to this mod's changes

root-cause-first is a skill published in the GitHub repository jx-hxxx/hi-vibe (3 stars, last pushed yesterday), licensed MIT. It adds 88 tokens to every session and 1,113 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

root-cause

Find the mechanism behind a failure instead of patching its symptom - reproduce first, one variable per experiment with the prediction written before the run, exit by naming the mechanism and pinning it with a failing test. Use for a bug, an unexplained red test, or a failure that will not reproduce.

jjanczur/tyran · 61 tokens

code-hygiene

Codebase health analysis: dead code, test quality, duplicates, complexity, security, architecture mapping. Tool-first, structured storage, forge integration.

malakhov-dmitrii/forge · 34 tokens

slopmop

Trigger when you would normally reach for pytest, gh, mypy, black, or other raw repo tooling. Redirect to sm swab, sm scour, sm buff, sm sail, sm refit, or sm doctor so remediation follows the established rails. Also trigger when asked to "install" or "set up" slop-mop in a repo, or when you find a repo with sm…

ScienceIsNeato/slop-mop · 186 tokens

self-audit

Use when checking an existing contextualizer for drift — stale dates, broken URLs, catalog/content disagreement, and more — every two to four weeks; read-only unless the user opts into fixing the deterministic checks.

nick-railsback/skill-engine · 45 tokens

diagnose

Use when investigating a bug or unexpected behavior. Forces structured root-cause investigation before any code changes. Trace the call chain, document hypotheses, confirm the root cause, then fix.

cukas/patrol · 39 tokens

trace-fix

Use when fixing a bug, unexpected behavior, or test failure. Investigation-first TDD loop that traces root cause before touching code.

cukas/patrol · 30 tokens