Agent SkillsTeaonly/SKILL.mk › triage-issue

triage-issue

GitHub

用于排查Bug根因并生成TDD修复计划的技能。通过代码探索定位问题,设计RED-GREEN测试周期,最终创建包含详细分析和修复方案的GitHub Issue,实现从诊断到规划的全流程自动化。

examples/triage-issue/SKILL.md Teaonly/SKILL.mk

Trigger Scenarios

用户报告Bug或错误 用户希望提交Issue 提及'triage'关键词 需要调查问题并制定修复计划

Install

npx skills add Teaonly/SKILL.mk --skill triage-issue -g -y
More Options

Non-standard path

npx skills add https://github.com/Teaonly/SKILL.mk/tree/main/examples/triage-issue -g -y

Use without installing

npx skills use Teaonly/SKILL.mk@triage-issue

指定 Agent (Claude Code)

npx skills add Teaonly/SKILL.mk --skill triage-issue -a claude-code -g -y

安装 repo 全部 skill

npx skills add Teaonly/SKILL.mk --all -g -y

预览 repo 内 skill

npx skills add Teaonly/SKILL.mk --list

SKILL.md

Frontmatter
{
    "name": "triage-issue",
    "description": "Triage a bug or issue by exploring the codebase to find root cause, then create a GitHub issue with a TDD-based fix plan. Use when user reports a bug, wants to file an issue, mentions \"triage\", or wants to investigate and plan a fix for a problem."
}

Triage Issue

Investigate a reported problem, find its root cause, and create a GitHub issue with a TDD fix plan. This is a mostly hands-off workflow - minimize questions to the user.

Process

1. Capture the problem

Get a brief description of the issue from the user. If they haven't provided one, ask ONE question: "What's the problem you're seeing?"

Do NOT ask follow-up questions yet. Start investigating immediately.

2. Explore and diagnose

Use the Agent tool with subagent_type=Explore to deeply investigate the codebase. Your goal is to find:

  • Where the bug manifests (entry points, UI, API responses)
  • What code path is involved (trace the flow)
  • Why it fails (the root cause, not just the symptom)
  • What related code exists (similar patterns, tests, adjacent modules)

Look at:

  • Related source files and their dependencies
  • Existing tests (what's tested, what's missing)
  • Recent changes to affected files (git log on relevant files)
  • Error handling in the code path
  • Similar patterns elsewhere in the codebase that work correctly

3. Identify the fix approach

Based on your investigation, determine:

  • The minimal change needed to fix the root cause
  • Which modules/interfaces are affected
  • What behaviors need to be verified via tests
  • Whether this is a regression, missing feature, or design flaw

4. Design TDD fix plan

Create a concrete, ordered list of RED-GREEN cycles. Each cycle is one vertical slice:

  • RED: Describe a specific test that captures the broken/missing behavior
  • GREEN: Describe the minimal code change to make that test pass

Rules:

  • Tests verify behavior through public interfaces, not implementation details
  • One test at a time, vertical slices (NOT all tests first, then all code)
  • Each test should survive internal refactors
  • Include a final refactor step if needed
  • Durability: Only suggest fixes that would survive radical codebase changes. Describe behaviors and contracts, not internal structure. Tests assert on observable outcomes (API responses, UI state, user-visible effects), not internal state. A good suggestion reads like a spec; a bad one reads like a diff.

5. Create the GitHub issue

Create a GitHub issue using gh issue create with the template below. Do NOT ask the user to review before creating - just create it and share the URL.

Problem

A clear description of the bug or issue, including:

  • What happens (actual behavior)
  • What should happen (expected behavior)
  • How to reproduce (if applicable)

Root Cause Analysis

Describe what you found during investigation:

  • The code path involved
  • Why the current code fails
  • Any contributing factors

Do NOT include specific file paths, line numbers, or implementation details that couple to current code layout. Describe modules, behaviors, and contracts instead. The issue should remain useful even after major refactors.

TDD Fix Plan

A numbered list of RED-GREEN cycles:

  1. RED: Write a test that [describes expected behavior] GREEN: [Minimal change to make it pass]

  2. RED: Write a test that [describes next behavior] GREEN: [Minimal change to make it pass]

...

REFACTOR: [Any cleanup needed after all tests pass]

Acceptance Criteria

  • Criterion 1
  • Criterion 2
  • All new tests pass
  • Existing tests still pass

After creating the issue, print the issue URL and a one-line summary of the root cause.

Version History

  • 9ed8bc9 Current 2026-07-24 16:51

Same Skill Collection

examples/caveman/SKILL.md
examples/design-an-interface/SKILL.md
examples/domain-model/SKILL.md
examples/edit-article/SKILL.md
examples/git-guardrails-claude-code/SKILL.md
examples/github-triage/SKILL.md
examples/improve-codebase-architecture/SKILL.md
examples/migrate-to-shoehorn/SKILL.md
examples/obsidian-vault/SKILL.md
examples/qa/SKILL.md
examples/request-refactor-plan/SKILL.md
examples/scaffold-exercises/SKILL.md
examples/setup-pre-commit/SKILL.md
examples/tdd/SKILL.md
examples/to-issues/SKILL.md
examples/to-prd/SKILL.md
examples/ubiquitous-language/SKILL.md
examples/write-a-skill/SKILL.md

Metadata

Files
0
Version
9ed8bc9
Hash
834e528e
Indexed
2026-07-24 16:51

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 19:33
浙ICP备14020137号-1 $mapa de visitantes$