[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76X8JYX72KTPJKX8PS213PJ":3,"skill-same:01M76X8JYX72KTPJKX8PS213PJ":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M76X8JYX72KTPJKX8PS213PJ","tbot-controller",null,"Operate TradingBoat\u002FTBOT (TBOT runtime stack) via a controlled automation interface (DB-first queries; lifecycle control on explicit request).","javimosch\u002Fopen-claw-skills","javimosch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12900508?v=4","01M6D3F2AS6PV75ET9PZ1QGP8J","Javier Leandro Arancibia","01M75B8NCTAJG9WH5YNZH7C3D8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fplusgenie\u002Ftbot-controller\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: tbot-controller\nversion: 1.0.0\nauthor: PlusGenie\ntags: [openclaw, tbot, tradingboat, trading, docker, ibkr]\ndescription: Operate TradingBoat\u002FTBOT (TBOT runtime stack) via a controlled automation interface (DB-first queries; lifecycle control on explicit request).\nmetadata: {\"openclaw\":{\"emoji\":\"🛥️\",\"requires\":{\"bins\":[\"uv\"]},\"install\":[{\"id\":\"uv-brew\",\"kind\":\"brew\",\"formula\":\"uv\",\"bins\":[\"uv\"],\"label\":\"Install uv (brew)\"}]}}\n---\n\n## What this skill does\n- Query TBOT sqlite DB for alerts\u002Forders\u002Ferrors\u002Fportfolio (DB-first)\n- Start\u002Fstop TradingBoat\u002FTBOT (docker compose or systemd)\n- Fetch health\u002Fstatus (containers, ports, basic checks) only when explicitly requested\n- Read recent logs only when explicitly requested\n\n## Safety rules\n- Default to **read-only** operations (status\u002Flogs) unless user explicitly requests a control action.\n- For any state-changing action (start\u002Fstop\u002Frestart\u002Fsend), require explicit confirmation via the flag **--run-it** or environment variable **RUN_IT=1**. The controller will refuse execution otherwise.\n- Never print secrets (webhook keys, tokens). Redact them.\n\n## Refusal criteria (must-stop conditions)\nThe agent MUST stop and ask for user action if any of the following is true:\n- Runtime location is unknown and discovery cannot uniquely resolve it.\n- The TBOT database path cannot be found or opened read-only.\n- A request would start\u002Fstop\u002Frestart services or send signals **without** `--run-it` \u002F `RUN_IT=1`.\n- A request implies destructive DB changes (DROP\u002FTRUNCATE\u002FALTER) or “run arbitrary SQL”.\n\n## Prerequisites (first-time users)\nThis skill controls a **separate** TBOT runtime stack. The reference\u002Fruntime implementation is:\n\n- **openclaw-on-tradingboat (TBOT runtime stack)**: https:\u002F\u002Fgithub.com\u002FPlusGenie\u002Fopenclaw-on-tradingboat\n\nThis `tbot-controller` skill **does not** download or install the runtime for you. If the runtime is missing, the skill will run **read-only** DB helpers where possible, but status\u002Flogs\u002Fcontrol actions will fail until the runtime exists.\n\n### Install the runtime (recommended)\n1) Clone the runtime repo:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FPlusGenie\u002Fopenclaw-on-tradingboat.git\ncd openclaw-on-tradingboat\n```\n\n2) Ensure you can start it manually (outside this skill). For Docker Compose based installs, this typically means:\n\n```bash\ndocker compose up -d\n```\n\n3) Tell this skill where the runtime lives (recommended):\n\n- Set `TBOT_COMPOSE_DIR` to the folder that contains `docker-compose.yml` or `compose.yaml`.\n\nExamples:\n\n```bash\nexport TBOT_COMPOSE_DIR=\"$HOME\u002Fdevelop\u002Fgithub\u002Fopenclaw-on-tradingboat\"\n```\n\nOr add it to `~\u002F.openclaw\u002F.env` \u002F your skill `env` block in `openclaw.json`.\n\n### Configure runtime secrets (outside this skill)\n- TBOT typically uses a `.env` file for broker credentials and webhook keys.\n- **Do not** commit secrets to git.\n- If you are unsure whether the runtime is set to **paper** or **live**, this skill must **refuse** to execute any trade\u002Faction until you confirm which it is.\n\n## Install \u002F script permissions\nThis skill is invoked via a bash entrypoint script. Ensure it is executable:\n\n```bash\nchmod +x scripts\u002Ftbot.sh\n```\n\n### Python deps (OpenClaw-native)\nThis skill uses **uv** to run Python scripts in an isolated environment and auto-install dependencies from:\n- `{baseDir}\u002Fscripts\u002Frequirements.txt`\n\nInstall uv (macOS):\n```bash\nbrew install uv\n```\n\nClawHub packaging note: if you publish this skill, ensure `scripts\u002F` (including `requirements.txt`) is included at the **root** of the repo.\n\n## IMPORTANT: DB-first, discovery only for status\u002Fcontrol\n\nDB queries do **NOT** require discovery.\nDiscovery is required **only** before status\u002Flogs\u002Fcontrol actions.\n\nOpenClaw must **NOT** hardcode old paths like `~\u002Fib-gateway-docker`.\n\nAlways prefer discovery output (usually pointing to `openclaw-on-tradingboat`).\n\n## Commands\n\n### Entry point (required)\nOpenClaw MUST invoke this skill via:\n\n```bash\nbash scripts\u002Ftbot.sh \u003Cmode> \u003Cargs...>\n```\n\nValid modes:\n- `ctl` — operations control (docker\u002Fsystemd)\n- `json` — JSON signal generation (schema-validated) and send to TBOT webhook (non-interactive)\n- `status` — read-only inspection (probe & discovery)\n\nOpenClaw must never call `python tbot*.py` directly.\n\n### Probe & Discovery (read-only, only for status\u002Fcontrol)\nWhen the user says “open TBOT”, “start TBOT”, “TBOT status”, etc., OpenClaw should:\n\n1) **Try discovery first (read-only)**:\n```bash\nbash scripts\u002Ftbot.sh status discover\n```\n\nThis step is mandatory because the compose folder may change over time\n(for example migrating from `ib-gateway-docker` to `openclaw-on-tradingboat`).\n\n2) If discovery returns a resolved runtime, run `ctl` commands by **injecting env vars**:\n\n- Docker example:\n```bash\nMODE=docker COMPOSE_DIR=\"\u003Ccompose_dir>\" bash scripts\u002Ftbot.sh ctl status\n```\n\nExample expected compose folder:\n\n```text\n~\u002Fdevelop\u002Fgithub\u002Fopenclaw-on-tradingboat> \n```\n\n- systemd example:\n```bash\nMODE=systemd SERVICE_NAME=\"\u003Cservice_name>\" SYSTEMD_USER=\"\u003C0|1>\" bash scripts\u002Ftbot.sh ctl status\n```\n\n3) Only if discovery cannot resolve a single runtime, ask **one precise question**:\n- Docker Compose: “What is the folder containing docker-compose.yml\u002Fcompose.yaml? (Usually this is the tbot-runtime (example) folder.)”\n- systemd: “What is the service name (and is it --user)?”\n\nNotes:\n- Discovery must remain **read-only** (no starting\u002Fstopping).\n- Use discovery output as the authoritative suggestion for MODE\u002FCOMPOSE_DIR\u002FSERVICE_NAME.\n\n### Why this matters\nIf OpenClaw skips discovery, it may incorrectly report TBOT as DOWN\nbecause it is checking an obsolete compose folder.\n\n### Status (read-only, only if requested)\n\n```bash\nbash scripts\u002Ftbot.sh ctl status\nbash scripts\u002Ftbot.sh ctl logs --tail 200\n```\n\nNote: With tbot-runtime (example), docker compose typically brings up three containers: ib-gateway-on-tradingboat (gnzsnz\u002Fib-gateway), redis-on-tradingboat, and tbot-on-tradingboat.\n\nInternally:\n- Docker: `docker compose ps`, `docker compose logs --tail=200`\n- systemd: `systemctl --user status \u003Cservice>`, `journalctl --user -u \u003Cservice> -n 200`\n\n### Control (explicit confirmation required)\n\n```bash\nbash scripts\u002Ftbot.sh ctl start --run-it\nbash scripts\u002Ftbot.sh ctl stop --run-it\nbash scripts\u002Ftbot.sh ctl restart --run-it\n```\n\nTip: Use MODE=docker + COMPOSE_DIR pointed at tbot-runtime (example) to control the stack via docker compose.\n\nInternally:\n- Docker: `docker compose up -d`, `docker compose down`\n- systemd: `systemctl --user start \u003Cservice>`, `systemctl --user stop \u003Cservice>`\n\n### JSON signal generation (generate + send)\n\n`json` mode is **non-interactive by design**.\nOpenClaw MUST NOT ask the user for webhook details or trading intent if they can be inferred.\n\nInference rules:\n- Webhook URL default: `http:\u002F\u002F127.0.0.1:5001\u002Fwebhook` (override with `TBOT_WEBHOOK_URL`)\n- Webhook key is read from the TBOT runtime `.env` by default (override with `WEBHOOK_KEY`)\n- `orderRef` is auto-generated when omitted\n- Natural language like `close 50 NFLX` implies `strategy.close`, `contract=stock`, `qty=50`\n\n`json` mode generates a schema-valid TradingView-style payload and **sends it** to TBOT via webhook.\n\nDefaults \u002F inference rules (do not ask the user):\n- **Webhook URL**: default `http:\u002F\u002F127.0.0.1:5001\u002Fwebhook` (override with `TBOT_WEBHOOK_URL`).\n- **Webhook key**: read from runtime `.env` (override with `WEBHOOK_KEY`).\n- **orderRef**: if not provided, auto-generate `Close_\u003CTICKER>_\u003CQTY>_\u003Cepoch_ms>`.\n- **Close intent**: inferred automatically; do not prompt the user.\n\n```bash\n# Example (user: “close 50 NFLX now”)\nTBOT_WEBHOOK_URL=\"http:\u002F\u002F127.0.0.1:5001\u002Fwebhook\" \\\nWEBHOOK_KEY=\"WebhookReceived:123456\" \\\nbash scripts\u002Ftbot.sh json \\\n  --ticker NFLX \\\n  --direction strategy.close \\\n  --contract stock \\\n  --metric qty=50\n```\n\nGuarantees:\n- Output is validated against `alert_webhook_schema.json`\n- Unsupported directions or metrics fail fast\n- No network calls or broker actions are performed\n- This generator is independent of the gateway container image (e.g., gnzsnz\u002Fib-gateway).\n\n#### Copy-paste JSON output (expected schema shape)\nWhen asked to “generate a TradingView webhook JSON”, OpenClaw should output JSON **exactly like this shape**:\n\n```json\n{\n  \"timestamp\": 1710000000000,\n  \"ticker\": \"ES1!\",\n  \"currency\": \"USD\",\n  \"timeframe\": \"5\",\n  \"clientId\": 1,\n  \"key\": \"WebhookReceived:123456\",\n  \"contract\": \"future\",\n  \"orderRef\": \"Long#1\",\n  \"direction\": \"strategy.entrylong\",\n  \"exchange\": \"CME\",\n  \"lastTradeDateOrContractMonth\": \"202603\",\n  \"multiplier\": \"50\",\n  \"metrics\": [\n    {\"name\": \"entry.limit\", \"value\": 0},\n    {\"name\": \"entry.stop\", \"value\": 0},\n    {\"name\": \"exit.limit\", \"value\": 0},\n    {\"name\": \"exit.stop\", \"value\": 0},\n    {\"name\": \"qty\", \"value\": 1},\n    {\"name\": \"price\", \"value\": 5032.25}\n  ]\n}\n```\n\nTip (local-first \u002F zero-config examples): it’s OK to use a placeholder `key` value in docs.\nFor real TradingView → TBOT delivery, set it to your actual shared secret (TVWB key).\n\n### DB inspection (read-only, primary)\n- Preferred (via this skill, DB-first):\n  - `bash scripts\u002Ftbot.sh status db --table orders --format summary --limit 100`\n  - `bash scripts\u002Ftbot.sh status db --table alerts --format summary --limit 100`\n  - `bash scripts\u002Ftbot.sh status db --table errors --format summary --limit 100`\n  - `bash scripts\u002Ftbot.sh status db --table tbot --format summary --limit 100`\n  - Use `--format json` to return raw JSON.\n- Portfolio\u002Fpositions are derived from `TBOTORDERS` (same as `\u002Forders\u002Fdata` in UI).\n\n### Read-only helpers (DB-first)\n- Portfolio snapshot:\n  - `bash scripts\u002Ftbot.sh status portfolio --format summary`\n- Errors tail (with grouping):\n  - `bash scripts\u002Ftbot.sh status errors --format summary --limit 200`\n  - `bash scripts\u002Ftbot.sh status errors --group --limit 200`\n- Health checks (HTTP):\n  - `bash scripts\u002Ftbot.sh status health --base-url http:\u002F\u002F127.0.0.1:5001`\n\nExample output (`--format summary`, orders):\n\n```\nTotals:\n- Market value: 284,103.16\n- Unrealized PnL: 134,585.15\n- Realized PnL: 0.00\n\nTBOT_TIME        | ORD_TIME                | TICKER | TV_Close | ACTION | TYPE | QTY | LIMIT | STOP | ORDERID | ORDERREF  | STATUS    | POS | MRKVAL     | AVGF     | UnrealPnL  | RealPnL\n----------------+-------------------------+--------+----------+--------+------+-----+-------+------+---------+-----------+-----------+-----+------------+----------+------------+--------\n2026-02-05 20:06 | 2026-02-05 20:06:12.345 | TSLA   | 399.4796 | BUY    | LMT  | 455 | 0     | 0    | 12345   | Ptf_TSLA  | Portfolio | 455 | 181,763.22 | 187.9038 | 96,266.98  | 0\n```\n\n- DB path resolution (first match wins):\n  - `--db-path \u002Fpath\u002Fto\u002Ftbot_sqlite3`\n  - `TBOT_DB_PATH=\u002Fpath\u002Fto\u002Ftbot_sqlite3`\n  - `TBOT_DB_OFFICE=\u002Fpath\u002Fto\u002Ftbot_sqlite3`\n- DB location notes:\n  - Inside the container, TBOT may create the DB at `\u002Fhome\u002Ftbot\u002Ftbot_sqlite3` if no volume is set.\n  - Recommended: bind-mount `.\u002Fruntime\u002Fdatabase` to `\u002Fhome\u002Ftbot\u002Fdatabase` and set `TBOT_DB_OFFICE=\u002Fhome\u002Ftbot\u002Fdatabase\u002Ftbot_sqlite3`.\n  - With the bind-mount, the host path is:\n    - `tbot-runtime (example)\u002Fruntime\u002Fdatabase\u002Ftbot_sqlite3`\n- After updating `tbot-runtime (example)\u002Fdocker-compose.yml`, restart TBOT:\n  - `MODE=docker COMPOSE_DIR=\"\u002Fpath\u002Fto\u002Fyour\u002Ftbot-runtime\" bash scripts\u002Ftbot.sh ctl restart --run-it`\n- Container note:\n  - The `tbot` container may not include `sqlite3` CLI; read the DB on the host (preferred) via bind-mount.\n- Fallback (manual):\n  - `sqlite3 \u003Cpath> \"SELECT ...\"`\n\n### Known gaps & intended fixes (tracked)\n- Discovery can miss running docker compose stacks; use DB-first commands for portfolio instead of discovery.\n- Add explicit subcommands (planned): `errors --tail` (limit), `health` (HTTP checks for `\u002Forders\u002Fdata` + `\u002Ftbot\u002Fdata`).\n- Add a single-line summary mode (planned): totals + top 3 positions + biggest losing position.\n\n## Data signal: TradingView-style webhook JSON generator\n\n### Required fields\nThis skill generates JSON with fields used by TBOT\u002FTradingBoat style alerts:\n- `timestamp` (ms since epoch)\n- `ticker` (e.g., `AAPL`, `ES1!`)\n- `currency` (e.g., `USD`)\n- `timeframe` (e.g., `1`, `5`, `1D`)\n- `clientId` (integer; IBKR client ID)\n- `key` (TVWB shared key)\n- `contract` (e.g., `stock`, `forex`, `crypto`, `future`)\n- `orderRef` (string identifier)\n- `direction` (e.g., `strategy.entrylong`, `strategy.entryshort`, `strategy.exitlong`, `strategy.exitshort`, `strategy.close`, `strategy.close_all`)\n- `exchange`, `lastTradeDateOrContractMonth`, `multiplier` (mostly for futures)\n- `metrics` (array of `{name, value}`)\n\n### Example payload\n(Uses a placeholder `key` value for copy-paste. Replace with your real TVWB shared key in production.)\n```json\n{\n  \"timestamp\": 1710000000000,\n  \"ticker\": \"ES1!\",\n  \"currency\": \"USD\",\n  \"timeframe\": \"5\",\n  \"clientId\": 1,\n  \"key\": \"WebhookReceived:123456\",\n  \"contract\": \"future\",\n  \"orderRef\": \"Long#1\",\n  \"direction\": \"strategy.entrylong\",\n  \"exchange\": \"CME\",\n  \"lastTradeDateOrContractMonth\": \"202603\",\n  \"multiplier\": \"50\",\n  \"metrics\": [\n    {\"name\": \"entry.limit\", \"value\": 0},\n    {\"name\": \"entry.stop\", \"value\": 0},\n    {\"name\": \"exit.limit\", \"value\": 0},\n    {\"name\": \"exit.stop\", \"value\": 0},\n    {\"name\": \"qty\", \"value\": 1},\n    {\"name\": \"price\", \"value\": 5032.25}\n  ]\n}\n```\n","## What this skill does\n- Query TBOT sqlite DB for alerts\u002Forders\u002Ferrors\u002Fportfolio (DB-first)\n- Start\u002Fstop TradingBoat\u002FTBOT (docker compose or systemd)\n- Fetch health\u002Fstatus (containers, ports, basic checks) only when explicitly requested\n- Read recent logs only when explicitly requested\n\n## Safety rules\n- Default to **read-only** operations (status\u002Flogs) unless user explicitly requests a control action.\n- For any state-changing action (start\u002Fstop\u002Frestart\u002Fsend), require explicit confirmation via the flag **--run-it** or environment variable **RUN_IT=1**. The controller will refuse execution otherwise.\n- Never print secrets (webhook keys, tokens). Redact them.\n\n## Refusal criteria (must-stop conditions)\nThe agent MUST stop and ask for user action if any of the following is true:\n- Runtime location is unknown and discovery cannot uniquely resolve it.\n- The TBOT database path cannot be found or opened read-only.\n- A request would start\u002Fstop\u002Frestart services or send signals **without** `--run-it` \u002F `RUN_IT=1`.\n- A request implies destructive DB changes (DROP\u002FTRUNCATE\u002FALTER) or “run arbitrary SQL”.\n\n## Prerequisites (first-time users)\nThis skill controls a **separate** TBOT runtime stack. The reference\u002Fruntime implementation is:\n\n- **openclaw-on-tradingboat (TBOT runtime stack)**: https:\u002F\u002Fgithub.com\u002FPlusGenie\u002Fopenclaw-on-tradingboat\n\nThis `tbot-controller` skill **does not** download or install the runtime for you. If the runtime is missing, the skill will run **read-only** DB helpers where possible, but status\u002Flogs\u002Fcontrol actions will fail until the runtime exists.\n\n### Install the runtime (recommended)\n1) Clone the runtime repo:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FPlusGenie\u002Fopenclaw-on-tradingboat.git\ncd openclaw-on-tradingboat\n```\n\n2) Ensure you can start it manually (outside this skill). For Docker Compose based installs, this typically means:\n\n```bash\ndocker compose up -d\n```\n\n3) Tell this skill where the runtime lives (recommended):\n\n- Set `TBOT_COMPOSE_DIR` to the folder that contains `docker-compose.yml` or `compose.yaml`.\n\nExamples:\n\n```bash\nexport TBOT_COMPOSE_DIR=\"$HOME\u002Fdevelop\u002Fgithub\u002Fopenclaw-on-tradingboat\"\n```\n\nOr add it to `~\u002F.openclaw\u002F.env` \u002F your skill `env` block in `openclaw.json`.\n\n### Configure runtime secrets (outside this skill)\n- TBOT typically uses a `.env` file for broker credentials and webhook keys.\n- **Do not** commit secrets to git.\n- If you are unsure whether the runtime is set to **paper** or **live**, this skill must **refuse** to execute any trade\u002Faction until you confirm which it is.\n\n## Install \u002F script permissions\nThis skill is invoked via a bash entrypoint script. Ensure it is executable:\n\n```bash\nchmod +x scripts\u002Ftbot.sh\n```\n\n### Python deps (OpenClaw-native)\nThis skill uses **uv** to run Python scripts in an isolated environment and auto-install dependencies from:\n- `{baseDir}\u002Fscripts\u002Frequirements.txt`\n\nInstall uv (macOS):\n```bash\nbrew install uv\n```\n\nClawHub packaging note: if you publish this skill, ensure `scripts\u002F` (including `requirements.txt`) is included at the **root** of the repo.\n\n## IMPORTANT: DB-first, discovery only for status\u002Fcontrol\n\nDB queries do **NOT** require discovery.\nDiscovery is required **only** before status\u002Flogs\u002Fcontrol actions.\n\nOpenClaw must **NOT** hardcode old paths like `~\u002Fib-gateway-docker`.\n\nAlways prefer discovery output (usually pointing to `openclaw-on-tradingboat`).\n\n## Commands\n\n### Entry point (required)\nOpenClaw MUST invoke this skill via:\n\n```bash\nbash scripts\u002Ftbot.sh \u003Cmode> \u003Cargs...>\n```\n\nValid modes:\n- `ctl` — operations control (docker\u002Fsystemd)\n- `json` — JSON signal generation (schema-validated) and send to TBOT webhook (non-interactive)\n- `status` — read-only inspection (probe & discovery)\n\nOpenClaw must never call `python tbot*.py` directly.\n\n### Probe & Discovery (read-only, only for status\u002Fcontrol)\nWhen the user says “open TBOT”, “start TBOT”, “TBOT status”, etc., OpenClaw should:\n\n1) **Try discovery first (read-only)**:\n```bash\nbash scripts\u002Ftbot.sh status discover\n```\n\nThis step is mandatory because the compose folder may change over time\n(for example migrating from `ib-gateway-docker` to `openclaw-on-tradingboat`).\n\n2) If discovery returns a resolved runtime, run `ctl` commands by **injecting env vars**:\n\n- Docker example:\n```bash\nMODE=docker COMPOSE_DIR=\"\u003Ccompose_dir>\" bash scripts\u002Ftbot.sh ctl status\n```\n\nExample expected compose folder:\n\n```text\n~\u002Fdevelop\u002Fgithub\u002Fopenclaw-on-tradingboat> \n```\n\n- systemd example:\n```bash\nMODE=systemd SERVICE_NAME=\"\u003Cservice_name>\" SYSTEMD_USER=\"\u003C0|1>\" bash scripts\u002Ftbot.sh ctl status\n```\n\n3) Only if discovery cannot resolve a single runtime, ask **one precise question**:\n- Docker Compose: “What is the folder containing docker-compose.yml\u002Fcompose.yaml? (Usually this is the tbot-runtime (example) folder.)”\n- systemd: “What is the service name (and is it --user)?”\n\nNotes:\n- Discovery must remain **read-only** (no starting\u002Fstopping).\n- Use discovery output as the authoritative suggestion for MODE\u002FCOMPOSE_DIR\u002FSERVICE_NAME.\n\n### Why this matters\nIf OpenClaw skips discovery, it may incorrectly report TBOT as DOWN\nbecause it is checking an obsolete compose folder.\n\n### Status (read-only, only if requested)\n\n```bash\nbash scripts\u002Ftbot.sh ctl status\nbash scripts\u002Ftbot.sh ctl logs --tail 200\n```\n\nNote: With tbot-runtime (example), docker compose typically brings up three containers: ib-gateway-on-tradingboat (gnzsnz\u002Fib-gateway), redis-on-tradingboat, and tbot-on-tradingboat.\n\nInternally:\n- Docker: `docker compose ps`, `docker compose logs --tail=200`\n- systemd: `systemctl --user status \u003Cservice>`, `journalctl --user -u \u003Cservice> -n 200`\n\n### Control (explicit confirmation required)\n\n```bash\nbash scripts\u002Ftbot.sh ctl start --run-it\nbash scripts\u002Ftbot.sh ctl stop --run-it\nbash scripts\u002Ftbot.sh ctl restart --run-it\n```\n\nTip: Use MODE=docker + COMPOSE_DIR pointed at tbot-runtime (example) to control the stack via docker compose.\n\nInternally:\n- Docker: `docker compose up -d`, `docker compose down`\n- systemd: `systemctl --user start \u003Cservice>`, `systemctl --user stop \u003Cservice>`\n\n### JSON signal generation (generate + send)\n\n`json` mode is **non-interactive by design**.\nOpenClaw MUST NOT ask the user for webhook details or trading intent if they can be inferred.\n\nInference rules:\n- Webhook URL default: `http:\u002F\u002F127.0.0.1:5001\u002Fwebhook` (override with `TBOT_WEBHOOK_URL`)\n- Webhook key is read from the TBOT runtime `.env` by default (override with `WEBHOOK_KEY`)\n- `orderRef` is auto-generated when omitted\n- Natural language like `close 50 NFLX` implies `strategy.close`, `contract=stock`, `qty=50`\n\n`json` mode generates a schema-valid TradingView-style payload and **sends it** to TBOT via webhook.\n\nDefaults \u002F inference rules (do not ask the user):\n- **Webhook URL**: default `http:\u002F\u002F127.0.0.1:5001\u002Fwebhook` (override with `TBOT_WEBHOOK_URL`).\n- **Webhook key**: read from runtime `.env` (override with `WEBHOOK_KEY`).\n- **orderRef**: if not provided, auto-generate `Close_\u003CTICKER>_\u003CQTY>_\u003Cepoch_ms>`.\n- **Close intent**: inferred automatically; do not prompt the user.\n\n```bash\n# Example (user: “close 50 NFLX now”)\nTBOT_WEBHOOK_URL=\"http:\u002F\u002F127.0.0.1:5001\u002Fwebhook\" \\\nWEBHOOK_KEY=\"WebhookReceived:123456\" \\\nbash scripts\u002Ftbot.sh json \\\n  --ticker NFLX \\\n  --direction strategy.close \\\n  --contract stock \\\n  --metric qty=50\n```\n\nGuarantees:\n- Output is validated against `alert_webhook_schema.json`\n- Unsupported directions or metrics fail fast\n- No network calls or broker actions are performed\n- This generator is independent of the gateway container image (e.g., gnzsnz\u002Fib-gateway).\n\n#### Copy-paste JSON output (expected schema shape)\nWhen asked to “generate a TradingView webhook JSON”, OpenClaw should output JSON **exactly like this shape**:\n\n```json\n{\n  \"timestamp\": 1710000000000,\n  \"ticker\": \"ES1!\",\n  \"currency\": \"USD\",\n  \"timeframe\": \"5\",\n  \"clientId\": 1,\n  \"key\": \"WebhookReceived:123456\",\n  \"contract\": \"future\",\n  \"orderRef\": \"Long#1\",\n  \"direction\": \"strategy.entrylong\",\n  \"exchange\": \"CME\",\n  \"lastTradeDateOrContractMonth\": \"202603\",\n  \"multiplier\": \"50\",\n  \"metrics\": [\n    {\"name\": \"entry.limit\", \"value\": 0},\n    {\"name\": \"entry.stop\", \"value\": 0},\n    {\"name\": \"exit.limit\", \"value\": 0},\n    {\"name\": \"exit.stop\", \"value\": 0},\n    {\"name\": \"qty\", \"value\": 1},\n    {\"name\": \"price\", \"value\": 5032.25}\n  ]\n}\n```\n\nTip (local-first \u002F zero-config examples): it’s OK to use a placeholder `key` value in docs.\nFor real TradingView → TBOT delivery, set it to your actual shared secret (TVWB key).\n\n### DB inspection (read-only, primary)\n- Preferred (via this skill, DB-first):\n  - `bash scripts\u002Ftbot.sh status db --table orders --format summary --limit 100`\n  - `bash scripts\u002Ftbot.sh status db --table alerts --format summary --limit 100`\n  - `bash scripts\u002Ftbot.sh status db --table errors --format summary --limit 100`\n  - `bash scripts\u002Ftbot.sh status db --table tbot --format summary --limit 100`\n  - Use `--format json` to return raw JSON.\n- Portfolio\u002Fpositions are derived from `TBOTORDERS` (same as `\u002Forders\u002Fdata` in UI).\n\n### Read-only helpers (DB-first)\n- Portfolio snapshot:\n  - `bash scripts\u002Ftbot.sh status portfolio --format summary`\n- Errors tail (with grouping):\n  - `bash scripts\u002Ftbot.sh status errors --format summary --limit 200`\n  - `bash scripts\u002Ftbot.sh status errors --group --limit 200`\n- Health checks (HTTP):\n  - `bash scripts\u002Ftbot.sh status health --base-url http:\u002F\u002F127.0.0.1:5001`\n\nExample output (`--format summary`, orders):\n\n```\nTotals:\n- Market value: 284,103.16\n- Unrealized PnL: 134,585.15\n- Realized PnL: 0.00\n\nTBOT_TIME        | ORD_TIME                | TICKER | TV_Close | ACTION | TYPE | QTY | LIMIT | STOP | ORDERID | ORDERREF  | STATUS    | POS | MRKVAL     | AVGF     | UnrealPnL  | RealPnL\n----------------+-------------------------+--------+----------+--------+------+-----+-------+------+---------+-----------+-----------+-----+------------+----------+------------+--------\n2026-02-05 20:06 | 2026-02-05 20:06:12.345 | TSLA   | 399.4796 | BUY    | LMT  | 455 | 0     | 0    | 12345   | Ptf_TSLA  | Portfolio | 455 | 181,763.22 | 187.9038 | 96,266.98  | 0\n```\n\n- DB path resolution (first match wins):\n  - `--db-path \u002Fpath\u002Fto\u002Ftbot_sqlite3`\n  - `TBOT_DB_PATH=\u002Fpath\u002Fto\u002Ftbot_sqlite3`\n  - `TBOT_DB_OFFICE=\u002Fpath\u002Fto\u002Ftbot_sqlite3`\n- DB location notes:\n  - Inside the container, TBOT may create the DB at `\u002Fhome\u002Ftbot\u002Ftbot_sqlite3` if no volume is set.\n  - Recommended: bind-mount `.\u002Fruntime\u002Fdatabase` to `\u002Fhome\u002Ftbot\u002Fdatabase` and set `TBOT_DB_OFFICE=\u002Fhome\u002Ftbot\u002Fdatabase\u002Ftbot_sqlite3`.\n  - With the bind-mount, the host path is:\n    - `tbot-runtime (example)\u002Fruntime\u002Fdatabase\u002Ftbot_sqlite3`\n- After updating `tbot-runtime (example)\u002Fdocker-compose.yml`, restart TBOT:\n  - `MODE=docker COMPOSE_DIR=\"\u002Fpath\u002Fto\u002Fyour\u002Ftbot-runtime\" bash scripts\u002Ftbot.sh ctl restart --run-it`\n- Container note:\n  - The `tbot` container may not include `sqlite3` CLI; read the DB on the host (preferred) via bind-mount.\n- Fallback (manual):\n  - `sqlite3 \u003Cpath> \"SELECT ...\"`\n\n### Known gaps & intended fixes (tracked)\n- Discovery can miss running docker compose stacks; use DB-first commands for portfolio instead of discovery.\n- Add explicit subcommands (planned): `errors --tail` (limit), `health` (HTTP checks for `\u002Forders\u002Fdata` + `\u002Ftbot\u002Fdata`).\n- Add a single-line summary mode (planned): totals + top 3 positions + biggest losing position.\n\n## Data signal: TradingView-style webhook JSON generator\n\n### Required fields\nThis skill generates JSON with fields used by TBOT\u002FTradingBoat style alerts:\n- `timestamp` (ms since epoch)\n- `ticker` (e.g., `AAPL`, `ES1!`)\n- `currency` (e.g., `USD`)\n- `timeframe` (e.g., `1`, `5`, `1D`)\n- `clientId` (integer; IBKR client ID)\n- `key` (TVWB shared key)\n- `contract` (e.g., `stock`, `forex`, `crypto`, `future`)\n- `orderRef` (string identifier)\n- `direction` (e.g., `strategy.entrylong`, `strategy.entryshort`, `strategy.exitlong`, `strategy.exitshort`, `strategy.close`, `strategy.close_all`)\n- `exchange`, `lastTradeDateOrContractMonth`, `multiplier` (mostly for futures)\n- `metrics` (array of `{name, value}`)\n\n### Example payload\n(Uses a placeholder `key` value for copy-paste. Replace with your real TVWB shared key in production.)\n```json\n{\n  \"timestamp\": 1710000000000,\n  \"ticker\": \"ES1!\",\n  \"currency\": \"USD\",\n  \"timeframe\": \"5\",\n  \"clientId\": 1,\n  \"key\": \"WebhookReceived:123456\",\n  \"contract\": \"future\",\n  \"orderRef\": \"Long#1\",\n  \"direction\": \"strategy.entrylong\",\n  \"exchange\": \"CME\",\n  \"lastTradeDateOrContractMonth\": \"202603\",\n  \"multiplier\": \"50\",\n  \"metrics\": [\n    {\"name\": \"entry.limit\", \"value\": 0},\n    {\"name\": \"entry.stop\", \"value\": 0},\n    {\"name\": \"exit.limit\", \"value\": 0},\n    {\"name\": \"exit.stop\", \"value\": 0},\n    {\"name\": \"qty\", \"value\": 1},\n    {\"name\": \"price\", \"value\": 5032.25}\n  ]\n}\n```\n",{"name":5,"tags":24,"author":31,"version":32,"metadata":33,"description":7},[25,26,27,28,29,30],"openclaw","tbot","tradingboat","trading","docker","ibkr","PlusGenie","1.0.0",{"openclaw":34},{"emoji":35,"install":36,"requires":43},"🛥️",[37],{"id":38,"bins":39,"kind":41,"label":42,"formula":40},"uv-brew",[40],"uv","brew","Install uv (brew)",{"bins":44},[40],"main","f9d3fe7cf9ac8f1ea63a0d96e98e1f510a3814db","skills\u002Fplusgenie\u002Ftbot-controller",1,"https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills","https:\u002F\u002Fgithub.com\u002Fjavimosch","intrane.fr","Building robust, open-source infrastructure for the commons. AI-leveraged, self-hosted, built to last.","2026-06-07 03:34:58",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add javimosch\u002Fopen-claw-skills --skill tbot-controller",{"tool":60,"command":61},"bunx","bunx skills add javimosch\u002Fopen-claw-skills --skill tbot-controller",{"tool":63,"command":64},"pnpm","pnpm dlx skills add javimosch\u002Fopen-claw-skills --skill tbot-controller","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fplusgenie\u002Ftbot-controller\u002FSKILL.md",true,[],[69,77,84,91,98,105],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":76},"01M778GGXG2VQ0YF31W2MKGMQZ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":76},"01M778G7BH8SBJ9FJ6C3G7CB1K","ceaser","Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir\u002FUltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":76},"01M778FYCJQZWFKKX5FYMK3S47","ceaser-send","Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir\u002FUltraHonk zero-knowledge proofs.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser-send\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":76},"01M778FQQNSEYA3HJKZBPQ4M9Z","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":76},"01M778FGVZX7QA2TF9BFMM37FY","moldium","Post and manage content on the Moldium blog platform. Triggered by \"post to Moldium\", \"write a blog post\", \"publish an article\", etc.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyom45\u002Fmoldium\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":76},"01M778F88D8PQ9MQ0KNW2TJ8ZH","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http:\u002F\u002Fweakaccept.top:8000\u002F.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[]]