Débogage et contrôle Samara.app

VérifiéPrudence

Diagnostiquer et gérer Samara.app, le courtier de messages connectant iMessage à Claude. Vérifiez l'état, consultez les logs, redémarrez l'application et résolvez les problèmes d'accès disque complet.

Spar Skills Guide Bot
DeveloppementIntermédiaire
4002/06/2026
Claude Code
#samara#debug#message-broker#logs#restart

Recommandé pour

Notre avis

Diagnostiquer et gérer Samara.app, le courtier de messages entre iMessage et Claude, incluant vérification d'exécution, consultation des logs, redémarrage et contrôle des autorisations Full Disk Access.

Points forts

  • Fournit des commandes précises pour vérifier l'état de Samara et consulter les logs système
  • Permet de gérer les autorisations FDA et de résoudre les problèmes liés aux signatures de code
  • Propose une procédure de reconstruction sécurisée évitant les erreurs de certification
  • Inclut un rapport de diagnostic structuré pour identifier rapidement les problèmes

Limites

  • Dépend de la présence de scripts et de chemins spécifiques à l'installation de l'utilisateur
  • Ne couvre pas les causes profondes de plantages liées au code lui-même
  • L'utilisateur doit avoir les droits administrateur pour exécuter certaines commandes
Quand l'utiliser

Utilisez cette compétence lorsque les messages ne sont pas détectés, que Samara a planté ou que vous suspectez un problème d'autorisations FDA.

Quand l'éviter

Évitez cette compétence pour des problèmes de messagerie sans lien avec Samara (ex : problèmes réseau iOS) ou pour modifier le code source de l'application.

Analyse de sécurité

Prudence
Score qualité92/100

The skill primarily runs diagnostic Bash commands (pgrep, ps, log show) and manages a local application (pkill, open). These are legitimate for the stated purpose. However, the PreToolUse hook runs a script from an absolute path, which could be a vector if the script were compromised. No data exfiltration or system destruction commands are included.

Points d'attention
  • Uses PreToolUse hook that executes a local script (block-deriveddata-copy.sh). If the script were tampered with, it could introduce risk.

Exemples

Check Samara status and logs
Samara isn't detecting my text messages. Check if it's running, show recent logs, and verify FDA permissions.
Restart Samara after crash
Samara just crashed. Please restart it and confirm it's running properly.
Verify code signature after update
After rebuilding Samara, verify the code signature shows the correct Team ID (G4XVD3J52J) and FDA is intact.

name: samara description: Debug, check, or restart Samara.app - the message broker. Use when messages aren't being detected, Samara crashed, need to view logs, check Full Disk Access, or restart the app. Trigger words: samara, messages not working, restart, logs, FDA, broker. context: fork allowed-tools:

  • Bash
  • Read
  • Grep
  • Glob
  • Write hooks: PreToolUse:
    • matcher: "Bash" hooks:
      • type: command command: "/Users/claude/Developer/samara-main/.claude/hooks/block-deriveddata-copy.sh" timeout: 5

Samara Debug and Control

Diagnose and manage Samara.app, the message broker that connects iMessage to Claude.

Quick Actions

Check if Running

pgrep -fl Samara
ps aux | grep -i [S]amara

View Recent Logs

# Samara's own logs
tail -50 ~/.claude-mind/logs/samara.log 2>/dev/null

# System logs for Samara
log show --predicate 'process == "Samara"' --last 5m 2>/dev/null | tail -30

Restart Samara

# Kill if running
pkill -f Samara

# Wait a moment
sleep 2

# Relaunch
open /Applications/Samara.app

Tip: This sequence is a good candidate for the Bash subagent (Task tool with subagent_type=Bash) to avoid polluting context with intermediate steps.

Check Full Disk Access

# This will work if FDA is granted
ls ~/Library/Messages/chat.db && echo "FDA: OK" || echo "FDA: MISSING"

# Check code signature (Team ID must be stable)
codesign -d -r- /Applications/Samara.app 2>&1 | head -5

Common Issues

Messages Not Being Detected

  1. Check Samara is running
  2. Check FDA is intact
  3. Check chat.db is readable
  4. Look for errors in logs

Samara Crashed

  1. Check system logs for crash reason
  2. Restart with open /Applications/Samara.app
  3. If repeated crashes, may need rebuild

FDA Revoked After Update

This happens if Team ID changed during rebuild:

# Check current signature - MUST show G4XVD3J52J
codesign -d -r- /Applications/Samara.app 2>&1 | grep "subject.OU"

# If shows 7V9XLQ8YNQ or any other team: WRONG CERTIFICATE USED
# Must rebuild properly and re-grant FDA

Rebuild Samara

CRITICAL: ONLY use the update-samara script. NEVER copy from DerivedData.

A Claude instance previously broke FDA by copying a Debug build from ~/Library/Developer/Xcode/DerivedData/. This used automatic signing which picked the WRONG certificate and revoked all permissions.

The ONLY correct way to rebuild:

~/.claude-mind/bin/update-samara

FORBIDDEN (will break FDA):

  • cp -R ~/Library/Developer/Xcode/DerivedData/.../Samara.app /Applications/
  • xcodebuild -configuration Debug for deployment
  • Any manual copy of Samara.app to /Applications

Verify after rebuild:

codesign -d -r- /Applications/Samara.app 2>&1 | grep "subject.OU"
# Must show: G4XVD3J52J
# If shows: 7V9XLQ8YNQ - WRONG! FDA will be revoked

Diagnostic Report

When troubleshooting, gather:

  1. Is Samara running?
  2. FDA status
  3. Recent log errors
  4. Last successful message detection
  5. Code signature validity

Present findings clearly with recommended actions.

Related Skills

For specific issues, use these specialized skills:

  • /diagnose-leaks — Debug thinking traces or session IDs leaking into messages
  • /debug-session — Debug session management, batching, and task routing
  • /status — Quick system health check
Skills similaires