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

service-debugging

Structured debugging runbook for backend services. Use when investigating production issues, API errors, performance problems, or when something broke and you need to find why.

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

설치 방법 보기

포함된 파일(2)

  • SKILL.md3.8 KB
  • common-issues.md3.2 KB

SKILL.md(원문)

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

Service Debugging

Structured approach to investigating and fixing service issues. Symptoms in, root cause out.

When to Use

  • API endpoint returning errors (4xx, 5xx)
  • Performance degradation or slow queries
  • Service not starting or crashing
  • Data inconsistency between services
  • After a deploy when something broke
  • User reports "something is broken"

Process

1. Gather Symptoms

Before touching code, collect:

  • What's broken? (specific endpoint, feature, or behavior)
  • When did it start? (after a deploy? gradually? suddenly?)
  • Who's affected? (all users, specific users, specific data?)
  • Error messages? (logs, HTTP responses, stack traces)

2. Check the Obvious

Run these first — they catch 80% of issues:

# Recent deploys (did someone push something?)
git log --oneline -10

# Service health
curl -s http://localhost:8080/health | jq .

# Recent errors in logs
grep -i "error\|exception\|fatal" logs/app.log | tail -20

# Database connectivity
psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT 1"

# Environment variables (missing or wrong?)
env | grep -i "DB_\|API_\|SECRET_" | sort

3. Narrow Down

SymptomCheck First
500 errorsStack trace in logs → find the throwing line
404 errorsRoute registration → is the controller loaded?
401/403 errorsAuth config → is @Secured correct? Token valid?
Slow responseDatabase → run EXPLAIN on the slow query
TimeoutExternal service → is the downstream API responding?
Data missingSoft delete → is deleted_at set? Wrong query filter?
Service won't startBean creation → check @Factory and @Singleton wiring

4. Reproduce

  • Can you trigger the bug locally?
  • What's the minimal request that fails?
  • Does it fail consistently or intermittently?

5. Find Root Cause

Use git bisect if it's a regression:

git bisect start
git bisect bad HEAD
git bisect good <last-known-good-commit>
# Test each commit until you find the one that broke it

Use grep to find related code:

# Find where the error message comes from
grep -r "error message text" --include="*.kt" src/

# Find all callers of a broken function
grep -r "functionName" --include="*.kt" src/

6. Fix and Verify

  1. Write a test that reproduces the bug (red)
  2. Fix the code (green)
  3. Run full test suite
  4. Test manually if it's a user-facing issue

See common-issues.md for a catalog of frequently seen bugs and their fixes.

Gotchas

  • Don't fix the symptom, fix the cause. Adding a null check that hides a data issue means the data issue will bite you later.
  • Check the deploy log before blaming the code. Config changes, environment variable updates, and infra changes cause more outages than code bugs.
  • "It works on my machine" usually means environment difference. Compare local env vars, database state, and service versions with the target environment.
  • Intermittent failures are usually race conditions. If it fails 1 in 10 times, look for concurrent access, shared mutable state, or connection pool exhaustion.
  • Don't restart the service as your first debugging step. You'll lose the state that helps you diagnose. Read logs first, then restart if needed.
  • Soft-deleted records are the #1 "data missing" cause. Always check deleted_at IS NULL in your queries.

Rules

  • Always gather symptoms before changing code
  • Write a failing test before fixing
  • Check recent git history — most bugs are regressions
  • Don't deploy a fix without understanding the root cause
  • Document the incident if it affected users

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Creates RPC-style endpoint following layered architecture (Controller → Manager → Repository). Use when creating new API endpoints or CRUD operations.

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

c0x12c/ai-toolkit1092026년 6월 18일 업데이트

Write blog posts, guides, tutorials, and long-form content. Sounds like a real person, not AI. Use when the user wants polished written content.

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

c0x12c/ai-toolkit1092026년 6월 18일 업데이트

Design RPC-style APIs with layered architecture (Controller → Manager → Repository). Use when creating new API endpoints, designing API contracts, or reviewing API patterns.

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

c0x12c/ai-toolkit1092026년 6월 18일 업데이트

Run a structured brainstorm session for startup ideas. Takes a theme or problem and generates ideas with quick gut-checks. Use when the user wants to explore a space or generate new ideas.

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

c0x12c/ai-toolkit1092026년 6월 18일 업데이트

Run real browser QA with Playwright. Use when testing a frontend feature, verifying UI before PR, smoke testing after deploy, or investigating reported visual bugs.

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

c0x12c/ai-toolkit1092026년 6월 18일 업데이트

CI/CD pipeline patterns for GitHub Actions, PR automation, and deployment workflows. Use when setting up CI, fixing broken pipelines, automating PR checks, or configuring deployment.

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

c0x12c/ai-toolkit1092026년 6월 18일 업데이트

c0x12c의 스킬 모두 보기

이 스킬의 문제 신고