Agent skill

Hai Debug

by hylarucoder in hylarucoder/hai-stack

Diagnoses an unexplained software failure through reproduction, competing hypotheses, discriminating checks, and a causal explanation.

Custom licenceAuto-check passedTesting & QA

Install Hai Debug

skills CLI
$ npx skills add hylarucoder/hai-stack --skill hai-debug -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hylarucoder/hai-stack hai-debug --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hylarucoder/hai-stack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/hai-debug .claude/skills/hai-debug && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hai-debug
GitHub stars
380
Token cost
~1k tokens
SKILL.md length
453 words
Files
4 (incl. references)
Skills in repo
18
Repo updated
First seen
Licence
Custom licence

At a glance

Diagnoses an unexplained software failure through reproduction, competing hypotheses, discriminating checks, and a causal explanation.

  • Works in 8 steps: Establish expected versus actual… → Reproduce on an isolated local fixture… → Trace the symptom backward through… → …
  • 排障、根因分析、偶发失败、环境差异、重复执行
  • SKILL.md covers Principle, Workflow, Constraints and stop rules and Handoffs
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Hai Debug is an agent skill from hylarucoder/hai-stack. Diagnoses an unexplained software failure through reproduction, competing hypotheses, discriminating checks, and a causal explanation. Use for 排障、根因分析、偶发失败、环境差异、重复执行, or a bug whose cause is unclear. Return observed evidence, ruled-out hypotheses, cause/confidence, and a regression target; fix and verify only when the request includes fixing. Use hai-tdd when the cause and desired behavior are already known, and hai-architecture for change complexity without a malfunction.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `SKILL.zh_CN.md`, `agents/openai.yaml` and `references/output-template.md`).

It sits in Testing & QA, covering Test-driven development.

When your agent uses it

  • 排障、根因分析、偶发失败、环境差异、重复执行
  • A bug whose cause is unclear

Example prompts

  • “Use the hai-debug skill to diagnose an unexplained software failure through reproduction, competing hypotheses, discriminating checks, and a causal…”
  • “/hai-debug”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Establish expected versus actual behavior, scope, timing, environment/version, and requested
  2. Reproduce on an isolated local fixture when possible. Record inputs, preconditions, command,
  3. Trace the symptom backward through callers, state/config, persistence, and external boundaries.
  4. Form a small set of plausible competing hypotheses. For each, record supporting/conflicting
  5. Run the highest-information safe check, update confidence, and eliminate contradicted
  6. Explain the causal chain: precondition → faulty decision/state → observable symptom.
  7. If only diagnosis was requested, stop with the cause and a proposed repair/regression target.
  8. Deliver using references/output-template.md. Separate symptom mitigation from root-cause

What it can do on your machine

Read from SKILL.md and the folder at commit a6c7ed2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hai Debug loads about 1k tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 122 tokens; SKILL.md has 453 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~122
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 453 words (~1,002 tokens).

“For Chinese readers, see SKILL.zh_CN.md. English is the execution source of truth. Status: trial. The method has not yet demonstrated improvement across representative real tasks.”

— opening of SKILL.md by hylarucoder, Custom licence
name
hai-debug

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (references) in skills/hai-debug of hylarucoder/hai-stack.

  • SKILL.md
  • SKILL.zh_CN.md
  • agents/openai.yaml
  • references/output-template.md

Open the folder on GitHubat commit a6c7ed2

Compare with similar skills

Hai Debug next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hai Debug compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hai Debug this skillhylarucoder/hai-stack380—~1kAutomated safety check: PassCustom licence
TDDfossasia/eventyay-interpretation1.6k28 repos~1.1kAutomated safety check: PassApache-2.0
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
TDDsanity-io/sanity6.4k20 repos~1kAutomated safety check: PassMIT
Test Driven Developmentfarm-fe/farm5.6k49 repos~2.5kAutomated safety check: PassMIT
Tapd Story PipelineTencentBlueKing/bk-bcs840—~2.6kAutomated safety check: PassCustom licence

Similar skills

  • TDD

    fossasia/eventyay-interpretation

    Test-driven development. An agent skill from fossasia/eventyay-interpretation.

    1.6k GitHub starsUsed in 28 repos~1.1k tokens
    Testing & QAAuto-check passed
  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • TDD

    sanity-io/sanity

    Official

    Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.

    6.4k GitHub starsUsed in 20 repos~1k tokens
    Testing & QAAuto-check passed
  • A skill your agent uses when implementing any feature or bugfix, before writing implementation code

    5.6k GitHub starsUsed in 49 repos~2.5k tokens
    Testing & QAAuto-check passed
  • Tapd Story Pipeline

    TencentBlueKing/bk-bcs

    单需求实现流水线——把一个 TAPD 需求从零推进到代码提交。自动串联技术澄清、 开发计划、任务拆分、TDD 实现、架构/安全校验、代码提交六个阶段。

    840 GitHub stars~2.6k tokensUpdated 13 days ago
    Testing & QAAuto-check passed
  • Absolute Init

    maddhruv/absolute

    One-time setup for absolute: interview how you want it to behave (output style, autonomy, TDD strictness, spec dir, families) + detect the stack once, then write .absolute.config.json (project…

    218 GitHub starsUsed in 1 repo~3k tokens
    Testing & QAAuto-check passed

More from hylarucoder/hai-stack

All 18 skills in this repo
  • Verify a defined software change against requirements and produce a proportional, evidence-backed acceptance report with specification precedence, scope boundaries, requirement-to-evidence…

    380 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • Hai Ast Grep

    hylarucoder/hai-stack

    Produces a ready-to-run ast-grep command or reusable YAML lint/codemod rule, validated against positive and negative fixtures.

    380 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Readme Beautifier

    hylarucoder/hai-stack

    Reformats and restructures a README or similar Markdown project document without changing its factual content, voice, or scope, then summarizes formatting-only edits.

    380 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • Hai Visual Explainer

    hylarucoder/hai-stack

    Turns supplied content into self-contained HTML and PNG in two modes: card for one shareable frame(知识卡、信息卡、金句卡、封面、把要点做成一张图), report for multi-section documents(可视化报告、HTML 汇报页、PRD/计划/评审做成网页).

    380 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Code Review And Quality

    hylarucoder/hai-stack

    Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a local code-smell review.

    380 GitHub stars~934 tokensUpdated 2 days ago
    Auto-check passed
  • Entity Model Auditor

    hylarucoder/hai-stack

    Audits an entity model field by field: what should exist, what exists now, where each value belongs (column, config, computed runtime value, or removal), and what must migrate.

    380 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Hai Debug

What does Hai Debug do?

Diagnoses an unexplained software failure through reproduction, competing hypotheses, discriminating checks, and a causal explanation. Hai Debug is an agent skill from hylarucoder/hai-stack. Diagnoses an unexplained software failure through reproduction, competing hypotheses, discriminating checks, and a causal explanation.

When should I use Hai Debug?

Hai Debug fits situations like: 排障、根因分析、偶发失败、环境差异、重复执行; A bug whose cause is unclear.

How do I install Hai Debug in Claude Code?

Run `npx skills add hylarucoder/hai-stack --skill hai-debug -a claude-code`. Or copy the skill folder (skills/hai-debug in hylarucoder/hai-stack) into .claude/skills/hai-debug in your project. Claude Code loads it when a task matches its description.

How do I install Hai Debug in Codex?

Run `npx skills add hylarucoder/hai-stack --skill hai-debug -a codex`. Or copy the skill folder (skills/hai-debug in hylarucoder/hai-stack) into .agents/skills/hai-debug in your project. Codex loads it when a task matches its description.

Can I use Hai Debug in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hylarucoder/hai-stack --skill hai-debug -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hai-debug, .gemini/skills/hai-debug, .github/skills/hai-debug and .opencode/skills/hai-debug in your project.

What does Hai Debug need to run?

SKILL.md names no scripts, command-line tools or credentials: Hai Debug is instructions for the agent only.

Does Hai Debug access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hai Debug safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hai Debug use?

Hai Debug has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Hai Debug use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 184 tokens, read only when the agent opens those files.

What are the alternatives to Hai Debug?

Skills that share tags, products or a category with Hai Debug: TDD (fossasia/eventyay-interpretation, 1.6k stars), TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars), TDD (sanity-io/sanity, 6.4k stars) and Test Driven Development (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hai Debug?

hylarucoder (a GitHub user) maintains it in hylarucoder/hai-stack, which has 380 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 5, 2026.

Source: hylarucoder/hai-stack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.