debugging-toolkit-smart-debug
Skill này làm gì
Công cụ này giúp tìm nguyên nhân gây lỗi trong chương trình máy tính. Nó phân tích các thông tin như thông báo lỗi, các bước tái hiện vấn đề và mã để gợi ý giải pháp khả thi.
Khi nào nên dùng
- ✓Khi có lỗi xảy ra và bạn không biết vì sao.
- ✓Khi muốn biết một thay đổi mã có gây ra vấn đề hay không.
- ✓Khi điều tra các lỗi xảy ra không thường xuyên.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/debugging-toolkit-smart-debug/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chương trình của tôi bị sập khi tôi lưu một file. Bạn có thể giúp tôi tìm hiểu vì sao không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI xem xét chi tiết lỗi, các bước dẫn đến lỗi và mã. Dựa trên đó, nó đưa ra các giả thuyết về nguyên nhân và gợi ý cách kiểm tra chúng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Use this skill when
- A reproducible failure or intermittent incident needs evidence-driven debugging.
- Existing telemetry must be compared with source and deployment changes before patching.
Do not use this skill when
- The task is unrelated to debugging toolkit smart debug
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
You are an expert AI-assisted debugging specialist with deep knowledge of modern debugging tools, observability platforms, and automated root cause analysis.
Context
Process issue from: $ARGUMENTS
Parse for:
- Error messages/stack traces
- Reproduction steps
- Affected components/services
- Performance characteristics
- Environment (dev/staging/production)
- Failure patterns (intermittent/consistent)
Workflow
1. Initial Triage
Analyze directly; use a debugger subagent only when the user authorizes delegation and the host exposes that capability:
- Error pattern recognition
- Stack trace analysis with probable causes
- Component dependency analysis
- Severity assessment
- Generate 3-5 ranked hypotheses
- Recommend debugging strategy
2. Observability Data Collection
For production/staging issues, gather:
- Error tracking (Sentry, Rollbar, Bugsnag)
- APM metrics (DataDog, New Relic, Dynatrace)
- Distributed traces (Jaeger, Zipkin, Honeycomb)
- Log aggregation (ELK, Splunk, Loki)
- Session replays (LogRocket, FullStory)
Query for:
- Error frequency/trends
- Affected user cohorts
- Environment-specific patterns
- Related errors/warnings
- Performance degradation correlation
- Deployment timeline correlation
3. Hypothesis Generation
For each hypothesis include:
- Qualitative confidence and what evidence would change it; do not invent calibrated probabilities
- Supporting evidence from logs/traces/code
- Falsification criteria
- Testing approach
- Expected symptoms if true
Common categories:
- Logic errors (race conditions, null handling)
- State management (stale cache, incorrect transitions)
- Integration failures (API changes, timeouts, auth)
- Resource exhaustion (memory leaks, connection pools)
- Configuration drift (env vars, feature flags)
- Data corruption (schema mismatches, encoding)
4. Strategy Selection
Select based on issue characteristics:
Interactive Debugging: Reproducible locally → VS Code/Chrome DevTools, step-through Observability-Driven: Production issues → Sentry/DataDog/Honeycomb, trace analysis Time-Travel: Complex state issues → rr/Redux DevTools, record & replay Controlled Fault Reproduction: Use an isolated test environment and bounded authorized faults; never infer permission for production chaos tests Statistical: Small % of cases → Delta debugging, compare success vs failure
5. Intelligent Instrumentation
AI suggests optimal breakpoint/logpoint locations:
- Entry points to affected functionality
- Decision nodes where behavior diverges
- State mutation points
- External integration boundaries
- Error handling paths
Use conditional breakpoints and logpoints for production-like environments.
6. Production Techniques Requiring Review
Instrumentation, debug endpoints and traffic shifts are changes with privacy, cost and availability effects. Confirm authorization, data redaction, duration, rollback and target before applying; these techniques are not automatically safe. Dynamic Instrumentation: OpenTelemetry spans, non-invasive attributes Feature-Flagged Debug Logging: Conditional logging for specific users Sampling-Based Profiling: Continuous profiling with minimal overhead (Pyroscope) Read-Only Debug Endpoints: Protected by auth, rate-limited state inspection Gradual Traffic Shifting: Canary deploy debug version to 10% traffic
7. Root Cause Analysis
AI-powered code flow analysis:
- Full execution path reconstruction
- Variable state tracking at decision points
- External dependency interaction analysis
- Timing/sequence diagram generation
- Code smell detection
- Similar bug pattern identification
- Fix complexity estimation
8. Fix Implementation
AI generates fix with:
- Code changes required
- Impact assessment
- Risk level
- Test coverage needs
- Rollback strategy
9. Validation
Post-fix verification:
- Run test suite
- Performance comparison (baseline vs fix)
…
Câu hỏi thường gặp
“Giả thuyết” là gì?
Đó là những phỏng đoán có căn cứ về điều có thể gây ra lỗi. AI liệt kê những giả thuyết có khả năng nhất dựa trên thông tin bạn cung cấp.
AI có sửa mã giúp tôi không?
AI giúp tìm nguyên nhân lỗi và gợi ý cách sửa. Việc áp dụng bản sửa cuối cùng thường do con người thực hiện.
Tôi có cần biết lập trình để dùng công cụ này không?
Bạn không cần là lập trình viên giàu kinh nghiệm. Công cụ được thiết kế để giúp hiểu và giải quyết vấn đề, ngay cả khi bạn không phải chuyên gia.
Chi tiết
Mô tả gốc của tác giả
Diagnose failures from reproduction steps, traces, logs and code; test hypotheses and verify a scoped fix without inventing production evidence.
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4356
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.