debug-systematically
Use when encountering errors or bugs to follow a systematic debugging process instead of jumping to conclusions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when encountering errors or bugs to follow a systematic debugging process instead of jumping to conclusions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Generic migration orchestrator that reads CHANGELOG.md to understand and execute version-specific migrations
Determine feature slug interactively by auto-detecting next number and prompting user for description
Share personal documents to the shared namespace with atomic git commit and push
Use when creating implementation plans to generate properly structured plans with phases, success criteria, and project references.
Use when documenting research findings to create properly structured research documents with frontmatter, sections, and file references.
ALWAYS check this skill before using grep, glob, Task tool, or doing any codebase exploration. Guides you to use specialized agents that are more efficient than basic tools.
| name | debug-systematically |
| description | Use when encountering errors or bugs to follow a systematic debugging process instead of jumping to conclusions. |
Follow a structured debugging process when encountering errors or unexpected behavior.
Goal: Confirm the error consistently occurs
Example:
# Reproduce the error
make test
# Document output
Error: undefined method 'foo' on line 42
Goal: Narrow down to specific component/function
Example:
# Test individual components
go test ./pkg/auth/handler_test.go -v -run TestLogin
# Isolate to specific function
go test ./pkg/auth -v -run TestLogin/valid_credentials
Goal: Form testable theories about the cause
Examples:
Goal: Verify each hypothesis systematically
Example:
// Test hypothesis 1: nil pointer
if handler.service == nil {
log.Printf("DEBUG: service is nil")
}
// Test hypothesis 2: check types
log.Printf("DEBUG: user type=%T, expected=*User", user)
Goal: Apply fix and verify it resolves the issue
Example:
// Fix: Initialize service before use
func NewHandler() *Handler {
return &Handler{
service: NewAuthService(), // was missing
}
}
Goal: Add tests to prevent regression
Example:
func TestHandlerWithNilService(t *testing.T) {
// Ensure handler initialization is correct
h := NewHandler()
require.NotNil(t, h.service)
}
Don't jump to conclusions:
Don't make multiple changes at once:
Don't assume error messages are wrong:
log.Printf("DEBUG: variable=%+v", variable)
# Go
dlv debug ./cmd/app
# Node
node --inspect-brk app.js
# Python
python -m pdb app.py
# Run single test
go test -v -run TestSpecificFunction
npm test -- --testNamePattern="specific test"
pytest tests/test_file.py::test_function
Problem: Test failing with "unexpected nil pointer"
Step 1 - Reproduce:
make test
# Output: TestLogin: unexpected nil pointer at handler.go:42
Step 2 - Isolate:
go test ./pkg/auth -v -run TestLogin
# Isolated to auth package, Login function
Step 3 - Hypothesize:
Step 4 - Test:
// Add logging at handler.go:42
log.Printf("DEBUG: handler=%+v", handler)
// Output shows handler.service is nil
Step 5 - Fix:
// In NewHandler()
return &Handler{
service: NewAuthService(), // Fix: was missing
}
Step 6 - Prevent:
func TestNewHandler(t *testing.T) {
h := NewHandler()
require.NotNil(t, h.service)
}