feat: add setup skill with scripted steps (#258)
Replace inline SKILL.md instructions with executable shell scripts for each setup phase (environment check, deps, container, auth, groups, channels, mounts, service, verify). Scripts emit structured status blocks for reliable parsing. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
18
.claude/skills/setup/scripts/05b-list-groups.sh
Executable file
18
.claude/skills/setup/scripts/05b-list-groups.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# 05b-list-groups.sh — Query WhatsApp groups from the database.
|
||||
# Output: pipe-separated JID|name lines, most recent first.
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"
|
||||
DB_PATH="$PROJECT_ROOT/store/messages.db"
|
||||
|
||||
LIMIT="${1:-30}"
|
||||
|
||||
if [ ! -f "$DB_PATH" ]; then
|
||||
echo "ERROR: database not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sqlite3 "$DB_PATH" "SELECT jid, name FROM chats WHERE jid LIKE '%@g.us' AND jid <> '__group_sync__' AND name <> jid ORDER BY last_message_time DESC LIMIT $LIMIT"
|
||||
Reference in New Issue
Block a user