skills/arcadeai/debugging/SKILL.md
Four-phase debugging framework that ensures root cause identification before fixes. Use when encountering bugs, test failures, unexpected behavior, or when previous fix attempts failed. Enforces investigate-first discipline ('debug this', 'fix this error', 'test is failing', 'not working').
npx skillsauth add aiskillstore/marketplace debuggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Find root cause before fixing. Symptom fixes are failure.
Iron Law: NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
Answer IN ORDER. Stop at first match:
Use especially when:
Complete each phase before proceeding.
BEFORE attempting ANY fix:
1. Read Error Messages Completely
Don't skip past errors. They often contain the exact solution.
- Full stack trace (note line numbers, file paths)
- Error codes and messages
- Warnings that preceded the error
2. Reproduce Consistently
| Can reproduce? | Action | | --------------- | ---------------------------------------------------- | | Yes, every time | Proceed to step 3 | | Sometimes | Gather more data - when does it happen vs not? | | Never | Cannot debug what you cannot reproduce - gather logs |
3. Check Recent Changes
git diff HEAD~5 # Recent code changes
git log --oneline -10 # Recent commits
What changed that could cause this? Dependencies? Config? Environment?
4. Trace Data Flow (Root Cause Tracing)
When error is deep in call stack:
Symptom: Error at line 50 in utils.js
↑ Called by handler.js:120
↑ Called by router.js:45
↑ Called by app.js:10 ← ROOT CAUSE: bad input here
Technique:
5. Multi-Component Systems
When system has multiple layers (API → service → database):
# Log at EACH boundary before proposing fixes
echo "=== Layer 1 (API): request=$REQUEST ==="
echo "=== Layer 2 (Service): input=$INPUT ==="
echo "=== Layer 3 (DB): query=$QUERY ==="
Run once to find WHERE it breaks. Then investigate that layer.
1. Find Working Examples
Locate similar working code in same codebase. What works that's similar?
2. Identify Differences
| Working code | Broken code | Could this matter? | | ---------------- | -------------- | ------------------ | | Uses async/await | Uses callbacks | Yes - timing | | Validates input | No validation | Yes - bad data |
List ALL differences. Don't assume "that can't matter."
1. Form Single Hypothesis
Write it down: "I think X is the root cause because Y"
Be specific:
2. Test Minimally
| Rule | Why | | ------------------------ | ---------------------- | | ONE change at a time | Isolate what works | | Smallest possible change | Avoid side effects | | Don't bundle fixes | Can't tell what helped |
3. Evaluate Result
| Result | Action | | --------------- | --------------------------------------- | | Fixed | Phase 4 (verify) | | Not fixed | NEW hypothesis (return to 3.1) | | Partially fixed | Found one issue, continue investigating |
1. Create Failing Test
Before fixing, write test that fails due to the bug:
it('handles empty input without crashing', () => {
// This test should FAIL before fix, PASS after
expect(() => processData('')).not.toThrow();
});
2. Implement Fix
3. Verify
4. If Fix Doesn't Work
| Fix attempts | Action | | ------------ | ---------------------------------------- | | 1-2 | Return to Phase 1 with new information | | 3+ | STOP - Question architecture (see below) |
5. After 3+ Failed Fixes: Question Architecture
Pattern indicating architectural problem:
STOP and ask:
If you catch yourself thinking:
| Thought | Reality | | ---------------------------------------------- | --------------------------------- | | "Quick fix for now, investigate later" | Investigate NOW or you never will | | "Just try changing X" | That's guessing, not debugging | | "I'll add multiple fixes and test" | Can't isolate what worked | | "I don't fully understand but this might work" | You need to understand first | | "One more fix attempt" (after 2+ failures) | 3+ failures = wrong approach |
ALL mean: STOP. Return to Phase 1.
| Phase | Key Question | Success Criteria | | ----------------- | ------------------------------------- | ---------------------------------- | | 1. Root Cause | "WHY is this happening?" | Understand cause, not just symptom | | 2. Pattern | "What's different from working code?" | Identified key differences | | 3. Hypothesis | "Is my theory correct?" | Confirmed or formed new theory | | 4. Implementation | "Does the fix work?" | Test passes, issue resolved |
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.