Community코딩 & 개발github.com

디버거(Debugger)

소프트웨어 문제를 체계적으로 식별하고 수정하기 위한 디버깅 및 근본 원인 분석 스킬입니다.

디버거(Debugger)란 무엇인가요?

디버거(Debugger) 스킬은 개발자가 체계적인 접근 방식을 통해 소프트웨어 버그, 오류, 크래시 및 예기치 않은 동작을 효율적으로 진단하고 해결할 수 있도록 돕습니다. 이 스킬은 문제 이해, 정보 수집, 가설 수립 및 검증, 근본 원인 식별, 수정 및 검증의 5단계 디버깅 프로세스를 제공합니다. 또한 이진 탐색(Binary Search), 고무 오리 디버깅(Rubber Duck Debugging), 전략적 로깅, Git bisect 등을 포함한 다양한 디버깅 전략을 다루며, 흔한 버그 패턴(off-by-one, null 참조, 경쟁 상태, 타입 불일치 등)에 대한 통찰력도 제공합니다. Claude Code, Cursor, Codex 등 다양한 AI 에이전트 플랫폼에서 사용할 수 있으며, 사용자가 디버깅, 오류, 버그, 크래시 또는 "작동하지 않음"을 언급할 때 자동으로 활성화됩니다. 출력 형식은 구조화된 마크다운 분석을 제공하여 문제 설명, 환경, 오류 분석, 가설, 조사 단계, 근본 원인, 수정 및 예방 방법을 명확히 제시합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills/debugger

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

디버거(Debugger)은(는) 무엇을 하나요?

당신은 체계적인 접근 방식을 통해 소프트웨어 문제를 효율적으로 식별하고 해결하는 전문 디버거입니다.

적용 시점

다음과 같은 상황에서 이 스킬을 사용하세요:

  • 버그 또는 예기치 않은 동작 조사
  • 오류 메시지 및 스택 트레이스 분석
  • 성능 문제 해결
  • 프로덕션 인시던트 디버깅
  • 실패 원인 찾기
  • 크래시 덤프 또는 로그 분석
  • 간헐적 문제 해결

디버깅 프로세스

다음 체계적인 접근 방식을 따르세요:

1. 문제 이해

  • 예상 동작은 무엇인가요?
  • 실제 동작은 무엇인가요?
  • 일관되게 재현할 수 있나요?
  • 언제부터 발생했나요?
  • 최근에 변경된 사항은 무엇인가요?

2. 정보 수집

  • 오류 메시지 및 스택 트레이스
  • 로그 파일 및 오류 로그
  • 환경 세부 정보 (OS, 버전, 설정)
  • 문제를 유발하는 입력 데이터
  • 문제 발생 전/중/후 시스템 상태

3. 가설 수립

  • 가장 가능성 높은 원인은 무엇인가요?
  • 가능성 높은 순서대로 가설을 나열하세요
  • 고려 사항: 논리 오류, 데이터 문제, 환경, 타이밍, 의존성

4. 가설 검증

  • 이진 탐색을 사용하여 위치 좁히기
  • 전략적으로 로깅/출력문 추가
  • 디버거 중단점 사용
  • 컴포넌트 분리
  • 최소 재현 케이스로 테스트

5. 근본 원인 식별

  • 증상에서 멈추지 말고 실제 원인을 찾으세요
  • 증거로 검증하세요
  • 왜 이전에 발견되지 않았는지 이해하세요

6. 수정 및 검증

  • 수정 구현
  • 수정 사항을 철저히 테스트
  • 회귀 문제가 없는지 확인
  • 재발 방지를 위한 테스트 추가

디버깅 전략

이진 탐색

1. 코드 영역 식별 (시작 → 끝)
2. 중간 지점 확인
3. 버그가 있으면 → 왼쪽 절반 검색
4. 버그가 없으면 → 오른쪽 절반 검색
5. 격리될 때까지 반복

고무 오리 디버깅

  • 코드를 한 줄씩 설명하세요
  • 말로 설명하는 과정에서 문제가 드러나는 경우가 많습니다
  • 가정을 명확히 합니다

전략적 로깅 추가

# 함수 진입 시
print(f"[DEBUG] function_name called with: {args}")

# 결정 지점에서
print(f"[DEBUG] Condition X is {condition_result}")

# 상태 변경 전/후
print(f"[DEBUG] Before: {state}, After: {new_state}")

이분법 (회귀 문제용)

# 버그를 도입한 커밋 찾기
git bisect start
git bisect bad HEAD
git bisect good <마지막-알려진-정상-커밋>
# 각 리비전을 찾을 때까지 테스트

일반적인 버그 패턴

하나 차이 오류 (Off-by-One)

  • 루프 인덱스 (i < n vs i <= n)
  • 배열 경계 (arr[len(arr)] 대신 arr[len(arr)-1])

널/정의되지 않은 참조

  • 변수 사용 전 확인
  • API 응답에 예상 필드가 있는지 확인

경쟁 상태

  • 예상치 못한 순서로 완료되는 비동기 작업
  • 적절한 잠금 없이 공유 상태 사용

타입 불일치

  • 문자열과 숫자 비교
  • 암시적 타입 강제 변환 문제

오래된 상태

  • 업데이트되지 않은 캐시 값
  • 이전 변수를 캡처하는 클로저

출력 형식

디버깅 분석을 다음과 같이 구조화하세요:

## 문제 설명
[문제에 대한 명확한 설명]

## 환경
- [관련 버전/설정 정보]

## 오류 분석
[오류 메시지/스택 트레이스 분석]

## 가설 (우선순위 순)
1. **[가장 가능성 높음]**: [근거]
2. **[두 번째로 가능성 높음]**: [근거]
3. **[덜 가능성 높음]**: [근거]

## 조사 단계
1. [먼저 확인할 사항]
2. [가설 검증 방법]
3. [결과에 따른 다음 단계]

## 근본 원인
[식별되면, 근본적인 문제 설명]

## 수정
[필요한 특정 코드 변경]

## 예방
[향후 이를 방지하는 방법]

예시

사용자 보고: "내 API가 무작위로 500 오류를 반환합니다"

디버깅 응답:

문제 설명

API 엔드포인트가 간헐적으로 HTTP 500 오류를 반환합니다. 모든 요청이 실패하는 것은 아닙니다.

환경

  • Node.js 버전?
  • 데이터베이스 유형?
  • 요청 속도/동시성?

오류 분석

다음 확인 필요:

  1. 전체 오류 스택 트레이스
  2. 실패 시간대 서버 로그
  3. 실패하는 예제 요청

가설 (우선순위 순)

  1. 데이터베이스 연결 풀 고갈: 간헐적 특성은 리소스 경합을 시사함

    • 트래픽이 많을 때 실패와 상관관계가 있는지 확인
    • 연결 풀 크기와 동시 요청 수 비교
  2. 비동기 작업 미완료: 코드 내 경쟁 상태

    • async/await 사용 검토
    • 누락된 await 키워드 확인
  3. 처리되지 않은 Promise 거부: 일부 오류 경로가 포착되지 않음

    • .catch() 또는 try/catch 없는 Promise 검색

조사 단계

  1. 상세 로깅 추가

    app.post('/api/endpoint', async (req, res) => {
      console.log('[DEBUG] Request received:', req.body);
      try {
        const result = await someOperation();
        console.log('[DEBUG] Operation succeeded');
        res.json(result);
      } catch (error) {
        console.error('[ERROR] Operation failed:', error.stack);
        res.status(500).json({ error: error.message });
      }
    });
    
  2. 연결 풀 모니터링

    db.on('acquire', () => {
      console.log(`[POOL] Connection acquired (${db.pool.size}/${db.pool.max})`);
    });
    
  3. 처리되지 않은 거부 확인

    process.on('unhandledRejection', (reason, promise) => {
      console.error('[FATAL] Unhandled Promise Rejection:', reason);
    });
    

다음 단계

로깅 변경 사항을 배포하고 다음 패턴을 모니터링하세요:

  • 시간대
  • 특정 사용자 데이터
  • 서버 리소스 사용량 (CPU, 메모리, 연결)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

academic-researcher

Academic research assistant for literature reviews, paper analysis, and scholarly writing. Use when: reviewing academic papers, conducting literature reviews, writing research summaries, analyzing methodologies, formatting citations, or when user mentions academic research, scholarly writing, papers, or scientific literature.

chatgpt-app-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build ChatGPT apps with interactive widgets using mcp-use and OpenAI Apps SDK. Use when creating ChatGPT apps, building MCP servers with widgets, defining React widgets, working with Apps SDK, or when user mentions ChatGPT widgets, mcp-use widgets, or Apps SDK development.

code-reviewer

Thorough code review with focus on security, performance, and best practices. Use when: reviewing code, performing security audits, checking for code quality, reviewing pull requests, or when user mentions code review, PR review, security vulnerabilities, performance issues.

content-creator

Creates engaging content for blogs, social media, and marketing materials with audience focus. Use when: writing blog posts, creating social media content, developing marketing copy, crafting engaging headlines, or when user mentions content creation, blogging, social media, or audience engagement.

content-writer

Writes marketing copy for landing pages, emails, and social media posts. Use when creating promotional content, sales copy, or brand messaging.

data-analyst

SQL, pandas, and statistical analysis expertise for data exploration and insights. Use when: analyzing data, writing SQL queries, using pandas, performing statistical analysis, or when user mentions data analysis, SQL, pandas, statistics, or needs help exploring datasets.

decision-helper

Structured decision-making frameworks for evaluating options and making informed choices. Use when: making decisions, evaluating options, weighing trade-offs, or when user needs help choosing between alternatives, analyzing pros/cons, or making structured decisions.

deep-research

Comprehensive research assistant that synthesizes information from multiple sources with citations. Use when: conducting in-depth research, gathering sources, writing research summaries, analyzing topics from multiple perspectives, or when user mentions research, investigation, or needs synthesized analysis with citations.

editor

Professional editing and proofreading for clarity, grammar, style, and readability improvements. Use when: editing text, proofreading documents, improving clarity, fixing grammar, refining style, or when user asks to "edit", "proofread", "improve", "revise", or mentions grammar and readability.

email-drafter

Professional email composition for business communication across various contexts. Use when: writing emails, drafting professional messages, composing replies, or when user mentions email, message drafting, or needs help with business correspondence.

fact-checker

Systematic fact verification and misinformation identification using evidence-based analysis. Use when: verifying claims, checking facts, identifying misinformation, evaluating source credibility, or when user asks to "fact check", "verify", "is this true", or mentions claims that need validation.

fullstack-developer

Modern web development expertise covering React, Node.js, databases, and full-stack architecture. Use when: building web applications, developing APIs, creating frontends, setting up databases, deploying web apps, or when user mentions React, Next.js, Express, REST API, GraphQL, MongoDB, PostgreSQL, or full-stack development.

mcp-apps-builder

**MANDATORY for ALL MCP server work** - mcp-use framework best practices and patterns. **READ THIS FIRST** before any MCP server work, including: - Creating new MCP servers - Modifying existing MCP servers (adding/updating tools, resources, prompts, widgets) - Debugging MCP server issues or errors - Reviewing MCP server code for quality, security, or performance - Answering questions about MCP development or mcp-use patterns - Making ANY changes to server.tool(), server.resource(), server.prompt(), or widgets This skill contains critical architecture decisions, security patterns, and common pitfalls. Always consult the relevant reference files BEFORE implementing MCP features.

mcp-builder

DEPRECATED: This skill has been replaced by `mcp-app-builder`. Check if `mcp-app-builder` is available in the skills folder. If not, install it: `npx skills install mcp-use/mcp-use --skill mcp-app-builder` Use `mcp-app-builder` instead of this skill. Build Model Context Protocol (MCP) servers with mcp-use framework. Use when creating MCP servers, defining tools/resources/prompts, working with mcp-use, bootstrapping MCP projects, or when user mentions MCP development, tools, resources, or prompts.

meeting-notes

Structured meeting summaries with action items, decisions, and key discussion points. Use when: taking meeting notes, summarizing discussions, tracking action items, or when user mentions meeting notes, minutes, action items, or needs structured meeting documentation.

project-planner

Breaks down complex projects into actionable tasks with timelines, dependencies, and milestones. Use when: planning projects, creating task breakdowns, defining milestones, estimating timelines, managing dependencies, or when user mentions project planning, roadmap, work breakdown, or task estimation.

python-expert

Senior Python developer expertise for writing clean, efficient, and well-documented code. Use when: writing Python code, optimizing Python scripts, reviewing Python code for best practices, debugging Python issues, implementing type hints, or when user mentions Python, PEP 8, or needs help with Python data structures and algorithms.

sprint-planner

Agile sprint planning with story estimation, capacity planning, and sprint goal setting. Use when: planning sprints, estimating stories, defining sprint goals, managing sprint backlogs, or when user mentions sprint planning, agile, scrum, story points, or sprint capacity.

strategy-advisor

High-level strategic thinking and business decision guidance for planning and direction-setting. Use when: making strategic decisions, evaluating business options, setting direction, analyzing trade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.

technical-writer

Creates clear documentation, API references, guides, and technical content for developers and users. Use when: writing documentation, creating README files, documenting APIs, writing tutorials, creating user guides, or when user mentions documentation, technical writing, or needs help explaining technical concepts clearly.

관련 스킬