diagnose
Diagnose bugs, errors, and issues with root cause analysis. Use when asked to diagnose, debug, investigate, or find root cause of any problem — whether a wipnote bug ID, error message, unexpected behavior, or delegation audit.
What this skill does
# /wipnote:diagnose General-purpose diagnostic skill for investigating bugs, errors, and unexpected behavior. ## Usage ``` /wipnote:diagnose <bug-id> # Investigate a specific bug /wipnote:diagnose <error or symptom> # Investigate an error or behavior /wipnote:diagnose --delegation # Audit delegation compliance (legacy mode) ``` ## When to Activate Trigger on: - "diagnose", "debug", "investigate", "root cause", "why is this broken" - A bug ID like `bug-5126e3cf` - An error message or symptom description - "why isn't X working", "what's wrong with", "figure out why" - "delegation audit", "delegation score" (routes to delegation mode) ## Work Item Attribution All diagnostic work must be attributed: - Bug investigation: `wipnote bug start <bug-id>` before investigating - New errors: `wipnote bug create "Error: description" --track <trk-id>` then start it - Run `wipnote help` for available commands ## Instructions for Claude ### Route by Input **If given a bug ID** (matches `bug-*`): 1. Start attribution: `wipnote bug start <bug-id>` 2. Fetch bug details: `wipnote bug show <bug-id>` 3. Dispatch the debugger agent with the bug context 4. Present findings and suggested fix **If given an error message or symptom**: 1. Create and start a bug: `wipnote bug create "<summary>" --track <trk-id>` then `wipnote bug start <id>` 2. Dispatch the debugger agent with the error context 3. Present findings and suggested fix **If `--delegation` flag**: 1. Run the delegation audit (see Delegation Mode below) **If no arguments**: 1. Check project health: `wipnote recommend --top 3` 2. Identify bottlenecks, stale items, or anomalies 3. Suggest what to investigate ### Bug Investigation (Primary Mode) Dispatch `use @researcher` with a structured prompt: ```text ## Bug: <bug-id> — <title> ### Symptom <description from bug or user> ### Investigation Steps 1. Search codebase for relevant code paths 2. Read the source files involved 3. Identify the root cause with file paths and line numbers 4. Check if the issue affects other cases beyond the reported one 5. Query SQLite or run CLI commands to verify current state 6. Propose a fix (describe what to change, don't implement) ### Report Format - **Root cause**: What's wrong and where (file:line) - **Blast radius**: Does this affect other cases? - **Suggested fix**: What code change resolves it - **Verification**: How to confirm the fix works ``` After the agent reports back, present findings to the user in this format: ```markdown ## Diagnosis: <bug-id> **Root cause:** <one-line summary> **Location:** `<file>:<line>` **Blast radius:** <scope of impact> ### Details <agent's detailed findings> ### Suggested Fix <what to change> ### Next Steps - [ ] Implement fix - [ ] Run tests: `go test ./...` - [ ] Verify: <specific verification command> ``` ### Delegation Audit Mode (--delegation) When `--delegation` is specified, audit the current session's delegation compliance: 1. **Collect data**: ```bash wipnote status sqlite3 .wipnote/wipnote.db " SELECT tool_name, COUNT(*) as count FROM agent_events WHERE session_id = (SELECT session_id FROM agent_events ORDER BY timestamp DESC LIMIT 1) GROUP BY tool_name ORDER BY count DESC; " ``` 2. **Compute score**: `delegations / (delegations + direct_impl + git_writes) * 100` - Delegations = Task + Agent calls - Direct impl = Edit + Write calls - Git writes = Bash calls containing git commit/push/merge 3. **Present report**: ```markdown ## Delegation Diagnostic ### Score: X% (N/M actions delegated) ### Gaps Found | Time | Tool | Action | Should Use | |------|------|--------|------------| | ... | ... | ... | ... | ### Recommendations 1. ... ```
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.