debug — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited debug (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Apply a systematic, repeatable workflow to diagnose and resolve bugs. Avoid guessing — every hypothesis must be grounded in evidence.
Follow these six stages in order. Do not skip ahead — each stage builds on the previous one.
Before investigating, confirm you can trigger the bug reliably.
Actions:
Commands:
# Run the specific failing test
go test ./path/to/pkg -run TestFunctionName -v
# Re-run the command that triggers the error
<exact command the user reported>
# Check recent commits that may have introduced the bug
git log --oneline -10 -- <affected-file>
# Record environment details
go version
git log --oneline -3Checkpoint: You can reproduce the bug consistently before moving on.
Read the relevant code, logs, and context surrounding the failure.
Actions:
Commands:
# Read the file where the error occurs
cat src/affected-file.ts
# Trace imports and callers
grep -rn "functionName" --include="*.ts" .
# Check git blame for recent changes
git log --oneline -5 -- src/affected-file.ts
git blame src/affected-file.ts | head -40
# Find related tests
grep -rn "TestFunctionName\|functionName" --include="*_test.go" .
# Search for error handling around the area
grep -B 5 -A 5 "errorMessage" src/affected-file.tsCheckpoint: You understand what the code is doing, what it should do, and where the gap is.
Based on gathered evidence, propose possible root causes ranked by likelihood.
Actions:
Template:
## Hypothesis 1 (Most Likely)
- **Theory:** [description of suspected root cause]
- **Evidence for:** [what you've observed that supports this]
- **Evidence against:** [what contradicts this]
- **How to test:** [specific action to confirm or rule out]
## Hypothesis 2
- **Theory:** [description]
- **Evidence for:** [supporting observations]
- **Evidence against:** [contradicting observations]
- **How to test:** [specific action]Checkpoint: You have at least one testable hypothesis with a clear verification step.
Run targeted experiments to confirm or eliminate each hypothesis.
Actions:
Commands:
# Add debug logging temporarily
echo "DEBUG: variableName = $variableName" >&2
# Run with verbose output
go test ./path -v -run TestName
# Use a debugger or print statements to inspect state
# Check intermediate values at key points in the code
# If hypothesis is about a specific commit, test before/after
git stash # revert changes
go test ./... # does it pass?
git stash pop # restore changes
go test ./... # does it fail?Checkpoint: You have confirmed the root cause through targeted testing.
Apply the minimal fix that addresses the confirmed root cause.
Actions:
Guidelines:
Validate that the bug is resolved and nothing else broke.
Actions:
Commands:
# Re-run the original failing test
go test ./path/to/pkg -run TestFunctionName -v
# Run the full test suite
go test ./...
# Run vet/lint to catch additional issues
go vet ./...
# Check for leftover debug code
grep -rn "DEBUG\|TODO.*fix\|HACK" --include="*.go" .Checkpoint: The bug no longer reproduces, all tests pass, and no debugging artifacts remain.
Scenario: TestUserCreate returns a nil pointer error.
REPRO:
go test ./internal/user -run TestUserCreate -v
# Output: panic: runtime error: invalid memory address
# at user.Create(): user.go:42GATHER:
cat internal/user/user.go | head -50
# Line 42: result.Email = input.Email
# result is the return value of repository.FindByEmail()
grep -rn "FindByEmail" --include="*.go" .
# Found in internal/user/repository.go:28
cat internal/user/repository.go | sed -n '25,35p'
# FindByEmail returns nil, nil when no user is found (correct behavior)
# but caller doesn't check for nil before accessing .EmailHYPOTHESIS: The Create function calls FindByEmail to check for duplicates, but doesn't handle the nil-return case when no existing user is found.
TEST: Add a nil check before line 42 and re-run the test.
FIX: Add if result != nil { return nil, ErrAlreadyExists } before accessing result.Email.
VERIFY:
go test ./internal/user -run TestUserCreate -v # passes
go test ./internal/user/... -v # all user tests passScenario: API returns 500 on POST /api/orders intermittently.
REPRO:
curl -X POST localhost:3000/api/orders \
-H "Content-Type: application/json" \
-d '{"items": [{"id": 1, "qty": 1}]}'
# {"error": "internal server error"} — fails ~30% of the timeGATHER:
# Check server logs
tail -f logs/app.log | grep "order"
# Intermittent: "ERROR: connection refused to database"
# Check database connection pool config
cat config/database.go | grep -A 5 "Pool"
# MaxOpenConns: 5 (too low for production traffic)
# Check for long-running queries
grep -rn "SELECT" --include="*.go" src/order/ | head -10HYPOTHESIS: The connection pool is exhausted under load, causing intermittent connection failures. The 30% failure rate matches peak traffic patterns.
TEST: Increase pool to 20 and load-test locally.
FIX: Update MaxOpenConns to 20 and add connection timeout config.
VERIFY:
# Load test
ab -n 1000 -c 50 http://localhost:3000/api/orders
# All requests return 200, no connection errors in logsIf the bug cannot be reproduced:
If the root cause is in a third-party library:
If several independent issues contribute to the bug:
a subagent for a second perspective
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.