pratos/clanker-setup/source-command-debug

Claude Code and agent skill by pratos/clanker-setup

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Debug issues by investigating logs, system state, and git history

Install

npx vskill@latest install pratos/clanker-setup/source-command-debug

SKILL.md

source-command-debug

Use this skill when the user asks to run the migrated source command debug.

Command Template

Debug

You are tasked with helping debug issues during development or after system changes. This command allows you to investigate problems by examining logs, system state, and git history without editing files. Think of this as a way to bootstrap a debugging session.

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 do?
- What went wrong?
- Any error messages?
I'll investigate the logs, system state, 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, system state, and recent changes to help identify the issue.

Environment Information

You have access to these key locations and tools:

Nix/Darwin Logs:

  • System build output from just rebuild or just switch
  • Nix evaluation errors from nix flake check
  • Home-manager activation logs

System State:

  • Current Nix generation: darwin-rebuild --list-generations
  • Active system profile: ls -la /run/current-system
  • Home-manager generation: home-manager generations

Git State:

  • Check current branch, recent commits, uncommitted changes
  • Diff against last known-good state

Service Status:

  • Homebrew services: brew services list
  • launchd services: launchctl list | grep -i [service]
  • Nix daemon: launchctl list | grep nix

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
  1. 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 recent build/activation logs:
1. Check if `just rebuild` output shows errors
2. Look for Nix evaluation errors
3. Search for home-manager activation issues
4. Check system log for service failures: `log show --predicate 'eventMessage contains "error"' --last 5m`
Return: Key errors/warnings with timestamps
Task 2 - System State:
Check the current system configuration state:
1. Current darwin generation: `darwin-rebuild --list-generations | tail -5`
2. Home-manager state: `home-manager generations | head -5`
3. Any broken symlinks in home directory
4. Nix store health: `nix-store --verify --check-contents 2>&1 | tail -20`
Return: Relevant system state findings
Task 3 - Git and File State:
Understand what changed recently:
1. Check git status and current branch
2. Look at recent commits: `git log --oneline -10`
3. Check uncommitted changes: `git diff`
4. Verify expected files exist
5. Look for any file permission issues
Return: Git state and any file issues
Step 3: Present Findings

Based on the investigation, present a focused debug report:

markdown
## Debug Report
### What's Wrong
[Clear statement of the issue based on evidence]
### Evidence Found
**From Logs**:
-[Error/warning with timestamp]
-[Pattern or repeated issue]
**From System State**:
-[Current generation info]
-[Service status]
**From Git/Files**:
-[Recent changes that might be related]
-[File state issues]
### Root Cause
[Most likely explanation based on evidence]
### Next Steps
1.**Try This First**:
```bash
[Specific command or action]
```
2.**If That Doesn't Work**:
-Roll back to previous generation: `darwin-rebuild switch --rollback`
-Check flake lock: `nix flake metadata`
-Run with verbose output: `just rebuild 2>&1 | tee /tmp/rebuild.log`
### Can't Diagnose?
Some issues might be outside my reach:
-GUI application behavior
-Network-dependent service issues
-Hardware-specific problems
Would you like me to investigate something specific further?

Important Notes

  • Focus on Nix/Darwin debugging - This is a Nix-based system configuration repo
  • Always require problem description - Can't debug without knowing what's wrong
  • Read files completely - No limit/offset when reading context
  • No file editing - Pure investigation only
  • Guide back to user - Some issues need manual intervention

Quick Reference

Build/Check:

bash
just rebuild # Build without switching
just switch # Switch to new generation
just lint # Check all formatting
nix flake check # Validate flake

System Info:

bash
darwin-rebuild --list-generations | tail -5
home-manager generations | head -5
nix-info -m # System info for bug reports

Git State:

bash
git status
git log --oneline -10
git diff

Service Debugging:

bash
brew services list
launchctl list | grep -i [service]
log show --predicate 'eventMessage contains "[keyword]"' --last 10m

Remember: This command helps you investigate without burning the primary context. Perfect for when you hit an issue and need to dig into logs, system state, or git history.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/pratos/clanker-setup/source-command-debug/badge)](https://verified-skill.com/skills/pratos/clanker-setup/source-command-debug)

Something wrong with this skill or its page? Tell us.