.agents/skills/tmux-status-debug/SKILL.md
Debug and test tmux pane status detection for AI agents (opencode, claude, amp). Use when patterns aren't matching, status icons are wrong, or adding new detection patterns.
npx skillsauth add edmundmiller/dotfiles tmux-status-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
tmux list-panes -a -F "#{session_name}:#{window_name}.#{pane_index} #{pane_current_command}" | grep -E "opencode|claude|amp"
tmux capture-pane -t "main:1" -p -S -30 | tail -40
tmux capture-pane -t "main:1" -p -S -30 | cat -v | tail -40
tmux capture-pane -t "main:1" -p -S -20 | grep -o "pattern"
Create /tmp/debug_status.py and run with the Nix Python that has libtmux:
import sys
sys.path.insert(0, "/Users/emiller/.config/dotfiles/packages/tmux-opencode-integrated/scripts")
import smart_name
import re
import libtmux
server = libtmux.Server()
for session in server.sessions:
for window in session.windows:
for pane in window.panes:
program = smart_name.get_pane_program(pane)
if program in smart_name.AGENT_PROGRAMS:
print(f"\n=== {program} in {session.name}:{window.name} ===")
try:
cmd_output = pane.cmd("capture-pane", "-p", "-S", "-20").stdout
if isinstance(cmd_output, list):
content = "\n".join(cmd_output)
else:
content = str(cmd_output)
cleaned = smart_name.strip_ansi_and_control(content)
print(f"Last 300 chars (cleaned):\n{cleaned[-300:]}")
print(f"\n--- Status: {smart_name.get_opencode_status(pane)} ---")
except Exception as e:
print(f"Error: {e}")
# Build the package and get the store path
nix build .#tmux-opencode-integrated --no-link --print-out-paths
# Check wrapper to find Python path
head -10 /nix/store/<hash>-tmux-opencode-integrated-*/share/tmux-plugins/tmux-opencode-integrated/scripts/smart-name.sh
# Run debug script with that Python
/nix/store/<python-hash>-python3-*-env/bin/python3 /tmp/debug_status.py
Test patterns against sample content:
import re
content = """ctrl+t variants tab agents ctrl+p commands • OpenCode 1.1.30"""
patterns = [
(r"OpenCode \d+\.\d+\.\d+", "IDLE - version"),
(r"ctrl\+p commands", "IDLE - status bar"),
(r"esc interrupt", "BUSY - can interrupt"),
(r"Esc to cancel", "BUSY - can cancel"),
(r"■■■", "BUSY - progress bar"),
]
for pattern, desc in patterns:
if re.search(pattern, content, re.IGNORECASE):
print(f"✓ {desc}: {pattern}")
Order matters - first match wins:
smart_name.pytests/test_smart_name.pyuvx pytest tests/test_smart_name.py -vnix build .#tmux-opencode-integratedUsing wrong Python. Must use the Nix-wrapped Python from the package.
Terminal control characters may be interfering. The strip_ansi_and_control() function should handle this, but check with cat -v to see raw content.
Check if content contains error-like strings from previous output. The detection looks at last 20 lines of pane content.
development
Read-only Linear issue access via the Linear GraphQL API.
data-ai
## <!-- Purpose: Teach agents fast day-to-day memory browse/search/read/sync workflows in pi-context-repo. --> name: searching-memory description: > Search, browse, and inspect memory quickly in pi-context-repo. Use when asked to find prior notes, inspect memory files, locate preferences, or sync recent memory updates. Trigger phrases: "search memory", "list memory files", "find in memory", "read memory file", "memory status", "sync memory". --- # Searching Memory Use this workflow for fast
development
Comprehensive guide for initializing or reorganizing agent memory into a deeply hierarchical file structure. Use when running /init, when user asks to set up memory, or when memory needs a major reorganization. Trigger phrases: "initialize memory", "set up memory", "populate memory", "build my memory", "memory init".
data-ai
Decomposes and reorganizes agent memory files into focused, single-purpose components. Use when memory has large multi-topic blocks, redundancy, or poor organization. Trigger phrases: "defrag memory", "reorganize memory", "clean up memory files", "split memory blocks".