feat(skills): spawn-delegate, angel-positions, inbox-manager, sys-health

Four skills that wire Tiger into its own control plane (requires
TIGER_BRIDGE_TOKEN in the container env): delegate work to specialists,
read live P&L (read-only, never trades), manage the TASKS.md inbox,
self-diagnose host RAM/gateway/bridge health.
This commit is contained in:
Manohar 2026-06-10 14:59:41 +00:00
parent 197c43dfee
commit 0fcc209020
4 changed files with 154 additions and 0 deletions

View file

@ -0,0 +1,25 @@
---
name: angel-positions
description: Read Manohar's live Angel One trading positions and P&L from the standalone position-tracker. Use when asked about positions, profit/loss, exposure, or how the portfolio is doing right now. Read-only — this skill can never place, modify, or close trades.
---
# Angel One Positions (read-only)
The standalone position-tracker (own repo/deploy) is the single source of
truth for live positions. Endpoint:
```bash
curl -s https://angel.manohargupta.com/api/positions
```
Response: array of positions with `tradingsymbol`, `exchange`, `netqty`,
`ltp`, `avg_price`, `unrealised_pnl` (₹), `realised_pnl` (₹).
## Reporting rules
- Always report P&L in ₹ with the sign, per position and total.
- Note market hours: NSE/BSE trade 09:1515:30 IST MonFri; outside those
hours, LTP is stale — say so.
- Alert threshold context: ₹5,000 absolute move is the alerting band the
tracker uses; reference it when relevant.
- NEVER suggest trades. Report and analyze only. If asked to execute
anything, decline — execution stays with Manohar.

View file

@ -0,0 +1,39 @@
---
name: inbox-manager
description: Manage the TASKS.md INBOX — the queue the bridge drains every 30 minutes (9:0020:00 IST), dispatching each item to the right specialist automatically. Use when Manohar says "add to my tasks/inbox/queue", wants something done later or recurring-ish, or asks what's pending. Also supports triggering an immediate drain.
metadata:
{
"moltbot":
{
"emoji": "📥",
"requires": { "env": ["TIGER_BRIDGE_TOKEN"] },
"primaryEnv": "TIGER_BRIDGE_TOKEN",
},
}
---
# INBOX Manager
`~/.openclaw/workspace/TASKS.md` has a `## 📥 INBOX` section. Each
`- [ ] task` line gets auto-dispatched: the bridge classifies it, spawns the
right specialist, rewrites the line to `- [⏳ run-id → agent]`, and the
result lands on Telegram.
## Add a task
Append ONE line under the `## 📥 INBOX` header (before the next `## `):
```
- [ ] research upcoming SECI BESS tenders and summarize timelines
```
Write tasks self-contained — the specialist gets no chat context.
## List pending
Read TASKS.md and report the unchecked `- [ ]` lines under INBOX, in order
(top item dispatches first).
## Drain now (don't wait for the 30-min cycle)
```bash
curl -s -X POST http://172.17.0.1:3456/tiger/inbox/drain \
-H "Authorization: Bearer $TIGER_BRIDGE_TOKEN"
```
Dispatches exactly ONE item (the top one). Outside 9:0020:00 IST the
manual drain still works (force=true server-side).

View file

@ -0,0 +1,49 @@
---
name: spawn-delegate
description: Delegate work to Tiger's specialist sub-agents (Cody=code, Ethan=research, Cathy=writing, Elon=planning) and check on their runs. Use whenever a task is substantial enough to hand off — the specialist runs in its own session and reports to Telegram when done, so you stay free for the conversation. Also use to list recent runs or fetch a run's full result.
metadata:
{
"moltbot":
{
"emoji": "🤝",
"requires": { "env": ["TIGER_BRIDGE_TOKEN"] },
"primaryEnv": "TIGER_BRIDGE_TOKEN",
},
}
---
# Spawn / Delegate to Specialists
The bridge (host) exposes real sub-agent execution. You hold the bearer
token in `$TIGER_BRIDGE_TOKEN`. Bridge base URL from inside this container:
`http://172.17.0.1:3456`.
## Who does what
- **cody** — code, debugging, devops, scripts, infra
- **ethan** — research, market/policy analysis, due diligence
- **cathy** — writing, summaries, reports, drafts
- **elon** — planning, prioritization, breaking down projects
## Delegate a task
```bash
curl -s -X POST http://172.17.0.1:3456/tiger/spawn \
-H "Authorization: Bearer $TIGER_BRIDGE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agentId":"ethan","task":"<one clear, self-contained task>","context":"<optional background>"}'
```
Returns `{runId, sessionId, queued}`. Runs execute one at a time
(RAM-constrained host) — `queued > 0` means it waits its turn.
Completion is announced on Telegram automatically; you do NOT need to poll.
## Check runs
```bash
# recent runs + queue state
curl -s http://172.17.0.1:3456/tiger/spawn/runs -H "Authorization: Bearer $TIGER_BRIDGE_TOKEN"
# one run, full reply
curl -s http://172.17.0.1:3456/tiger/spawn/runs/<runId> -H "Authorization: Bearer $TIGER_BRIDGE_TOKEN"
```
## Rules
- Write the task so it stands alone — the specialist has NO chat context.
- One task per spawn. Split compound requests.
- Don't spawn for things you can answer in one turn yourself.

View file

@ -0,0 +1,41 @@
---
name: sys-health
description: Check the health of the Tiger Command Center itself — RAM/swap pressure on the VPS, LLM gateway reachability, bridge status, recent audit events, cron run outcomes. Use when asked "is everything running", "why is it slow", after failures, or proactively when your own turns feel sluggish.
metadata:
{
"moltbot":
{
"emoji": "🩺",
"requires": { "env": ["TIGER_BRIDGE_TOKEN"] },
"primaryEnv": "TIGER_BRIDGE_TOKEN",
},
}
---
# System Health
## Memory pressure (the #1 failure mode on this host)
/proc inside the container shows HOST memory:
```bash
grep -E 'MemTotal|MemAvailable|SwapTotal|SwapFree' /proc/meminfo
```
Interpretation: MemAvailable under ~800MB or swap more than half used means
agent turns will crawl and cron jobs may hit their 300s timeouts. Say so
explicitly and recommend deferring heavy work.
## LLM gateway (all models route through it)
```bash
curl -s -o /dev/null -w '%{http_code}' https://llm.manohargupta.com/health/liveliness
```
Anything but 200 = every agent in the system is degraded.
## Bridge + recent activity
```bash
curl -s http://172.17.0.1:3456/tiger/status -H "Authorization: Bearer $TIGER_BRIDGE_TOKEN"
# last 20 audited events (spawns, cron, tasks, outputs):
curl -s 'http://172.17.0.1:3456/tiger/activity/audit?limit=20' -H "Authorization: Bearer $TIGER_BRIDGE_TOKEN"
```
## Report format
Lead with a one-line verdict (healthy / degraded / critical), then only the
metrics that are off. Quantify with numbers and units.