.claude/skills/debug-session/SKILL.md
--- name: debug-session description: Debug Samara session management, message batching, and task routing. Use when messages are scrambled, batching seems wrong, group chats behave oddly, or concurrent tasks interfere with each other. Trigger words: session, batch, group chat, concurrent, scrambled, task routing. context: fork allowed-tools: - Bash - Read - Grep --- # Debug Session Management Diagnose issues with Samara's message batching, session continuity, and task routing. ## Session
npx skillsauth add claudeaceae/samara-main .claude/skills/debug-sessionInstall 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.
Diagnose issues with Samara's message batching, session continuity, and task routing.
Messages arrive
│
▼
SessionManager buffers (11 sec)
│
▼
TaskRouter classifies tasks
│
├─► Conversation ──► invokeBatch (with session)
├─► Webcam ────────► invokeIsolated (no session)
├─► WebFetch ──────► invokeIsolated (no session)
└─► Skill ─────────► invokeIsolated (no session)
│
▼
MessageBus sends response (with source tag)
# View session state files
ls ~/.claude-mind/memory/sessions 2>/dev/null | head -30
# Check for stale locks
cat ~/.claude-mind/state/locks/system-cli.lock 2>/dev/null
ls -la ~/.claude-mind/state/locks/system-cli.lock
# Look for batch processing in logs
grep -E "(Buffering|batch|BatchReady)" ~/.claude-mind/system/logs/samara.log | tail -20
# Check batch sizes
grep "Processing batch of" ~/.claude-mind/system/logs/samara.log | tail -10
# Look for isolated vs session-based invocations
grep -E "(Isolated invocation|Resuming session|Starting new session)" ~/.claude-mind/system/logs/samara.log | tail -20
# Group chat routing decisions
grep -E "(group chat|chatIdentifier|isGroupChat)" ~/.claude-mind/system/logs/samara.log | tail -20
# Look for routing warnings
grep -E "(WARNING.*group|looks like group)" ~/.claude-mind/system/logs/samara.log | tail -10
Symptom: Responses seem to mix answers to different questions Cause: Multiple task types in same batch not properly isolated Check:
# Look for multiple task types in same batch
grep -B5 -A5 "Processing batch" ~/.claude-mind/system/logs/samara.log | tail -30
Fix: TaskRouter should classify and isolate parallel tasks
Symptom: Context lost between messages Cause: Session ID not being passed correctly Check:
# Check session recording
grep "Recorded session" ~/.claude-mind/system/logs/samara.log | tail -10
# Check session retrieval
grep "Retrieved session" ~/.claude-mind/system/logs/samara.log | tail -10
Symptom: Response sent to 1:1 instead of group
Cause: isGroupChat flag not set correctly
Check:
# Check routing decisions
grep "Routing decision" ~/.claude-mind/system/logs/samara.log | tail -10
Symptom: Messages acknowledged but never answered Cause: TaskLock stuck or QueueProcessor not running Check:
# Check lock status
cat ~/.claude-mind/state/locks/system-cli.lock
# Check queue processor
grep "QueueProcessor" ~/.claude-mind/system/logs/samara.log | tail -10
# Force release stale lock if needed
# rm ~/.claude-mind/state/locks/system-cli.lock
| Request Type | Detection | Isolation | |--------------|-----------|-----------| | Conversation | Default | Uses session | | Webcam | "webcam", "camera", "photo" | Isolated | | WebFetch | URLs, "check this" | Isolated | | Skill | Starts with "/" | Isolated |
| File | Purpose |
|------|---------|
| ~/.claude-mind/memory/sessions/*.json | Per-chat session state |
| ~/.claude-mind/state/locks/system-cli.lock | Current task lock |
| ~/.claude-mind/state/message-queue.json | Pending messages |
When debugging session issues, gather:
development
# /webhook --- name: webhook description: Manage webhook sources - list, add, test, and view incoming events context: fork triggers: - webhook - add webhook - create webhook - webhook setup - incoming webhooks --- Manage the webhook receiver system. Use this skill to add new webhook sources, test existing ones, and view incoming events. ## What You Can Do 1. **List sources** - Show all registered webhook sources 2. **Add source** - Create a new webhook source with secure secret 3.
testing
Check crypto wallet balances, transaction history, and addresses
testing
# /voice-call - FaceTime Voice Calling Place and receive FaceTime Audio calls with live transcription and voice/text responses. ## Quick Start ```bash # Full voice conversation (responds via FaceTime audio) ~/.claude-mind/system/bin/voice-call --voice-response # Call with text responses (via iMessage) ~/.claude-mind/system/bin/voice-call --text-response # Call a specific number ~/.claude-mind/system/bin/voice-call +15551234567 --voice-response ``` ## Prerequisites Run `audio-setup --check
tools
--- name: sync description: Check for drift between repo and running system. Use when checking if scripts or Samara are out of sync, verifying system integrity, or before/after rebuilds. Trigger words: sync, organism sync, check drift, system drift, repo sync. context: fork allowed-tools: - Bash - Read - Grep --- # Sync Skill Check for drift between the repo and running system, and optionally fix it. ## What This Does Runs the `sync-organism` script to detect differences between: - `~/