Debug banner
humanlayer humanlayer

Debug

Testing community intermediate

Description

You are tasked with helping debug issues during manual testing or implementation. This command allows you to investigate problems by examining logs, database state, and git history without editing fil

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for humanlayer/humanlayer, shared by 11 entries in this directory. It describes the repository, not this entry specifically.


description: Debug issues by investigating logs, database state, and git history

Debug

You are tasked with helping debug issues during manual testing or implementation. This command allows you to investigate problems by examining logs, database state, and git history without editing files. Think of this as a way to bootstrap a debugging session without using the primary window's context.

Initial Response

When invoked WITH a plan/ticket file:

I'll help debug issues with [file name]. Let me understand the current state.

What specific problem are you encountering?
- What were you trying to test/implement?
- What went wrong?
- Any error messages?

I'll investigate the logs, database, and git state to help figure out what's happening.

When invoked WITHOUT parameters:

I'll help debug your current issue.

Please describe what's going wrong:
- What are you working on?
- What specific problem occurred?
- When did it last work?

I can investigate logs, database state, and recent changes to help identify the issue.

Environment Information

You have access to these key locations and tools:

**Logs** (automatically created by `make daemon` and `make wui`):

  • MCP logs: ~/.humanlayer/logs/mcp-claude-approvals-*.log
  • Combined WUI/Daemon logs: ~/.humanlayer/logs/wui-${BRANCH_NAME}/codelayer.log
  • First line shows: [timestamp] starting [service] in [directory]

**Database**:

  • Location: ~/.humanlayer/daemon-{BRANCH_NAME}.db
  • SQLite database with sessions, events, approvals, etc.
  • Can query directly with sqlite3

**Git State**:

  • Check current branch, recent commits, uncommitted changes
  • Similar to how commit and describe_pr commands work

**Service Status**:

  • Check if daemon is running: ps aux | grep hld
  • Check if WUI is running: ps aux | grep wui
  • Socket exists: ~/.humanlayer/daemon.sock

Process Steps

Step 1: Understand the Problem

After the user describes the issue:

  1. **Read any provided context** (plan or ticket file):

    • Understand what they're implementing/testing
    • Note which phase or step they're on
    • Identify expected vs actual behavior
  2. **Quick state check**:

    • Current git branch and recent commits
    • Any uncommitted changes
    • When the issue started occurring

Step 2: Investigate the Issue

Spawn parallel Task agents for efficient investigation:

Task 1 - Check Recent Logs:
Find and analyze the most recent logs for errors:
1. Find latest daemon log: ls -t ~/.humanlayer/logs/daemon-*.log | head -1
2. Find latest WUI log: ls -t ~/.humanlayer/logs/wui-*.log | head -1
3. Search for errors, warnings, or issues around the problem timeframe
4. Note the working directory (first line of log)
5. Look for stack traces or repeated errors
Return: Key errors/warnings with timestamps
Task 2 - Database State:
Check the current database state:
1. Connect to database: sqlite3 ~/.humanlayer/daemon.db
2. Check schema: .tables and .schema for relevant tables
3. Qu