- Home
- Skills
- Testing & Debugging
- evidence driven debugging
evidence driven debugging
An evidence-based debugging specialist that isolates root causes and verifies fixes through controlled experimentation.
$1.98
Works with the AI Agents you already use
evidence driven debugging
Example session with this skill installed
I'm seeing intermittent NullPointerExceptions in the OrderService. It happens roughly 5% of the time during checkout. Here is the stack trace and the service code. Find the cause and fix it.
- Read your context and instructions
- Compiled the evidence driven debugging
I have analyzed the stack trace and the OrderService.java file. The crash occurs at line 142 when accessing user.getProfile().getPreferences(). The evidence suggests a race condition where the profile is loaded asynchronously but not awaited before the checkout logic executes.
Investigation & Fix Report
| Category | Details |
|---|---|
| Symptom | Intermittent NullPointerException at OrderService.java:142. |
| Trigger | Rapid checkout clicks or high-latency profile service responses (estimated 5% frequency). |
| Evidence | Stack trace shows Thread-14 accessing a null reference while Thread-22 is still executing ProfileLoader.load(). |
| Hypothesis | The Order object is initialized with a reference to a User whose Profile field is lazily populated without proper synchronization. |
| Verification | Created a unit test using a CountDownLatch to simulate a slow profile load. The test successfully reproduced the NPE 100% of the time. |
Root Cause Fix
// order-service/src/main/java/com/app/service/OrderService.java
public void processCheckout(OrderRequest request) {
User user = userService.findById(request.getUserId());
// FIX: Ensure profile is fully loaded before proceeding
// Previous code assumed user.getProfile() was already populated by the interceptor
synchronized(user) {
if (user.getProfile() == null) {
log.info("Profile not ready for user {}, initiating synchronous load", user.getId());
user.setProfile(profileService.loadProfileSync(user.getId()));
}
}
UserPreferences prefs = user.getProfile().getPreferences();
// ... remaining checkout logic
}
Next steps
- Review the
synchronizedblock performance impact under high load. - Verify if
profileService.loadProfileSynchandles database timeouts correctly. - Merge the newly created regression test
OrderServiceTest#testCheckoutWithLatencyinto the CI pipeline.
Connects securely to your tools. The creator never sees your data.
About this skill
This skill provides a structured, evidence-based approach to debugging complex, recurring, or intermittent software defects. It moves away from "guess-and-check" methods by enforcing a rigorous workflow of symptom analysis, hypothesis testing, and regression verification. The agent identifies trigger conditions, analyzes logs and stack traces, and constructs minimal reproduction cases to isolate the root cause before writing a single line of fix code.
What it does
- Symptom Analysis documents the gap between expected and actual behavior, identifying specific trigger conditions and environmental factors.
- Evidence Collection extracts diagnostic value from logs and stack traces while maintaining data privacy by filtering sensitive information.
- Hypothesis Testing manages multiple candidate causes using a structured template to record supporting and conflicting evidence.
- Minimal Reproduction creates isolated test cases with minimal dependencies to reliably trigger the failure signal.
- Verified Repair implements targeted fixes that address the root cause without introducing regressions or modifying unrelated behavior.
How it works
- Scope definition starts by analyzing the user's reported symptoms and available logs to determine if a fix or just an investigation is required.
- Evidence mapping connects observed failures to specific code locations, distinguishing between inferred logic and actual execution data.
- Controlled experimentation runs targeted tests to isolate variables, updating the hypothesis based on pass/fail results.
- Implementation and verification applies the fix and runs both the reproduction case and related boundary tests to ensure stability.
Frameworks & tools
This tool is language-agnostic and works with any stack providing logs, stack traces, or source code. It excels when integrated with testing frameworks like Jest, Pytest, or JUnit to automate reproduction and regression suites.
Why this beats prompting it yourself
Generic prompts often lead to superficial fixes that merely suppress symptoms or "swallow" exceptions. This skill enforces a scientific method that requires verifiable proof for every claim, preventing the common cycle of "fix-break-repeat" by ensuring the bug is actually understood before it is touched.
Use cases
- Root Cause Analysis for bugs that have reappeared after previous "fixes".
- Intermittent Error Isolation involving race conditions, timeouts, or flaky external dependencies.
- Log-Based Debugging when a production error is reported without clear reproduction steps.
- Regression Guarding to ensure a specific bug never returns by building a high-fidelity test case.
Known limitations
Does not support direct production system access or replaying real-time transactions. It cannot resolve issues where critical input data or environment configurations are missing from the context.
No direct production environment access. Requires sufficient log/context data to form hypotheses. Cannot guarantee a fix for non-deterministic bugs without repeatable signals.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 25 days ago
Permissions
No special permissions declared or detected