attckdigital/smith/smith-debug
Claude Code and agent skill by attckdigital/smith
- community
Checking that the SKILL.md file is still in the repository.
Diagnostic workflow that systematically gathers evidence, identifies root causes, and produces a structured debug report. Read-only — does not modify code. Output feeds into /smith-bugfix if a fix is needed.
Install
npx vskill@latest install attckdigital/smith/smith-debugSKILL.md
SpecKit Debug Workflow
A diagnostic-only workflow that systematically investigates errors, failures, and unexpected behavior across the project's services. Produces a structured debug report stored in the relevant system's .specify/ folder. Does NOT modify code — the report becomes input to /smith-bugfix if a fix is warranted.
Arguments: $ARGUMENTS
Vault Logging
Throughout this action, log significant events to the vault session log. Read the session log path from .smith/vault/.current-session. If the file is missing or the vault is not initialized, skip all logging silently.
Marker before first append: the workflow-gate denies markerless Bash redirection, so cat >> "$SESSION" appends are blocked until the active-workflow marker exists. Create the marker (Phase 0 helper) FIRST, then write the invocation entry immediately after — do not log before the marker.
Timestamps are UTC. HH:MM:SS comes from date -u +%H:%M:%S — never a local clock, never a time from memory. The append already runs through a shell, so read the clock in that same command (TS=$(date -u +%H:%M:%S)) and spend no extra tool call. Substitute the resulting value: an unexpanded $(...) reaching the log is a known regression and will not parse. Every hook-written stamp in this log is date -u, so a local-clock entry lands hours away from its neighbours and skews the workflow window hooks/workflow_summary_lib.py derives from them.
Append entries using this format:
Log at these points:
- On invocation — capture the verbatim user request AND the structured symptom description
- After symptom capture — structured fields extracted
- After triage — sub-agent findings summary
- After diagnosis — root cause identified or hypotheses ranked
- On completion — report path, user decision (bugfix/investigate/close)
Subagent Invocation Logging
Immediately before every Agent tool call in this workflow (especially the 4 triage agents in Phase 3), append a block to the session log. The Agent tool's return value does not expose subagent_type or model to the parent, so this is the only place that information can be captured.
HH:MM:SS here is UTC as well — date -u +%H:%M:%S, same rule as above. The subagent-vault-writeback.sh block that lands beside this one is hook-written and therefore already UTC; a local-clock invocation stamp would make a subagent appear to finish hours before it started.
After the Agent tool returns, the subagent-vault-writeback.sh hook automatically appends a matching "Subagent completed" block with metrics read from the sidechain transcript — do not duplicate that logging in the skill.
When to Use This
Use /smith-debug when:
- An error message or unexpected behavior needs investigation
- You're not sure what's broken or why
- Multiple services could be involved
- You want evidence before committing to a fix
Do NOT use when:
- The cause is already known and the fix is obvious — use
/smith-bugfixdirectly - You're building a new feature — use
/smith-new
Natural Language Triggers
If the user says any of the following (or similar phrases), treat it as invoking this command:
- "debug this"
- "help me debug..."
- "can you investigate..."
- "I'm getting this error..."
- "why is X failing"
- "something is broken"
- "help me figure out why..."
When triggered by natural language, synthesize the conversation history into the symptom description and proceed as if that was passed as $ARGUMENTS.
Ledger Context (Optional)
If .smith/vault/ledger/ exists and contains non-empty files, load relevant Ledger sections to inform diagnosis. If the directory is missing, empty, or unreadable, skip silently — the Ledger is purely additive and never required.
- Check:
ls .smith/vault/ledger/*.md 2>/dev/null - If files exist, read the following sections (higher-confidence entries first, truncate at ~2000 tokens per file):
.smith/vault/ledger/antipatterns.md(past failure modes — directly useful for narrowing hypotheses).smith/vault/ledger/edge-cases.md(known weird states the system has hit before).smith/vault/ledger/project-quirks.md(project-specific gotchas — e.g., "this service takes 30s to start, don't assume crash").smith/vault/ledger/tool-preferences.md(which diagnostic tools/commands are known to work well in this project)
- Use loaded entries as additional context during symptom capture, triage, and diagnosis. Especially use
antipatterns.mdto avoid re-investigating already-known failure modes from scratch, andproject-quirks.mdto skip false-positive theories. The Ledger informs judgment, it does not override evidence collected during this run. - Budget violation tracking: If any Ledger file was truncated (entries were dropped to fit within the ~2000 token budget per file), increment
context_budget_violationsin.smith/vault/ledger/.meta.jsonby 1. If.meta.jsondoes not exist, create it from the default template first. This signal tells the reconciliation system that the Ledger is too large for the configured budget.
Phase 0: Activate Workflow Tracking
Before any file is written (debug reports, vault logs, etc.), create an active-workflow marker so the workflow-gate hook (PreToolUse) allows subsequent writes. Without this, even the debug-report Write at the end of Phase 5 would be denied. The workflow-gate hook exempts the shipped helper by basename (per spec/31-workflow-gate-bootstrap) so the bootstrap runs even when no marker exists yet:
(Falls back to scripts/create-active-workflow.sh in repo-dev layouts.)
The marker is cleared at the end of Phase 6 (Decision Gate) regardless of which option the user picks. Use the shipped helper so this works under a Bash(rm:*) deny rule:
Phase 1: Symptom Capture (Interactive if needed)
Extract or ask for these structured fields from the user's description:
| Field | Description | Example | |
|---|---|---|---|
| Error message | Exact text of error or unexpected output | [Errno 111] Connection refused | |
| Trigger | What the user was doing when it happened | Running background reports | |
| Conditions | What else was running, recent changes, environment state | Sentiment analysis running concurrently | |
| Frequency | Always, sometimes, new, intermittent | Every time background reports run | |
| Affected service(s) | Best guess from the symptom | content-engine, sentiment-engine |
Interactive prompting
If the user's initial description is missing 2+ of these fields, ask a focused set of clarifying questions BEFORE proceeding. Present them as a numbered list the user can answer quickly:
Only ask for what's actually missing. If the description already covers 3+ fields, proceed directly — don't slow the user down with unnecessary questions.
If ALL fields are present in the initial description or $ARGUMENTS: skip prompting entirely and proceed to Phase 2.
Phase 2: System Detection
Determine which of this project's system(s) this debug session relates to. Derive the system list from the current project — never assume a fixed set of systems.
- Discover the project's systems in this priority order:
- If
.smith/index/manifest.mdexists, read it (and.smith/index/systems/) for the authoritative service-to-system mapping. Prefer/smith-navigate "<symptom>"if available — it returns the relevant system(s) for a task description directly. - Otherwise, list
.specify/systems/*/to enumerate the project's systems and read eachspec.mdfrontmatter (paths:) and body to understand what each covers. - If neither exists, treat the project as un-systematized: use a single default system folder (
.specify/) and skip system routing.
- Map the symptom to systems: match the affected service(s), ports, file paths, or component names from Phase 1 against the discovered systems. Use
paths:frontmatter and service/port references in each system'sspec.mdto route.
- If ambiguous: pick the most likely primary system and note secondary systems.
- Set the report path:
`` .specify/systems/<primary-system>/debug/debug-YYYY-MM-DD-<slug>.md ` Create the debug/` directory if it doesn't exist.
Phase 3: Automated Triage (Parallel Sub-agents)
Launch up to 4 diagnostic sub-agents in parallel. Each is read-only — no code modifications.
3.1 Infrastructure Health Agent
Model: haiku Task: Check the health of all services and resource usage.
3.2 Log Analysis Agent
Model: haiku Task: Search service logs for the error and surrounding context.
3.3 Dependency Trace Agent
Model: sonnet Task: Map the request path and check each hop.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassedPattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/smith-debug/SKILL.md
Popularity
- Repository stars
- 55
- Repository forks
- 8
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/attckdigital/smith/smith-debug)