본문으로 건너뛰기
cccskills
무료GitHub에 공개

bug-archaeology

Analyze bug-fix commits in a Git repository to uncover recurring failure patterns. Produce individual bug analyses and a reusable pattern guide that removes project-specific details, helping inform future code reviews.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Mine bug patterns from any git repository. Discovers bug-fix commits via git log heuristics, analyzes each in parallel with subagents, writes individual analysis files, and synthesizes a generalized PATTERNS.md with repo-specific details stripped. Invoke explicitly with /bug-archaeology.

설치 방법 보기

이럴 때 유용합니다

  • Extract recurring bug patterns from past fixes
  • Build a reusable guide for code reviews
  • Analyze fixes within a chosen date range or path
  • Resume an interrupted history analysis

포함된 파일(4)

  • SKILL.md5.1 KB
  • references/EVAL-PROMPT.md3.7 KB
  • references/per-bug-format.md3.9 KB
  • references/synthesis-format.md2.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Bug Archaeology

Systematic extraction of reusable bug-detection heuristics from a repository's commit history.

Arguments

All optional. Parse from the user's invocation string.

ArgDefaultDescription
--rangeHEAD~200..HEADGit revision range
--path(all files)Restrict to commits touching this path glob
--since / --until(none)Date filter for git log
--limit200Max bug-fix commits to analyze
--batch-size10Commits per subagent
--output./bug-archaeology/Output directory

Workflow

Three sequential phases. Each phase completes fully before the next starts.

Phase 1: Discovery

Find bug-fix commits via git log heuristics.

git log --no-merges --pretty=format:"%H %s" [--since=X] [--until=X] <range> [-- <path>] \
  | grep -iE '(fix|bug|patch|resolve|repair|correct|workaround|hotfix|regression|#[0-9]+|[A-Z]+-[0-9]+)'

Filter out commits whose message matches ONLY cosmetic keywords (typo, whitespace, import, format, style, cleanup, rename) with no bug keywords.

Truncate to --limit.

Write QUEUE.txt to the output directory:

0001 abc123def First line of commit message
0002 def456abc Another commit message

Resumption: If PROGRESS.md exists, read it and exclude commits already marked done or skipped. Re-include pending and error entries.

Phase 2: Analysis (parallelized)

Spawn subagents to analyze commits in batches. Each commit is independent.

Subagent prompt template — adapt as needed:

Read the file at references/per-bug-format.md for the output format specification.

Analyze these commits from the repository at <REPO_PATH>:
<list of "NNNN hash message" lines>

For each commit:
1. Run: git show <hash>
2. If the commit is cosmetic, test-only, refactor-only, or a merge with no
   original changes — mark it as skipped with a one-word reason.
3. Otherwise, write the analysis to <OUTPUT>/bug-<NNNN>-<slug>.md
   following the format in per-bug-format.md exactly.

Return a status line per commit: NNNN <hash> done|skipped [reason-or-filename]

Parallelism: Launch up to 5 subagent batches concurrently. Wait for all to complete before the next wave.

Progress tracking: After each wave, append results to PROGRESS.md:

| # | Commit | Status | File / Reason |
|---|--------|--------|---------------|
| 0001 | abc123d | done | bug-0001-null-after-lookup.md |
| 0002 | def456a | skipped | cosmetic |

Errors: Mark as error with a one-line reason. Don't retry — the user re-invokes with --resume.

Phase 3: Synthesis

After all analysis is complete, produce PATTERNS.md. Read references/synthesis-format.md for the full specification.

Process:

  1. Read all bug-*.md files in the output directory
  2. Parse the Tags section from each — extract category and code-pattern
  3. Group bugs by code-pattern tag
  4. For each group of 2+ bugs with the same code-pattern:
    • Extract the shared Detection Rule (generalize if they differ across instances)
    • Pick the most representative Example
  5. Generalize — strip repo-specific details:
    • Replace specific class/method names with structural descriptions
    • Remove ticket IDs, author names, project-specific subsystem labels
    • Keep language-specific API names only if scope is that language or broader
  6. Group patterns by category and write PATTERNS.md
  7. Patterns with only 1 instance go in a "Singletons" section at the end

Reference Files

FileLoaded byPurpose
references/per-bug-format.mdSubagents (Phase 2)Per-bug output template and field guidelines
references/synthesis-format.mdOrchestrator (Phase 3)PATTERNS.md structure and generalization rules

Evaluating the Skill

Full instructions are in references/EVAL-PROMPT.md. Summary:

  1. Pick a bug from the archaeology output and trace its introducing commit via git blame.
  2. Extract the patch with git diff ${INTRO}~1 $INTRO.
  3. Choose a review skill — the user must specify one:
    • /shallow-review — quick 6-specialist parallel scan, any patch size
    • /deep-review — focused on specific files, complex logic
    • /targeted-review — findings-driven, medium-to-large patches
    • /mega-review — large feature branches or 1000+ LOC diffs
  4. Run the chosen skill against the extracted patch.
  5. Score the output: Exact / Partial / Different bug / Miss.
  6. Prod misses — tell the skill what it missed and ask which checklist item would have caught it; use the answer to improve that skill's reference files.

Target: >90% hit rate (exact + partial), <5% miss rate across a batch of N bugs.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Write Apache Cassandra distributed tests that simulate multiple nodes within one JVM, the Java runtime. The guide covers cluster setup, queries, node restarts, message dropping for failure scenarios, and troubleshooting problems caused by isolated class loading.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Writing read and write tests across multiple nodes
  • Testing timeouts by dropping messages between nodes
  • Verifying node replacement and restarts
apache/cassandra1만2026년 10월 17일 업데이트

Review selected files for bugs by reading full source code, callers, and related implementations. Apply detailed checklists and investigate suspected issues, then report evidence, confidence levels, and suggested fixes.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Review selected files in a critical code change
  • Investigate concerns raised by an initial review
  • Check complex state transitions and object lifecycles
apache/cassandra1만2026년 10월 17일 업데이트

heatmap

무료

Analyze Git history to find frequently and recently changed files and lines, then rank review targets. Use the results to focus pull request reviews, bug investigations, or security audits on specific code regions and risks.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Prioritizing files during pull request reviews
  • Finding starting points for bug investigations
  • Narrowing security audits to frequently changed code
apache/cassandra1만2026년 10월 17일 업데이트

Review changes of 1,000 lines or more by dividing work across files, focused areas, and commits. Combine several review methods, check consistency across subsystems, verify bug fixes, and report validated findings alongside a checklist showing review coverage.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Reviewing feature branches with 1,000 or more changed lines
  • Checking a large change before merging
  • Finding inconsistencies across commits and subsystems
apache/cassandra1만2026년 10월 17일 업데이트

Explain code structure and behavior with text diagrams, including before-and-after views of changes. Trace data flow and state changes, clarify design choices, and examine assumptions, possible failures, and interactions between tasks running at the same time.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Understanding a patch through before-and-after diagrams
  • Tracing a class's behavior and state changes
  • Mapping component relationships across a codebase
apache/cassandra1만2026년 10월 17일 업데이트

Run a quick first review of code changes with six specialist agents working in parallel. They check logic, input and output, shared state, resources, missing behavior, and API completeness, then combine duplicate findings into a report ranked by confidence.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Running a quick first review of a patch
  • Screening diffs to prioritize further investigation
  • Checking for missing cleanup and handlers
apache/cassandra1만2026년 10월 17일 업데이트

apache의 스킬 모두 보기

이 스킬의 문제 신고