Troubleshoot
Systematic debugging with 5-step loop for issues in spaces/[project]/. Use when encountering bugs, test failures, or unexpected behavior.
MCP get_skill({ skillId: "troubleshoot-6e26ab7e" })Use this skill with your agent
Create a free account and connect via MCP
# /troubleshoot
Systematic debugging using a 5-step loop: Research → Hypothesize → Implement → Test → Document.
## Usage
```bash
/troubleshoot yourbench "tests failing after auth changes"
/troubleshoot yourbench 001 # Debug in context of issue
/troubleshoot coordinatr # General debugging session
```
## The 5-Step Loop
```
┌─────────────────────────────────────────────┐
│ │
│ 1. Research → 2. Hypothesize → 3. Implement│
│ ↑ ↓ │
│ │ │ │
│ └──────── 5. Document ← 4. Test ──────│
│ │ │
│ ↓ │
│ (if not fixed, repeat) │
│ │
└─────────────────────────────────────────────┘
```
## Step Details
### Step 1: Research
**Before guessing, understand:**
```bash
# Check existing research
Glob: resources/research/*.md
Glob: ideas/[project]/notes/research/*.md
# Search for similar issues in codebase
Grep: spaces/[project]/ for error message
# Check library docs via Context7
# WebSearch for error messages, known issues
```
Spawn research-specialist agent for:
- Unfamiliar error messages
- Library/framework behavior
- Best practices for the pattern
### Step 2: Hypothesize
**Form ONE hypothesis:**
```markdown
Hypothesis: Query fires before auth state is set
Evidence:
- isLoading is true when query executes
- Error occurs only on initial load
- Works after manual refresh
Debug Plan:
1. Add console.log before query
2. Check auth state timing
3. Verify order of operations
```
**Only one hypothesis at a time.** Multiple theories = confusion.
### Step 3: Implement
**Apply fix + add debugging:**
```typescript
// Add liberal debug logging
console.log('[Auth] State before query:', authState);
console.log('[Query] Executing with user:', user?.id);
// Implement the fix
if (!authState.isReady) {
console.log('[Query] Waiting for auth...');
return;
}
```
### Step 4: Test
**Validate the fix:**
```bash
cd spaces/[project]
# Run specific tests
npm test -- --grep "auth"
# Run full suite
npm test
# Manual verification if needed
npm run dev
```
**NEVER claim "fixed" without tests passing.**
### Step 5: Document
**Update WORKLOG with findings:**
```markdown
## YYYY-MM-DD - Troubleshooting Loop 1
**Hypothesis**: Query fires before auth state is set
**Debug findings**:
- isLoading was true when query executed
- Auth state not propagating to component
- Race condition between auth init and query
**Implementation**: Added auth state check before query
**Result**: ✓ Fixed - 47/47 tests passing
**Gotcha**: Auth state needs explicit ready check, not just truthy
```
### If Not Fixed
1. **Rollback changes**: `git checkout -- .`
2. **Document what you learned**
3. **Return to Step 1** with new information
## Execution Modes
### Mode 1: During TASK Implementation
```bash
/troubleshoot yourbench 001 "tests failing"
```
1. Read: TASK.md, PLAN.md, WORKLOG.md for context
2. Execute 5-step loop
3. Document in issue's WORKLOG.md
4. Continue with `/implement` when fixed
### Mode 2: Standalone Debugging
```bash
/troubleshoot yourbench "login broken on Safari"
```
1. Investigate without issue context
2. Document findings
3. Suggest creating BUG issue if significant
## Key Rules
1. **Research BEFORE guessing**
2. **ONE hypothesis at a time**
3. **Liberal debug logging** - `console.log('[Component] State:', data)`
4. **NEVER claim "fixed"** without tests passing
5. **Rollback on failure** before next attempt
6. **Document everything** for future reference
## Workflow
```
/implement → (issue occurs) → /troubleshoot → /worklog → /implement
```
**After fixing:**
- Add WORKLOG entry with findings
- Continue implementation
- Or create BUG issue if recurring problemRelated Skills
More skills in Software Engineering
Accessibility Standards
Comprehensive web accessibility standards based on WCAG 2.2 AA, with 38+ anti-patterns, legal enforcement context (EAA, ADA Title II), WAI-ARIA patterns, and framework-specific fixes for modern web frameworks and libraries.
Accord
Authoring unified specification packages across Business/Development/Design teams via staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria). No code. Use when authoring cross-team specs, building L0-L3 packages, or aligning Biz/Dev/Design on a single source of truth.
Acquire Codebase Knowledge
Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.
Acreadiness Assess
Run the AgentRC readiness assessment on the current repository and produce a static HTML dashboard at reports/index.html. Wraps `npx github:microsoft/agentrc readiness` and hands off rendering to the @ai-readiness-reporter custom agent. Supports policies (--policy) for org-specific scoring. Use when asked to assess, audit, or score the AI readiness of a repo.
Acreadiness Generate Instructions
Generate tailored AI agent instruction files via AgentRC instructions command. Produces .github/copilot-instructions.md (default, recommended for Copilot in VS Code) plus optional per-area .instructions.md files with applyTo globs for monorepos. Use after running /acreadiness-assess to close gaps in the AI Tooling pillar.
Acreadiness Policy
Help the user pick, write, or apply an AgentRC policy. Policies customise readiness scoring by disabling irrelevant checks, overriding impact/level, setting pass-rate thresholds, or chaining org baselines with team overrides. Use when the user asks about strict mode, AI-only scoring, custom weights, CI gating, or wants org-wide standardisation.
Explore Other Categories
Skills from other categories with shared topics
Brief
Create or update project brief through interactive discovery. Use when starting any new idea, revisiting an idea after time away, or when vision feels unclear.
Critique
Challenge idea assumptions with skeptical VC-style evaluation. Use when user requests critique, validation, or 'is this a good idea' assessment.
Daily Review
Complete daily journal review. Use at end of day or next morning to fill in journal sections, review highlights, and plan tomorrow. Triggers on "daily review", "end of day", "journal review", "what did I do today".