Add ask-claude and ask-hermes skills
This commit is contained in:
29
ask-claude/scripts/ask_claude.sh
Normal file
29
ask-claude/scripts/ask_claude.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
# ask_claude.sh - Hermes-side wrapper for ask-claude skill
|
||||
# Delegates to the deployed ask.sh on 10.0.0.28
|
||||
# Source of truth: ~/claude/hermes_support/ask.sh + merge.py on 10.0.0.28
|
||||
#
|
||||
# Usage: ask_claude.sh "question" [session_id]
|
||||
#
|
||||
# This is a thin caller. The real logic lives in:
|
||||
# ssh n8n@10.0.0.28 ~/claude/hermes_support/ask.sh --qfile <file> [--resume SID]
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
Q=$1
|
||||
SID=${2:-}
|
||||
|
||||
# Write question to temp file
|
||||
QFILE=$(mktemp /tmp/ask-claude-q-XXXXXX.txt)
|
||||
trap "rm -f $QFILE" EXIT
|
||||
echo "$Q" > "$QFILE"
|
||||
|
||||
# Delegate to deployed ask.sh on 10.0.0.28
|
||||
if [ -n "$SID" ]; then
|
||||
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new -o ServerAliveInterval=30 n8n@10.0.0.28 \
|
||||
"~/claude/hermes_support/ask.sh --resume $SID --qfile $QFILE"
|
||||
else
|
||||
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=accept-new -o ServerAliveInterval=30 n8n@10.0.0.28 \
|
||||
"~/claude/hermes_support/ask.sh --qfile $QFILE"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user