ops-pocket
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "ops-pocket" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-2804eb558340295e918f9e1464cebe8750c365f1dea5095ffd0fecc9f8c9d79b. Verify the upstream source and version against https://github.com/Lifecycle-Innovations-Limited/claude-ops before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
OPS on-demand skill: invoked when users request features such as “pocket memo” or “voice memo pipeline,” providing on-demand operations support and handling for those requests.
Introduction source: third_party · Lifecycle-Innovations-Limited · 0.0.1 Reference
SkillPi interpretation
- Tasks
- OPS on-demand: This skill should be used when the user asks to \"pocket memos\", \"voice memo pipeline\"…
- Software, accounts and paid services
- Delegate to the setup channel doc when it exists: If `pocket.md` does not exist, print the inline onboarding sequence: 1. Confirm `pocket-cli` (or equivalent Pocket API auth) is on PATH. 2. Drop a `whatsapp-config.json` and/or `email-config.json` under `$STATE_DIR` (see STATUS.md for schemas). 3. Run `bash $CLAUDE_PLUGIN_ROOT/scripts/install-pocket-notifier.sh` to register the launchd LaunchAgent. 4. Verify with `/ops:pocket status`. Per Rule 4 (background by default during setup) and Rule 2 (never delegate commands to the user) — run the install script via Bash with `run_in_background: true`. Per Rule 3, never auto-skip channel selection — if `whatsapp-config.json` and `email-config.json` a
- Testing
- Not tested
Browse files
Frontmatter
name: ops-pocket
description: "OPS on-demand: This skill should be used when the user asks to \"pocket memos\", \"voice memo pipeline\"…"
argument-hint: '[status|setup|tasks|test|logs [N]|restart|whatsapp on|off|email on|off]'
allowed-tools:
- Bash
- Read
- Grep
- Glob
- Skill
- AskUserQuestion
effort: low
maxTurns: 25OPS ► POCKET
Load ops-rules before acting. Public repo (no personal data). Outbound: one draft → one approval → one send. If AskUserQuestion / Workflow are missing, follow Rule 10 in ops-rules (Hermes: numbered options / two-turn Telegram card; delegate_task).
Surfaces the Pocket voice-memo pipeline as a discoverable slash command. The pipeline was previously orphaned — 7 scripts, no entry point. This skill is the entry point.
For the full architecture reference (every state file, every script, every failure mode) see STATUS.md sibling to this file.
Runtime Context
Before any route runs, resolve:
- State dir:
${POCKET_STATE_DIR:-$HOME/.claude/state/pocket}. Every file mentioned below is relative to this dir. - Plugin root:
${CLAUDE_PLUGIN_ROOT}— used to invoke pipeline scripts underscripts/. - Daemon health snapshot:
${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/daemon-health.json— surface itspocket-*service status if present.
If $POCKET_STATE_DIR does not exist on disk, the pipeline has never been bootstrapped — route to setup automatically (no autoroute on status if the user explicitly asked for status).
Routing table
Parse $ARGUMENTS and route immediately. First token decides the route.
| First arg | Route |
|---|---|
(empty) / status |
Status dashboard — daemon health + queue depths + cursors + counts |
setup |
Delegate to skills/setup/channels/pocket.md if present; else inline steps |
tasks |
Pending + in-progress + recently-completed task list |
test |
End-to-end synthetic completion test (covered below) |
logs [N] |
Tail N lines (default 50) of notifier + run + executor logs |
restart |
Kickstart launchd notifier + (re)spawn pocket-exec tmux supervisor |
whatsapp on / off |
Toggle WhatsApp self-chat sink |
email on / off |
Toggle email self-mail sink |
Anything else: print the routing table and exit.
Route — status (default)
The default route. Read state files, render a compact dashboard.
Read these — in parallel where possible:
STATE_DIR="${POCKET_STATE_DIR:-$HOME/.claude/state/pocket}"
# Daemon plist liveness
launchctl list com.claude-ops.pocket-activity-notifier 2>/dev/null \
| awk '/PID/{print "pid="$3} /LastExitStatus/{print "exit="$3}'
# Supervisor tmux session
tmux has-session -t pocket-exec 2>/dev/null && echo "tmux=up" || echo "tmux=down"
tmux list-windows -t pocket-exec 2>/dev/null | wc -l
# Queue depths (line counts)
wc -l < "$STATE_DIR/pending-triage.jsonl" 2>/dev/null
wc -l < "$STATE_DIR/tasks.jsonl" 2>/dev/null
wc -l < "$STATE_DIR/spawn-ledger.jsonl" 2>/dev/null
wc -l < "$STATE_DIR/supervisor-out-queue.jsonl" 2>/dev/null
# Completed reports
ls "$STATE_DIR/executor-results/"*.done.json 2>/dev/null | wc -l
# Last pull cursor
cat "$STATE_DIR/cursor.txt" 2>/dev/null
# Last 3 notifications (from out-queue-sent.jsonl)
tail -n 3 "$STATE_DIR/out-queue-sent.jsonl" 2>/dev/null
# Per-component health
for h in .activity-notifier-health .out-queue-health .email-bridge-health .health; do
cat "$STATE_DIR/$h" 2>/dev/null
done
Output format (desktop):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
OPS ► POCKET — [timestamp]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DAEMONS
watcher [running|stalled] last tick [Xs ago]
triage [running|idle]
executor watchdog [running|stalled] tmux pocket-exec=[up|down] (N windows)
activity-notifier [running|stalled] pid [N]
out-queue [running|disabled|error]
email-bridge [running|disabled|error]
QUEUES
pending-triage [N items] (awaiting ACT/SKIP decision)
tasks.jsonl [N items] (canonical task store)
spawn-ledger [N spawns]
out-queue [N pending]
executor-results [N .done.json]
CURSORS
watcher last pull [ISO timestamp from cursor.txt]
last completion [latest .done.json mtime]
CHANNELS
whatsapp [on|off|misconfigured] chat_jid=[masked tail]
email [on|off|misconfigured] to=[masked]
LAST 3 NOTIFICATIONS
[N. kind type | task_id | sent_at]
──────────────────────────────────────────────────────
Mobile mode (Rule 7 — $SSH_CONNECTION/$SSH_CLIENT/$SSH_TTY set OR $OPS_MOBILE=1 OR $COLUMNS<80): plain text lines, no boxes, no emoji prefixes:
pocket: watcher running, exec tmux=up, notifier pid=N
queues: triage 0, tasks 12 (3 active), out 0
last pull: 5m ago. last done: 12m ago.
channels: whatsapp on, email off.
After the dashboard, use AskUserQuestion (max 4 — Rule 1) ONLY if there is something actionable (stalled daemon, pending-triage > 0, etc.). On a clean board, exit silently.
Route — setup
Delegate to the setup channel doc when it exists:
SETUP_DOC="$CLAUDE_PLUGIN_ROOT/skills/setup/channels/pocket.md"
[[ -f "$SETUP_DOC" ]] && cat "$SETUP_DOC"
If pocket.md does not exist, print the inline onboarding sequence:
- Confirm
pocket-cli(or equivalent Pocket API auth) is on PATH. - Drop a
whatsapp-config.jsonand/oremail-config.jsonunder$STATE_DIR(see STATUS.md for schemas). - Run
bash $CLAUDE_PLUGIN_ROOT/scripts/install-pocket-notifier.shto register the launchd LaunchAgent. - Verify with
/ops:pocket status.
Per Rule 4 (background by default during setup) and Rule 2 (never delegate commands to the user) — run the install script via Bash with run_in_background: true. Per Rule 3, never auto-skip channel selection — if whatsapp-config.json and email-config.json are both missing, ask via AskUserQuestion which to configure first ([WhatsApp] / [Email] / [Both] / [Skip]).
Route — tasks
Render a single combined list. No AskUserQuestion — read-only by default.
STATE_DIR="${POCKET_STATE_DIR:-$HOME/.claude/state/pocket}"
# Pending triage (awaiting ACT/SKIP)
tail -n 50 "$STATE_DIR/pending-triage.jsonl" 2>/dev/null
# Live tasks (canonical store)
tail -n 50 "$STATE_DIR/tasks.jsonl" 2>/dev/null
# In-flight workers (windows in pocket-exec tmux, excluding _idle + supervisor)
tmux list-windows -t pocket-exec -F '#{window_name}' 2>/dev/null \
| grep -vE '^(_idle|supervisor)$'
# Recently completed (.done.json sorted by mtime, last 10)
ls -t "$STATE_DIR/executor-results/"*.done.json 2>/dev/null | head -10
Format:
PENDING TRIAGE (N)
[id] [created] [title]
ACTIVE TASKS (N)
[task_id] [status] [title] [started]
IN-FLIGHT WORKERS (N)
[tmux window name] [up since]
RECENTLY COMPLETED (last 10)
[task_id] [duration] [report file]
Route — test (synthetic end-to-end)
Smoke-tests the full notifier → out-queue → both bridges path without going through the watcher or triage. Same flow as the manual session-level test that was run when the notifier shipped.
Steps:
- Pre-flight: verify
$STATE_DIR/whatsapp-config.jsonORemail-config.jsonhasenabled: true. If neither: printnot configured — run /ops:pocket setupand exit. - Generate a synthetic task_id like
test-$(date +%s). - Append a tasks.jsonl entry for the synthetic task (so the notifier can title-resolve it):
echo "{\"task_id\":\"$TID\",\"title\":\"synthetic pocket test\",\"created_at\":\"$(date -u +%FT%TZ)\",\"verdict\":\"ACT\"}" \ >> "$STATE_DIR/tasks.jsonl" - Drop a synthetic
.done.jsonintoexecutor-results/:cat > "$STATE_DIR/executor-results/$TID.done.json" <<EOF {"task_id":"$TID","status":"done","completed_at":"$(date -u +%FT%TZ)","report_file":"$TID.out.md"} EOF echo "# Synthetic test report\n\nThis is a test artifact from /ops:pocket test." \ > "$STATE_DIR/executor-results/$TID.out.md" - Manually invoke the notifier once (don't wait 60s for launchd):
"$CLAUDE_PLUGIN_ROOT/scripts/ops-pocket-activity-notifier.py" --once 2>&1 | tail -20(If
--onceis not supported, run the script withPOCKET_NOTIFIER_ONESHOT=1env var, or justpython3 ops-pocket-activity-notifier.py.) - Drain both bridges in parallel:
"$CLAUDE_PLUGIN_ROOT/scripts/ops-pocket-out-queue.py" 2>&1 | tail -10 "$CLAUDE_PLUGIN_ROOT/scripts/ops-pocket-email-bridge.py" 2>&1 | tail -10 - Verify delivery — for each enabled channel:
- WhatsApp: tail
$STATE_DIR/out-queue-sent.jsonlfor an entry with the synthetic task_id. (Do NOT usemcp__whatsapp__list_messages— the bridge's own sent ledger is the source of truth.) - Email: tail
$STATE_DIR/email-bridge.logforSENTon the synthetic task_id.
- WhatsApp: tail
- Cleanup:
rm -f "$STATE_DIR/executor-results/$TID.done.json" \ "$STATE_DIR/executor-results/$TID.out.md"Leave the
tasks.jsonlline (append-only log; harmless).
Report:
POCKET ► TEST
task_id: [tid]
whatsapp: [SENT|SKIPPED-disabled|FAIL: reason]
email: [SENT|SKIPPED-disabled|FAIL: reason]
duration: [Xs]
If any channel fails, surface the last error line from the corresponding *.log and .health file.
Route — logs [N]
N="${ARG_2:-50}"
STATE_DIR="${POCKET_STATE_DIR:-$HOME/.claude/state/pocket}"
for f in activity-notifier.log run.log executor.log out-queue.log email-bridge.log; do
echo "==> $f <=="
tail -n "$N" "$STATE_DIR/$f" 2>/dev/null || echo "(missing)"
done
For Rule 7 mobile mode, default N=20 and skip per-file headers.
Route — restart
# 1. Kickstart the launchd activity-notifier
launchctl kickstart -k "gui/$(id -u)/com.claude-ops.pocket-activity-notifier" 2>&1
# 2. (Re)spawn the pocket-exec supervisor via the executor watchdog cron script
"$CLAUDE_PLUGIN_ROOT/scripts/ops-cron-pocket-executor.py" 2>&1 | tail -10
If the launchd label is missing (notifier never installed), prompt via AskUserQuestion: [Install notifier now] / [Skip]. On install: run scripts/install-pocket-notifier.sh (Rule 4: run_in_background: true).
Route — whatsapp on|off and email on|off
Both routes mutate a small JSON config file. Never overwrite the whole file — patch in place.
STATE_DIR="${POCKET_STATE_DIR:-$HOME/.claude/state/pocket}"
CFG="$STATE_DIR/whatsapp-config.json" # or email-config.json
ACTION="${ARG_2}" # on | off
mkdir -p "$STATE_DIR"
if [[ ! -f "$CFG" ]]; then
# Bootstrap empty config with enabled=false so subsequent `on` is meaningful.
echo '{"enabled":false}' > "$CFG"
fi
case "$ACTION" in
on) python3 -c "import json,sys,pathlib; p=pathlib.Path('$CFG'); d=json.loads(p.read_text()); d['enabled']=True; p.write_text(json.dumps(d,indent=2))" ;;
off) python3 -c "import json,sys,pathlib; p=pathlib.Path('$CFG'); d=json.loads(p.read_text()); d['enabled']=False; p.write_text(json.dumps(d,indent=2))" ;;
*) echo "usage: /ops:pocket {whatsapp|email} {on|off}"; exit 2 ;;
esac
# Echo new state
cat "$CFG"
Required keys per channel (validated by status):
whatsapp-config.json—chat_jid(WhatsApp JID of the self-chat, e.g.<digits>@s.whatsapp.net).email-config.json—to(self-email address).
If on is requested but the required key is missing, switch state to enabled: false and route the user to setup via AskUserQuestion.
Rule reminders
- Rule 1: Max 4 options per
AskUserQuestion. None of the routes above need more. - Rule 2: Never delegate commands to the user — every command runs through Bash.
- Rule 3: Never auto-skip channels in
setup— always ask explicitly. - Rule 4: Background by default in
setup(run_in_background: true). - Rule 5: This skill performs NO destructive ops — no deletes, no terminates, no force-kills beyond
launchctl kickstart -k(which is a graceful restart, not a wipe). - Rule 6: No outbound comms staged from this skill except the synthetic test message in
test, which goes to the operator's OWN self-chat / self-email (already enabled by the user) — not to third parties. Per-message approval rule is satisfied by the test being a no-args opt-in. - Rule 7: Mobile mode renders plain text only — see
statusexample.
Native tool usage
AskUserQuestion: only when there is a real choice to make (stalled daemon → restart? missing channel config → bootstrap?). Never required on a green status.Skill:setuproute may delegate to the setup channel doc.
See also
STATUS.md— full architecture: 8 scripts, every state file, lifecycle, troubleshooting.scripts/ops-cron-pocket-watcher.py,scripts/ops-pocket-triage.py,scripts/ops-cron-pocket-executor.py,scripts/ops-pocket-activity-notifier.py,scripts/ops-pocket-out-queue.py,scripts/ops-pocket-email-bridge.py,scripts/ops-pocket-whatsapp-bridge.py.scripts/install-pocket-notifier.sh,scripts/com.claude-ops.pocket-activity-notifier.plist.templates/pocket-supervisor-prompt.md— the prompt the long-lived supervisor runs under.
Version history
-
v3.12.1
GitHub ↗
Original release notes
### Fixed - ops-task-reminder: the portable lock now runs the whole counter transaction under a real fcntl.flock, so one worker can no longer remove another's fresh lock and lose counter updates.
-
v3.12.0
GitHub ↗
Original release notes
### Changed Add /ops:ops-mix and evidence-only A&R mix-evidence mode using the configured Mixforge engine.
-
v3.11.0
GitHub ↗
Original release notes
### Changed Release safety, maintenance and inbox fixes from #1033: passive daemon monitoring, timezone-safe AWS audit dates, fail-closed release merge gates (same-head CI, Copilot review, resolved threads), progressive inbox with attachment and archive read-back proofs, and gate-only outbound wording in ops-desk and ops-leadgen.
-
v3.10.29
GitHub ↗
Original release notes
### Fixed - `ops-speedup --clean` stays under 60s: on macOS it skips the slow login-items query (#1036); on Linux it skips the unused disk-reclaim scan and keeps the page cache unless `--aggressive` is set (#1035). - `ops-inbox` shows validated drafts as soon as each one is ready instead of after the whole scan (#1031). ### Changed - Hooks `ops-pretool-skill-update` and `ops-task-reminder` run async; the reminder takes a per-session lock so concurrent runs no longer lose counts, and it now also resets on Task* tools (#1032).
-
v3.10.28
GitHub ↗
Original release notes
### Changed ops-ar: Cyanite schema drift (fileUploadRequest id, ID! upload var), real auth test via libraryTracks, webhook must verify HMAC-SHA512 Signature, bpmRangeAdjusted vs bpmPrediction, Soundcharts app-id/key pairing.
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的语音备忘录流水线运维管理功能
- 解决实际运维痛点,具备高频使用价值
- 功能覆盖全面:状态监控、任务管理、测试验证、日志查看等
Areas to improve
-
触发词边界场景覆盖不全 Reported severity: Minor
argument-hint 覆盖了主要命令,但对某些边界参数(如纯数字、特殊字符)的处理未明确说明
Recommendation: 补充对边界参数的处理说明,或在文档中明确参数格式要求
Highlights
- argument-hint 提供了清晰的命令结构
- 支持多种运维操作命令,覆盖完整
Highlights
- 文档结构清晰,分路由详细说明
- 每个路由都有完整的执行流程和输出格式
- 包含移动端适配规则和错误处理机制
Areas to improve
-
环境变量依赖未充分验证 Reported severity: Minor
多个脚本路径依赖 CLAUDE_PLUGIN_ROOT 等环境变量,但未提供完整的验证机制
Recommendation: 在执行前增加环境变量存在性检查,并提供友好的错误提示
Highlights
- 工具使用规范,参数处理正确
- 异常处理机制完善,包含多种错误场景处理
- 不可逆操作有确认机制,符合安全规范
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Read local files
Limit access to selected files or the project directory. Avoid unrelated private records, secrets and configuration files.
Mentioned in main document · lines 299, 300 -
Save or modify files
Confirm the output directory and whether existing files will be replaced. Back up important files and prefer a new output directory.
Mentioned in main document · lines 299, 300
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Delegate to the setup channel doc when it exists: If `pocket.md` does not exist, print the inline onboarding sequence: 1. Confirm `pocket-cli` (or equivalent Pocket API auth) is on PATH. 2. Drop a `whatsapp-config.json` and/or `email-config.json` under `$STATE_DIR` (see STATUS.md for schemas). 3. Run `bash $CLAUDE_PLUGIN_ROOT/scripts/install-pocket-notifier.sh` to register the launchd LaunchAgent. 4. Verify with `/ops:pocket status`. Per Rule 4 (background by default during setup) and Rule 2 (never delegate commands to the user) — run the install script via Bash with `run_in_background: true`. Per Rule 3, never auto-skip channel selection — if `whatsapp-config.json` and `email-config.json` a
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.