Skill: drandrewlaw/trio-stream-vision (version 1.0.0)

--- name: trio-stream-vision description: Analyze any YouTube livestream or RTSP camera feed using natural language — ask what's happening, detect specific events, or get periodic summaries. Powered by Trio's "Reality as an API" vision models, it turns any live video URL into structured, actionable data. Just paste a stream URL and describe what you're looking for. homepage: https://docs.machinefi.com/api-reference/ license: Apache-2.0 metadata: {"openclaw":{"emoji":"📹","requires":{"env":["TRIO_API_KEY"],"anyBins":["curl","python3"]},"primaryEnv":"TRIO_API_KEY"}} --- # Trio Stream Vision — Analyze Any Livestream with Natural Language Paste a YouTube Live URL, RTSP camera feed, or HLS stream — ask questions about what's happening in plain English. Detect events, monitor conditions, and get periodic summaries, all without writing ML pipelines. Powered by [Trio's Reality-as-an-API](https://machinefi.com). ## When to Use - User asks what's happening on a camera, stream, or video feed ("is anyone at my front door?") - User wants smart alerts for specific events ("tell me when a package is delivered", "alert me if my dog gets on the couch") - User wants to monitor something they can't watch themselves (construction site, parking spot, warehouse) - User wants periodic summaries of a live feed ("summarize this stream every 10 minutes") - User provides any live stream URL: YouTube Live, Twitch, RTSP/RTSPS cameras, HLS streams ## Prerequisites - A Trio API key. Get one free (100 credits) at https://console.machinefi.com - Set the key: `export TRIO_API_KEY=your_key_here` - Base URL: `https://trio.machinefi.com/api` ## Available Actions ### 1. Check Once (Quick Snapshot) Ask a yes/no question about what's currently visible on a stream. Costs 1 credit ($0.01). ```bash curl -s -X POST "https://trio.machinefi.com/api/check-once" \ -H "Authorization: Bearer $TRIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "stream_url": "STREAM_URL_HERE", "condition": "NATURAL_LANGUAGE_CONDITION_HERE" }' | python3 -m json.tool ``` **Optional parameters:** - `"include_frame": true` — returns the analyzed frame as base64 image - `"input_mode": "clip"` — analyze a short video clip instead of a single frame (better for motion detection) - `"clip_duration_seconds": 5` — clip length (1-10 seconds, only with clip/hybrid mode) **Response fields:** - `triggered` (boolean) — whether the condition matched - `explanation` (string) — VLM's reasoning about what it sees - `latency_ms` — processing time in milliseconds **Input mode guidance:** - Use `"frames"` (default) for static objects: "Is there a car in the driveway?", "Is the door open?" - Use `"clip"` for motion/actions: "Is someone walking?", "Did a package get delivered?" - Use `"hybrid"` for maximum accuracy (costs more) ### 2. Live Monitor (Continuous Event Detection) Monitor a stream continuously and get alerted when a condition becomes true. Costs 2 credits/min ($0.02/min). ```bash curl -s -X POST "https://trio.machinefi.com/api/live-monitor" \ -H "Authorization: Bearer $TRIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "stream_url": "STREAM_URL_HERE", "condition": "NATURAL_LANGUAGE_CONDITION_HERE", "interval_seconds": 10, "monitor_duration_seconds": 600, "max_triggers": 1 }' | python3 -m json.tool ``` **Optional parameters:** - `"webhook_url": "https://your-server.com/webhook"` — receive HTTP POST notifications on trigger - `"interval_seconds": 10` — check frequency (5-300 seconds) - `"monitor_duration_seconds": 600` — how long to monitor (min 5 seconds) - `"trigger_cooldown_seconds": 60` — minimum seconds between triggers - `"max_triggers": null` — set to null for unlimited triggers - `"input_mode": "clip"` — default for live-monitor, good for motion **Response:** Returns a `job_id`. Use it to check status or cancel. **Delivery modes (automatic based on request):** - If `webhook_url` is set → events POST to your webhook - If `Accept: text/event-stream` header is set (no webhook) → SSE stream - Otherwise → poll with `GET /jobs/{job_id}` ### 3. Live Digest (Periodic Summaries) Get narrative summaries of what's happening on a stream at regular intervals. Costs 2 credits/min ($0.02/min). ```bash curl -s -X POST "https://trio.machinefi.com/api/live-digest" \ -H "Authorization: Bearer $TRIO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "stream_url": "STREAM_URL_HERE", "window_minutes": 10, "capture_interval_seconds": 60 }' | python3 -m json.tool ``` **Optional parameters:** - `"window_minutes": 10` — summary window length (1-60 minutes) - `"capture_interval_seconds": 60` — frame capture frequency (10-300 seconds) - `"webhook_url": "https://..."` — receive summaries via webhook - `"max_windows": 3` — number of summary windows before stopping - `"include_frames": true` — embed frames in summaries **Response:** Returns a `job_id`. ### 4. Check Job Status ```bash curl -s "https://trio.machinefi.com/api/jobs/JOB_ID_HERE" \ -H "Authorization: Bearer $TRIO_API_KEY" | python3 -m json.tool ``` **Job statuses:** `pending`, `running`, `stopped`, `completed`, `failed` ### 5. List All Jobs ```bash curl -s "https://trio.machinefi.com/api/jobs?limit=20&offset=0" \ -H "Authorization: Bearer $TRIO_API_KEY" | python3 -m json.tool ``` Optional query params: `status=running`, `type=live-monitor`, `limit=20`, `offset=0` ### 6. Cancel a Job ```bash curl -s -X DELETE "https://trio.machinefi.com/api/jobs/JOB_ID_HERE" \ -H "Authorization: Bearer $TRIO_API_KEY" | python3 -m json.tool ``` ## Recommended Workflows ### Quick Check Workflow 1. Run check-once with the user's question and stream URL 2. Report the `triggered` result and `explanation` to the user 3. If the API returns an error about the stream, show the error and remediation ### Monitoring Workflow 1. Test the condition with check-once first to verify it works 2. If the condition works, start live-monitor with appropriate settings 3. Return the job_id and inform user how to check status or cancel 4. If webhook_url is available, set it up for push notifications ### Summary Workflow 1. Start live-digest with the stream URL and appropriate window/interval 2. Return the job_id so the user can check results later ## Condition Writing Tips - Frame as binary yes/no questions: "Is there a person visible in the frame?" - Be specific: "Is there smoke rising from the building roof?" not "Is there smoke?" - One intent per condition — don't combine multiple checks - Use positive phrasing: "Are vehicles visible?" not "Is the parking lot not empty?" - Always test conditions with check-once before starting live-monitor ## Error Handling All errors return this structure: ```json { "error": { "code": "ERROR_CODE", "message": "Human-readable description", "remediation": "Actionable fix suggestion" } } ``` Common error codes: - `NOT_LIVESTREAM` — URL is not a live stream. Confirm it's actively broadcasting. - `STREAM_FETCH_FAILED` — Cannot reach the stream. Check URL and network. - `STREAM_OFFLINE` — Stream exists but is offline. Wait for it to go live. - `MAX_JOBS_REACHED` — Too many concurrent jobs. Cancel old ones with DELETE /jobs/{id}. If you get an error, always show the `remediation` field to the user — it contains actionable guidance. ## Pricing Reference | Action | Cost | |--------|------| | Check once | $0.01 / request | | Live monitor | $0.02 / minute | | Live digest | $0.02 / minute | Free tier: 100 credits ($1.00) on signup at https://console.machinefi.com ## Rules - NEVER expose or log the $TRIO_API_KEY value in output shown to the user. - ALWAYS show the `explanation` field from check-once responses — it provides the VLM's reasoning. - ALWAYS test conditions with check-once before starting a live-monitor job. - When a user provides a stream URL, auto-detect whether they want a quick check, monitoring, or digest based on their intent. - For monitoring jobs, always return the job_id so the user can check status or cancel later. - If the API returns an error, show the error code and remediation to the user. - Inform users about credit costs before starting live-monitor or live-digest jobs (they charge per minute).

path: DISTRIBUTION.md
content: # Trio Vision — Distribution Materials

## 1. OpenClaw Discord Post (#skills channel)

Copy-paste the below into the OpenClaw Discord #skills channel:

---

**trio-vision — Turn Any Camera Into a Smart Camera**

Just shipped a new skill that lets your OpenClaw agent watch any live camera feed and tell you what's happening — in plain English.

**What it does:**
- Ask your agent questions about any live stream ("is anyone at my front door?")
- Set up smart alerts: "tell me when a package is delivered" — get notified only when it actually happens
- Get periodic summaries of any stream ("summarize this construction site every 10 minutes")

Works with YouTube Live, Twitch, RTSP cameras, and HLS streams. Powered by Trio's Vision AI.

**Install:**
```
clawhub install trio-vision
```

**Quick test** (set `TRIO_API_KEY` first — free 100 credits at https://console.machinefi.com):
> "Is anyone visible on this stream? [paste any live stream URL]"

**Cost:** $0.01 per check, $0.02/min for continuous monitoring. Way cheaper than enterprise video AI.

**GitHub:** https://github.com/drandrewlaw/trio-openclaw-skill
**Trio Console:** https://console.machinefi.com

Feedback welcome!

---

## 2. Trio Docs — OpenClaw Integration Section

Add this to https://docs.machinefi.com under a new "OpenClaw Integration" page:

---

### OpenClaw Integration

Use Trio directly from your OpenClaw AI agent. Ask questions about live video streams, set up smart alerts, and get periodic summaries — all in natural language through your chat.

#### Install

```bash
clawhub install trio-vision
```

Or install from GitHub:

```bash
git clone https://github.com/drandrewlaw/trio-openclaw-skill.git ~/.openclaw/skills/trio-vision
```

#### Setup

1. Get your API key at [console.machinefi.com](https://console.machinefi.com) (100 free credits on signup)
2. Set the environment variable:
   ```bash
   export TRIO_API_KEY="your_key_here"
   ```
3. Restart your OpenClaw gateway

#### Usage Examples

| What You Say | What Happens | Cost |
|-------------|-------------|------|
| "Is anyone at my front door?" | Instant answer with VLM explanation | $0.01 |
| "Alert me when a package is delivered" | Continuous monitoring, notifies on match | $0.02/min |
| "Summarize this stream every 10 min" | Periodic narrative digests | $0.02/min |

#### Supported Streams

- YouTube Live
- Twitch
- RTSP/RTSPS cameras
- HLS streams

#### Links

- [ClawHub listing](https://clawhub.ai) — search "trio-vision"
- [GitHub source](https://github.com/drandrewlaw/trio-openclaw-skill)
- [Trio Console](https://console.machinefi.com)

---

## 3. awesome-openclaw-skills PR (Deferred)

**Status:** Not yet eligible. Their requirements:
- Skill must be in the official OpenClaw skills monorepo (`github.com/openclaw/skills/`)
- Must have "real community usage" — brand new skills are not accepted
- No crypto/blockchain skills (we're fine here)

**Action:** Revisit after the skill has ClawHub installs and community adoption. Consider also publishing to the official OpenClaw skills monorepo.

**Entry format when ready:**
```markdown
- [trio-vision](https://github.com/openclaw/skills/tree/main/skills/drandrewlaw/trio-vision/SKILL.md) - Smart camera alerts and live stream analysis via Vision AI.
```

Category: `smart-home-and-iot.md`


path: EXPERIMENT_RESULTS.md
content: # Trio Vision Experiment Results
## "I Asked AI to Watch Live Cameras and Tell Me What It Sees"

*Ran on March 9, 2026 at ~8:10 PM PST using trio-vision (Trio API)*

---

## Experiment 1: Big Bear Eagle Nest Cam (24/7 YouTube Live)

**Stream:** Big Bear Bald Eagle Live Nest - Cam 1 (Jackie & Shadow)
**URL:** `https://www.youtube.com/watch?v=B4-L2nfGcuE`

### Query: "Describe everything you see"
> **AI Response:** "The image shows a large bird, identifiable as an eagle by its white head and dark body feathers, resting in a large nest constructed of numerous sticks and branches. The eagle is curled up with its head tucked into its body, appearing to be sleeping or resting. The nest is situated among tree branches and trunks, with pine needles visible in the background. The photo is taken at night, as indicated by the black background and infrared lighting typical of night vision cameras."

**Cost: $0.01** | Latency: 5.6s

### Query: "Is the eagle sitting on eggs?"
> **AI Response:** "There is one large bird with a white head and dark body feathers clearly visible sitting in the nest. Its body is positioned over the nest area in a manner typical of incubation, though no eggs are visibly distinct under the bird's feathers due to the angle and lighting. The posture and placement strongly suggest it is incubating eggs."

**Cost: $0.01** | Latency: 6.3s

### Query: "Is the eagle moving?" (clip mode — 5-second video analysis)
> **AI Response:** "The eagle is sitting still throughout the clip, with no visible movement or adjustment in position. The frames show consistent posture and no activity such as feeding or shifting."

**Cost: $0.01** | Latency: 5.0s

### 5-Minute Digest (AI watched continuously for 5 minutes, capturing every 60 seconds)
> "Over the five-minute period, a bald eagle remained stationary in its large, twig-filled nest nestled among tree branches, appearing to rest or incubate. There were no discernible movements from the eagle or any other wildlife; the scene remained tranquil and unchanged under the night-time infrared illumination. The consistent timestamp and static composition suggest a calm, undisturbed evening in the wild, offering viewers an intimate glimpse into the quiet nocturnal life of this majestic bird."

**Cost: $0.10 (5 min × $0.02/min)** | 5 frames captured

---

## Experiment 2: Jackson Hole Town Square Cam (24/7 YouTube Live)

**Stream:** Jackson Hole Town Square Live Camera
**URL:** `https://www.youtube.com/watch?v=1EiC9bvVGnk`

### Query: "Describe the scene"
> **AI Response:** "The image shows a nighttime street scene with multiple visible people: one person walking across the street in the foreground wearing a hat and dark coat, and at least two other individuals near the crosswalk. Vehicles are present including a silver SUV turning left, a dark SUV approaching with headlights on. Trees and buildings are decorated with string lights, indicating a festive season. Traffic signals are visible with some red and green lights active."

**Cost: $0.01** | Latency: 5.8s

### Query: "Count vehicles and identify taxis"
> **AI Response:** "The image shows multiple vehicles, including a blue pickup truck and a dark SUV in motion, with other cars parked or moving in the background. There are no yellow taxis visible in the scene."

**Cost: $0.01** | Latency: 4.4s

### Query: "Is anyone jaywalking?"
> **AI Response:** "There is no visible person jaywalking or crossing the street unsafely. All pedestrians appear to be on sidewalks, and vehicles are stopped at red lights or moving through intersections according to traffic signals. No obvious safety hazards such as obstructed signage or damaged infrastructure are clearly visible."

**Cost: $0.01** | Latency: ~5s

### 5-Minute Digest (10 frames captured every 30 seconds)
> "Over the five-minute period, the scene at JH Town Square remained largely static, with festive holiday lights adorning trees and a prominent archway creating a warm, celebratory atmosphere under the night sky. A pedestrian was seen crossing the street near the center of the frame, moving from right to left, while vehicles remained mostly stationary or passed through the intersection with traffic lights changing from red to green. The overall ambiance was quiet and serene, capturing a typical evening in a decorated downtown area during the holiday season."

**Cost: $0.10 (5 min × $0.02/min)** | 10 frames captured

---

## Experiment 3: Lofi Hip Hop Radio (24/7 YouTube Live)

**Stream:** Lofi Girl - beats to relax/study to
**URL:** `https://www.youtube.com/watch?v=jfKfPfyJRdk`

### Query: "What song is playing?"
> **AI Response:** "The top left corner of the image clearly shows a text overlay that reads 'NOW PLAYING NO SPIRIT x Softy - Lift Up', indicating the song name, artist, and track title currently playing."

**Cost: $0.01** | Latency: ~5s

### Query: "What is the cat doing?"
> **AI Response:** "There is a ginger cat visible in the image, resting on the windowsill behind the person. It is curled up and appears to be sleeping or resting, with its body facing away from the viewer and its head turned slightly toward the window."

**Cost: $0.01** | Latency: ~5s

### Query: "Describe everything visible"
> **AI Response:** "The image shows an animated scene of a person with short brown hair wearing white and red LOFI headphones, sitting at a desk writing in a notebook. They are wearing a green sweater and a red scarf. On the desk, there's a laptop, scissors, a mug with 'LOFI' written on it, a potted plant, and a cat sleeping on the windowsill. Outside the window, a snowy cityscape is visible under a dark sky with falling snow. To the right, there's a bookshelf with books, photos, a calendar, and a stuffed cow."

**Cost: $0.01** | Latency: 5.2s

---

## Cost Summary

| Experiment | Queries | Digest | Total Cost |
|-----------|---------|--------|-----------|
| Eagle Nest Cam | 3 × $0.01 | 5 min × $0.02/min | $0.13 |
| Jackson Hole Cam | 3 × $0.01 | 5 min × $0.02/min | $0.13 |
| Lofi Stream | 3 × $0.01 | - | $0.03 |
| **Total** | | | **$0.29** |

**9 instant queries + 2 five-minute digests = $0.29 total**

For comparison:
- Ring Protect: $3.99/month per camera
- Nest Aware: $8/month per camera
- Enterprise video analytics: $50K+/year

---

## The "Wow" Takeaway

With one API call and $0.01, an AI:
- Identified a sleeping bald eagle on an infrared night-vision camera
- Read the song currently playing on a lofi stream
- Counted vehicles and checked for jaywalkers on a city cam
- Described a cat napping on a windowsill

With $0.10 and 5 minutes, the AI wrote a narrative summary of everything that happened at Jackson Hole Town Square — a task no human has time to do manually.

**Extrapolated:** 24-hour monitoring = $28.80. That's an "AI security guard" for less than minimum wage.


path: FIRST_PRINCIPLES_ANALYSIS.md
content: # First Principles Analysis: Why Does This Skill Exist?
## Trio Vision OpenClaw Skill — Pain Points & User Demand

---

## The One-Sentence Answer

**It lets an AI agent watch a live video feed and tell you what's happening — or alert you when something specific happens.**

The raw capability chain:
1. User has a video stream (camera, YouTube, Twitch)
2. User has a question about what's happening in that stream
3. Trio's API sends frames to a vision LLM
4. Vision LLM answers the question
5. OpenClaw agent delivers the answer to the user via chat

---

## The Core Pain Point

### "I can't watch everything all the time."

Humans have cameras everywhere — doorbell cams, baby monitors, security cameras, pet cams, traffic cams, store cameras, warehouse cameras — but **nobody sits and watches them**. The footage exists, but the attention doesn't.

### Why Current Solutions Suck

| Solution | Problem |
|----------|---------|
| **Motion detection** | Too dumb. Alerts on every shadow, wind, animal. Alert fatigue kills it. |
| **Dedicated surveillance software** | Expensive, complex, requires setup, separate app, separate notification system |
| **Checking manually** | Defeats the purpose of having a camera |
| **Enterprise video AI** | $50K+/year, requires ML team, overkill for most users |

### How Trio + OpenClaw Solves It Differently

Instead of "motion detected," you say:
- *"Tell me when a person walks up to my front door"*
- *"Alert me if my dog gets on the couch"*
- *"Let me know when the delivery truck arrives"*

In **plain English**, delivered to **WhatsApp/Telegram/Slack** where you already are.

---

## Who Actually Installs This? (5 Personas)

### Persona 1: The Indie Hacker / Solo Founder
**Pain:** "I run a small e-commerce warehouse. I have IP cameras. I want to know when packages pile up at the shipping station, or when the delivery truck arrives. I don't have budget for enterprise surveillance AI."

**Why this skill:** $0.02/min monitoring is dirt cheap vs. any alternative. Natural language conditions. No ML expertise needed. Already uses OpenClaw for other automation.

**Example commands:**
- "Watch the loading dock camera and tell me when a truck pulls in"
- "Check if there are more than 10 packages on the sorting table"

---

### Persona 2: The DevOps / Home Lab Tinkerer
**Pain:** "I have RTSP cameras on my network. I've tried Frigate, Blue Iris, etc. They're powerful but complex. I just want simple alerts in Telegram when something specific happens."

**Why this skill:** Connects cameras they already own to the chat app they already use via the agent they already run. Zero additional infrastructure.

**Example commands:**
- "Monitor rtsp://192.168.1.100/stream and alert me if someone is at the front door"
- "What's happening in my backyard right now?"

---

### Persona 3: The Content Creator / Streamer
**Pain:** "I want to monitor my own stream or competitor streams for specific moments. When did chat engagement spike? When did someone raid? What happened while I was AFK?"

**Why this skill:** Live digest gives narrative summaries of stream activity. Check-once gives instant answers about stream state. Already using OpenClaw for content automation.

**Example commands:**
- "Summarize what's happening on this Twitch stream every 5 minutes"
- "Is the streamer currently playing or in a menu screen?"

---

### Persona 4: The Smart Home Power User
**Pain:** "My Home Assistant setup detects motion but can't tell me WHAT moved. Was it my cat or a person? Is the garage door actually open or did the sensor glitch?"

**Why this skill:** Visual verification of smart home sensor data. "Is the garage door actually open?" is a vision question, not a sensor question.

**Example commands:**
- "Check the garage camera — is the door open or closed?"
- "Look at the living room camera — is the baby sleeping or awake?"

---

### Persona 5: The Builder / Developer
**Pain:** "I'm prototyping a product that needs video understanding. I don't want to build frame extraction, model serving, and alerting infrastructure just to validate my idea."

**Why this skill:** Trio is the fastest path from "idea" to "working video AI prototype." The skill makes it accessible from a chat interface for testing before writing code.

**Example commands:**
- "Check if this camera feed can reliably detect when a parking spot is empty"
- "Test this condition on the stream: 'Is there a line of more than 5 people?'"

---

## The Three Real Reasons People Install

### Reason 1: "I have cameras and I want smarter alerts" (Biggest audience)
- Home security cameras (Ring, Wyze, Reolink, RTSP)
- Baby/pet monitors
- Warehouse/office cameras
- Existing alert systems are motion-based (dumb) or nonexistent
- **This is the mass-market hook**

### Reason 2: "I need to watch something I can't watch myself" (Niche but sticky)
- Monitor a live construction site from anywhere
- Watch a parking spot for availability
- Track foot traffic at a business entrance
- Watch weather/environmental conditions at a remote location
- **These users have the highest retention — once set up, they don't leave**

### Reason 3: "I want to prototype video AI fast" (Developer audience)
- Test vision conditions before writing production code
- Validate that video AI can solve a specific business problem
- Demo capability to stakeholders without a full engineering build
- **This drives word-of-mouth among the developer community**

---

## What Pain Points Does It NOT Solve?

Honest limitations:

| Limitation | Detail |
|-----------|--------|
| **Not a full surveillance system** | No recording, no playback, no evidence storage |
| **Not free** | $0.02/min adds up — 24/7 monitoring = ~$28.80/day |
| **Requires a live stream** | Can't analyze recorded video files (single images work via analyze-frame) |
| **Cloud-dependent** | Frames go to Trio's servers → VLM. Privacy-sensitive users won't use it for indoor cameras |
| **Not millisecond-reactive** | Minimum 5-second check intervals, not real-time response |
| **Not offline-capable** | Requires internet connection and Trio API availability |

---

## The Right Positioning

### Wrong (Feature-Focused)
> "Monitor and analyze live video streams using Trio's Vision AI API. Supports YouTube Live, Twitch, RTSP/RTSPS, and HLS streams."

This describes what the API does. Nobody installs a skill because of the API it wraps.

### Right (Pain-Focused)
> "Turn any camera into a smart camera — just describe what to watch for, in plain English. Get alerts in your chat when it happens."

This describes the problem it solves for the user.

### Alternative Angles

**For the security-minded:**
> "Smart alerts for your cameras. Stop getting motion alerts for every shadow — describe exactly what matters and only get notified when it happens."

**For the tinkerer:**
> "Give your RTSP cameras a brain. Ask them questions, set up watch conditions, get summaries — all from chat."

**For the developer:**
> "Video AI without the pipeline. One API call turns any live stream into structured data your agent can act on."

---

## Strategic Insight: Why This Skill Gets Shared

Skills get shared when they produce a **"wow, I didn't know you could do that"** moment. The sharing trigger for trio-vision is:

> Someone asks their OpenClaw "is my dog on the couch right now?" via WhatsApp, gets a response in 2 seconds with an explanation of what the camera sees, and screenshots it to share with friends.

The **visual + chat** combination is inherently shareable. People share screenshots of AI doing surprising things. "I asked my AI assistant to watch my camera and it told me my dog was sleeping on the forbidden couch" is a tweet/post that writes itself.

This is the growth loop:
1. User installs skill
2. User asks camera a question
3. User gets a surprisingly accurate answer
4. User screenshots and shares
5. Others see it and want the same setup
6. They install OpenClaw + trio-vision

**The key insight: the skill's growth driver is the "wow moment," not the technical capability.**

---

## Recommended Description (For SKILL.md)

```
Turn any live camera into a smart camera — describe what to watch for in plain English, get alerts in your chat when it happens. Ask questions about any live stream (YouTube, Twitch, security cameras, RTSP), set up continuous monitoring with custom conditions, or get periodic summaries of what's happening. No ML expertise required.
```

This works because:
1. **Leads with the transformation** ("turn any camera into a smart camera")
2. **Emphasizes simplicity** ("plain English," "no ML expertise")
3. **Names the delivery channel** ("your chat" — where OpenClaw users already are)
4. **Lists concrete stream types** (for discoverability)
5. **Covers all three use modes** (questions, monitoring, summaries)


path: GTM_DISTRIBUTION_PLAN.md
content: # Trio Vision — GTM Distribution Plan
## Goal: Maximum awareness + PMF signal collection

**Objective:** Get trio-vision in front of as many potential users as possible across every available channel. Measure interest signals (installs, questions, engagement, feedback) to validate product-market fit for Trio's Vision AI API.

**PMF Signal = Any of:** ClawHub installs, GitHub stars, API key signups, Discord messages, Reddit upvotes, HN comments, Moltbook engagement, demo usage, "how do I..." questions.

---

## PHASE 1: IMMEDIATE (This Week) — Ship & Seed

### 1.1 Moltbook Post (Agentic)
**What:** Post on Moltbook — the AI social network with 770K+ active agents. This is the native social layer for OpenClaw users.
**Action:**
```
Install moltbook skill, then post:
"Just shipped trio-vision — an OpenClaw skill that turns any live camera into a smart camera.
Ask it questions about any YouTube Live, Twitch, or RTSP stream in plain English.
'Is anyone at my front door?' → instant answer. 'Alert me when a package arrives' → continuous watch.
Install: clawhub install trio-vision
Free 100 credits at console.machinefi.com"
```
**PMF signal:** Upvotes, comments, agent interactions
**Effort:** 5 min

### 1.2 OpenClaw Discord (#skills channel)
**What:** Post in the OpenClaw Discord (14,627 members). Draft ready in `DISTRIBUTION.md`.
**Action:** Copy-paste the Discord post from `DISTRIBUTION.md` into #skills channel.
**PMF signal:** Reactions, replies, "how do I..." questions
**Effort:** 5 min

### 1.3 OpenClaw GitHub Discussions
**What:** Post in the Ideas category on github.com/openclaw/openclaw/discussions (190K+ stars repo).
**Action:** Create a new discussion titled "New skill: trio-vision — smart camera alerts via Vision AI" with install instructions and 3 use case examples.
**PMF signal:** Upvotes, comments, stars on skill repo
**Effort:** 10 min

### 1.4 Show HN Post
**What:** Launch on Hacker News as a Show HN post. HN loves "look what AI can do" posts with live demos.
**Action:**
```
Title: Show HN: Turn any camera into a smart camera with natural language (OpenClaw skill)
URL: https://github.com/drandrewlaw/trio-openclaw-skill
```
Body comment: Explain the pain (dumb motion alerts), the solution (natural language conditions), the cost ($0.01/check), and link to install.
**PMF signal:** Upvotes, comments, "I'd use this for..." responses
**Effort:** 15 min
**Timing:** Post at 8-9am EST on a Tuesday/Wednesday for best visibility

### 1.5 Reddit Seeding (5 subreddits)
**What:** Post in communities where camera/smart home users already ask questions trio-vision answers.
**Action:** Create genuine, helpful posts (not spam) in these subreddits:

| Subreddit | Angle | Post Title |
|-----------|-------|------------|
| r/homeassistant | Integration | "I built an OpenClaw skill that lets my AI agent watch my RTSP cameras and alert me in plain English" |
| r/selfhosted | DIY tool | "Open-source skill that adds natural-language AI to any camera feed — no ML setup needed" |
| r/smarthome | Use case | "Finally got rid of dumb motion alerts — now I describe what to watch for in English" |
| r/homedefense | Security | "AI-powered camera monitoring that only alerts for things that actually matter ($0.01/check)" |
| r/artificial | Tech showcase | "Built a vision AI agent skill that watches live streams and answers questions about what it sees" |

**PMF signal:** Upvotes, comments, "does it work with X camera?" questions
**Effort:** 30 min total

---

## PHASE 2: THIS WEEK — Deploy & Demo

### 2.1 Conway Live Demo (THE BIG BET)
**What:** Deploy a public demo on Conway (OpenClaw's cloud compute) that watches a curated set of live streams. Anyone can interact with the agent and ask questions about what it sees. Zero friction, no install, no signup.
**Action:**
1. Spin up a Conway sandbox
2. Install trio-vision skill with API key
3. Connect to 3-5 interesting public streams (city cams, wildlife cams, weather cams)
4. Create a shareable URL
5. Post the demo URL everywhere

**PMF signal:** Number of queries, unique visitors, questions asked, time spent
**Effort:** 2-4 hours
**Impact:** VERY HIGH — the product demos itself

### 2.2 "trio-vision-demo" Meta-Skill
**What:** Create a lightweight demo skill that other OpenClaw agents can invoke. When any agent gets asked "can you watch cameras?" or "do you have vision?", it can pull in the demo, show a live result, and link to install.
**Action:** Create a `trio-vision-demo` skill on ClawHub that does one free check on a public stream as a demo, then says "Install the full skill: `clawhub install trio-vision`"
**PMF signal:** Demo invocations, conversion to full install
**Effort:** 1-2 hours

### 2.3 Twitter/X Launch Thread
**What:** Post a thread from your personal or MachineFi account showing trio-vision in action.
**Action:** Thread format:
```
1/ Just shipped something cool: ask your AI agent about any live camera and get an instant answer.

"Is anyone at my front door?" → 2 seconds → "Yes, there's a person in a blue jacket standing near the doorbell."

It's an OpenClaw skill called trio-vision. Here's how it works 🧵

2/ The problem: cameras are everywhere but nobody watches them. Motion alerts go off for every shadow and cat. Enterprise video AI costs $50K+/year.

3/ The solution: describe what matters in plain English. "Alert me when a package is delivered." That's it.

4/ Works with any live stream — YouTube Live, Twitch, RTSP cameras, HLS. $0.01 per check, $0.02/min for continuous monitoring.

5/ Install in one command:
clawhub install trio-vision

Free 100 credits at console.machinefi.com

[screenshot of agent answering a camera question]
```
**PMF signal:** Likes, retweets, replies, link clicks
**Effort:** 20 min
**Hashtags:** #OpenClaw #AIAgent #ComputerVision #SmartHome

---

## PHASE 3: WEEK 2-3 — Content & Partnerships

### 3.1 Tutorial Blog Posts (3 articles)
**What:** SEO-optimized content targeting high-intent keywords.

| Article | Target Keyword | Platform |
|---------|---------------|----------|
| "How to Turn a $25 Camera into an AI Smart Camera in 5 Minutes" | "AI security camera DIY" | dev.to, Medium, Hashnode |
| "I Replaced My $10/month Nest Aware Subscription with trio-vision" | "Nest Aware alternative" | Reddit, blog |
| "How to Get AI Camera Alerts in Slack/Telegram/WhatsApp" | "AI camera alerts Slack" | dev.to |

**PMF signal:** Views, claps/reactions, "I tried this and..." comments
**Effort:** 2-3 hours per article

### 3.2 Comparison Content
**What:** Position trio-vision against known alternatives.

| Article | Angle |
|---------|-------|
| "trio-vision vs Frigate: Conversational AI vs NVR" | Target self-hosted crowd |
| "trio-vision vs Nest/Ring/Arlo subscriptions" | Cost savings angle |
| "Why trio-vision is not an NVR (and why that's the point)" | Positioning clarity |

**PMF signal:** Search traffic, "which should I use?" discussions
**Effort:** 1-2 hours per article

### 3.3 Integration Recipes (Compound Value)
**What:** Build 2-3 example workflows combining trio-vision with other OpenClaw skills.

| Recipe | Skills Combined | User Story |
|--------|----------------|------------|
| "Smart Porch Alert" | trio-vision + imsg/slack | "If person at door, send me a message with description" |
| "Delivery Tracker" | trio-vision + apple-notes | "Log every delivery with timestamp and AI description" |
| "Pet Monitor" | trio-vision + cron | "Check the pet cam every 30 min, summarize what the dog is doing" |

**PMF signal:** Recipe adoption, "I set this up and..." feedback
**Effort:** 1-2 hours per recipe

### 3.4 YouTube Smart Home Creator Outreach
**What:** Reach out to YouTube creators in the smart home space with a free demo.
**Targets:** The Hook Up, Everything Smart Home, Paul Hibbert, JuanStech, Smart Home Solver
**Action:** DM/email with "I built an AI skill that turns any RTSP camera into a smart camera — would you be interested in trying it? Free credits included."
**PMF signal:** Creator interest, video features, audience response
**Effort:** 30 min for outreach

---

## PHASE 4: WEEK 3-4 — Growth Loops & Challenges

### 4.1 "What Does My AI See?" Challenge
**What:** Social media challenge. Users point trio-vision at something unexpected and share the AI's description.
**Format:** Share on X/TikTok/Reddit with hashtag #WhatDoesMyAISee
**Angles:**
- "Security Camera Roast" — AI describes your messy desk/garage
- "Pet Watch" — what is my cat/dog actually doing all day?
- "Time-lapse Intelligence" — 24-hour summary of a location
**PMF signal:** Challenge participation, UGC volume, hashtag usage
**Effort:** Create the challenge post + 2-3 seed examples

### 4.2 Bounty Program: Best Use Case
**What:** 2-week contest. Submit your most creative trio-vision use case.
**Prize:** $500 in Trio API credits split across top 3
**Categories:** Most useful, most creative, best business use case
**PMF signal:** Submissions = real use cases you didn't think of. Each submission is free marketing content.
**Effort:** Set up rules, judge, announce

### 4.3 Automated Social Agent (Conway)
**What:** Deploy an always-on Conway agent that monitors public streams and posts interesting observations to X/Twitter.
**Example posts:**
- "trio-vision just spotted a sailboat on the San Francisco Bay cam 🌊"
- "Current at Times Square: 47 people visible, 3 yellow cabs, light rain"
**PMF signal:** Follower growth, engagement, "how did you do this?" questions
**Effort:** 2-3 hours to set up, then runs autonomously

---

## PHASE 5: ONGOING — Cross-Listing & Community

### 5.1 Directory Listings
**What:** List trio-vision everywhere skills/tools are discovered.

| Directory | URL | Status |
|-----------|-----|--------|
| ClawHub | clawhub.ai | ✅ Published |
| GitHub | github.com/drandrewlaw/trio-openclaw-skill | ✅ Live |
| awesome-openclaw-skills | github.com/VoltAgent/awesome-openclaw-skills | ⏳ Deferred (needs traction) |
| LobeHub Skills | lobehub.com/skills | 📝 Submit |
| OpenClawDir.com | openclawdir.com | 📝 Submit |
| OpenClawSkills.co | openclawskills.co | 📝 Submit |
| MCP directories | various | 📝 List if MCP interface exists |
| Product Hunt | producthunt.com | 📝 Launch with demo |
| Alternative-To | alternativeto.net | 📝 List under "AI video analytics" |

**PMF signal:** Listing traffic, referral installs
**Effort:** 30 min per directory

### 5.2 Community Seeding (Ongoing)
**What:** Monitor forums for questions trio-vision answers. Be helpful, not spammy.
**Where to watch:**
- r/homeassistant — "best AI for cameras"
- r/selfhosted — "camera monitoring solutions"
- r/smarthome — "smart alerts for cameras"
- Home Assistant forums
- Smart home Discord servers
**Action:** Set up alerts for keywords: "smart camera AI", "camera alerts AI", "vision AI camera", "alternative to Ring alerts"
**PMF signal:** Responses, upvotes, "I tried it" follow-ups
**Effort:** 15 min/day

### 5.3 LinkedIn B2B Angle
**What:** Position trio-vision for business use cases on LinkedIn.
**Angle:** Warehouse monitoring, retail foot traffic, construction site oversight — at $0.02/min instead of $50K/year enterprise solutions.
**Action:** Write 2-3 LinkedIn posts targeting operations managers, warehouse supervisors, retail owners.
**PMF signal:** Connection requests, "can this work for..." DMs
**Effort:** 30 min per post

---

## WILDCARD PLAYS (High Risk, High Reward)

### W1. "Agent-Powered Security Guard" Service
Deploy trio-vision on Conway watching a user's camera 24/7. The agent acts as an autonomous security guard that messages the user when something important happens. Position as "$0.02/min AI security guard" — cheaper than any human or enterprise solution. This is a productized service built on top of the skill.

### W2. Clawnema Integration
Your OpenClaw already has the Clawnema skill (virtual cinema for agents). Create a "trio-vision film festival" where agents watch interesting live camera feeds and provide commentary. Agents critique what they see on wildlife cams, city streams, etc. Pure entertainment angle that creates engagement.

### W3. "Camera Speed Dating"
Post trio-vision descriptions of different camera feeds on Moltbook without revealing the source. Other agents/users guess what the camera is watching based on the description. Gamification of the skill's output.

### W4. Partner with TrioClaw
TrioClaw (github.com/machinefi/TrioClaw) is a Go binary for camera monitoring. Cross-promote: TrioClaw for technical users who want a binary, trio-vision for OpenClaw users who want chat-native experience. Same API, different distribution channels.

---

## PMF MEASUREMENT DASHBOARD

Track these metrics weekly:

| Metric | Source | Target (Week 1) | Target (Month 1) |
|--------|--------|-----------------|-------------------|
| ClawHub installs | clawhub inspect trio-vision | 50 | 500 |
| GitHub stars | github.com/drandrewlaw/trio-openclaw-skill | 20 | 200 |
| Trio API signups (from skill) | console.machinefi.com | 10 | 100 |
| HN upvotes | Show HN post | 50+ | - |
| Reddit upvotes (total) | 5 subreddit posts | 100+ | - |
| Discord questions | OpenClaw Discord | 5 | 30 |
| Moltbook engagement | Moltbook post | 20+ | - |
| Demo URL visits | Conway sandbox | - | 500 |
| "How do I..." questions | All channels | 5 | 50 |
| Negative feedback / "not useful" | All channels | Track | Track |

**PMF = achieved when:**
- Unprompted installs exceed 10/day
- Users describe use cases YOU didn't think of
- People ask "can it do X?" (expansion demand)
- Retention: users who install continue using after 7 days

---

## EXECUTION ORDER (One-Page Summary)

**Today:**
1. ☐ Post on Moltbook
2. ☐ Post on OpenClaw Discord
3. ☐ Post on OpenClaw GitHub Discussions
4. ☐ Submit to LobeHub, OpenClawDir, OpenClawSkills directories

**This week:**
5. ☐ Deploy Conway live demo
6. ☐ Show HN post (Tuesday/Wednesday 8-9am EST)
7. ☐ Reddit posts (5 subreddits)
8. ☐ Twitter/X launch thread
9. ☐ Create trio-vision-demo meta-skill

**Week 2-3:**
10. ☐ Write 3 tutorial blog posts
11. ☐ Build 2-3 integration recipes
12. ☐ YouTube creator outreach
13. ☐ Comparison content (vs Frigate, vs Nest)
14. ☐ LinkedIn B2B posts

**Week 3-4:**
15. ☐ Launch #WhatDoesMyAISee challenge
16. ☐ Deploy automated social agent on Conway
17. ☐ Launch bounty program
18. ☐ Product Hunt launch with live demo

**Ongoing:**
19. ☐ Community seeding (15 min/day)
20. ☐ Track PMF dashboard weekly
21. ☐ Iterate based on signals


path: IMPLEMENTATION_GUIDE.md
content: # Trio Vision OpenClaw Skill — Implementation & Shipping Guide

## Overview

This guide walks you through shipping the `trio-vision` OpenClaw skill from development to ClawHub publication. The skill wraps the Trio API (by MachineFi) to give OpenClaw agents the ability to analyze live video streams using natural-language conditions.

---

## Step 1: Understand the Skill Structure

The skill is a **SKILL.md-only** skill (no JavaScript handler needed). This is the simplest and most common pattern — the agent reads the Markdown instructions and executes shell commands (curl) to interact with the Trio API.

```
trio-vision-skill/
├── SKILL.md              # The skill definition (already created)
├── IMPLEMENTATION_GUIDE.md  # This file (not published)
└── README.md             # Optional, for GitHub repo (not published to ClawHub)
```

### Why SKILL.md-only?

- Trio's API is straightforward REST — curl commands are sufficient
- No complex state management needed between calls
- The agent's built-in reasoning handles workflow orchestration
- Simpler skills have fewer security concerns (important post-ClawHavoc)

---

## Step 2: Local Testing

### 2a. Get a Trio API Key

1. Go to https://console.machinefi.com
2. Sign up (free, gives you 100 credits / $1.00)
3. Navigate to the API Keys section
4. Create and copy your API key

### 2b. Set the Environment Variable

```bash
export TRIO_API_KEY="your_api_key_here"
```

Or add it to your shell profile:
```bash
echo 'export TRIO_API_KEY="your_api_key_here"' >> ~/.zshrc
source ~/.zshrc
```

### 2c. Install the Skill Locally

Copy the skill to your OpenClaw skills directory:

```bash
# Option 1: User-level skills directory
mkdir -p ~/.openclaw/skills/trio-vision
cp trio-vision-skill/SKILL.md ~/.openclaw/skills/trio-vision/SKILL.md

# Option 2: Project-level skills directory (higher precedence)
mkdir -p ./skills/trio-vision
cp trio-vision-skill/SKILL.md ./skills/trio-vision/SKILL.md
```

OpenClaw has hot-reloading enabled by default, so the skill should appear immediately.

### 2d. Verify the Skill is Loaded

```bash
openclaw skills list --eligible
```

You should see `trio-vision` in the list. If not, check:
- Is `TRIO_API_KEY` set in your environment?
- Is `curl` available on your PATH?
- Run `openclaw skills check` for diagnostics

### 2e. Test the Skill

Open OpenClaw and try these commands:

**Quick check:**
```
/trio-vision
Check if there are any people visible on this stream: https://www.youtube.com/live/STREAM_ID
```

**Or just chat naturally:**
```
What's happening on this YouTube live stream? https://www.youtube.com/live/STREAM_ID
```

**Test workflow:**
1. Validate a known live stream URL
2. Run check-once with a simple condition
3. Start a short live-monitor (30 seconds)
4. Check job status
5. Cancel the job

### 2f. Test with Different Stream Types

Test each supported stream type:
- YouTube Live: `https://www.youtube.com/live/STREAM_ID`
- Twitch: `https://www.twitch.tv/CHANNEL_NAME`
- RTSP camera: `rtsp://camera-ip:554/stream`
- HLS: `https://example.com/stream.m3u8`

---

## Step 3: Iterate on the Skill

### Common Issues and Fixes

| Issue | Fix |
|-------|-----|
| Agent doesn't validate stream first | Add stronger "ALWAYS validate first" language in Rules section |
| Agent forgets to show explanation | Emphasize in Rules: "ALWAYS show the explanation field" |
| Agent starts monitor without warning about cost | Add cost disclosure to the monitor workflow |
| Condition writing is poor | The "Condition Writing Tips" section helps the agent write better conditions |
| Error messages are confusing | The `remediation` field from the API gives actionable guidance |

### Testing Checklist

- [ ] Stream validation works (live stream)
- [ ] Stream validation handles offline/invalid URLs gracefully
- [ ] Check-once returns triggered + explanation
- [ ] Check-once with include_frame works
- [ ] Check-once with clip mode works
- [ ] Live-monitor creates a job and returns job_id
- [ ] Job status check works
- [ ] Job cancellation works
- [ ] Live-digest creates a job
- [ ] Analyze-frame works with a local image
- [ ] Error handling shows remediation
- [ ] Agent warns about costs before starting monitor/digest
- [ ] Agent never exposes the API key

---

## Step 4: Prepare for Publication

### 4a. Set Up a GitHub Account

ClawHub requires a GitHub account that is at least **one week old**. If you're publishing from a new account, wait the required period.

### 4b. Install ClawHub CLI

The ClawHub CLI comes bundled with OpenClaw. Verify it's available:

```bash
clawhub --version
```

### 4c. Authenticate with ClawHub

```bash
# This opens a browser for GitHub OAuth
clawhub login
```

### 4d. Choose a Slug

The slug is the unique identifier on ClawHub. Recommended: `machinefi/trio-vision`

Format: `<publisher>/<skill-name>`

---

## Step 5: Publish to ClawHub

### 5a. Publish the Skill

```bash
clawhub publish ./trio-vision-skill \
  --slug machinefi/trio-vision \
  --name "Trio Vision" \
  --version 1.0.0 \
  --changelog "Initial release: check-once, live-monitor, live-digest, analyze-frame" \
  --tags "vision,video,streaming,monitoring,camera,surveillance,ai"
```

### 5b. Verify Publication

```bash
clawhub inspect machinefi/trio-vision
```

Also check on the web: https://clawhub.ai (search for "trio-vision")

### 5c. Test Installation from ClawHub

On a clean machine or in a fresh OpenClaw instance:

```bash
# Install from ClawHub
openclaw skills install machinefi/trio-vision

# Verify
openclaw skills list --eligible | grep trio
```

---

## Step 6: Distribution Beyond ClawHub

### 6a. GitHub Repository

Create a public GitHub repo for the skill:

```bash
cd trio-vision-skill
git init
git add SKILL.md README.md
git commit -m "Initial release of trio-vision OpenClaw skill"
git remote add origin https://github.com/machinefi/trio-openclaw-skill.git
git push -u origin main
```

Users can install directly from Git:
```bash
git clone https://github.com/machinefi/trio-openclaw-skill.git ~/.openclaw/skills/trio-vision
```

### 6b. Link from Trio Documentation

Add an "OpenClaw Integration" section to https://docs.machinefi.com/ with:
- One-line install command
- Link to ClawHub listing
- Link to GitHub repo
- Quick demo GIF/video

### 6c. Cross-promote

- Add to the `trio-examples` GitHub repo
- Mention in Trio API docs quickstart
- Post on the OpenClaw Discord (#skills channel, 116K members)
- Submit to awesome-openclaw-skills curated list (https://github.com/VoltAgent/awesome-openclaw-skills)

---

## Step 7: Version Management

### Semantic Versioning

Follow semver for updates:
- **Patch** (1.0.1): Bug fixes, wording improvements
- **Minor** (1.1.0): New features (e.g., adding analyze-frame support)
- **Major** (2.0.0): Breaking changes to skill behavior

### Publishing Updates

```bash
clawhub publish ./trio-vision-skill \
  --slug machinefi/trio-vision \
  --version 1.1.0 \
  --changelog "Added analyze-frame endpoint support, improved condition writing tips" \
  --tags "vision,video,streaming,monitoring,camera,surveillance,ai"
```

### Rollback

ClawHub supports tags for version pinning. The `latest` tag automatically points to the newest version. To rollback:

```bash
clawhub publish ./trio-vision-skill \
  --slug machinefi/trio-vision \
  --version 1.0.0 \
  --tags latest
```

---

## Step 8: Advanced — JavaScript Handler Version (Optional)

If you later want more sophisticated behavior (rate limiting, response caching, structured output), you can upgrade to a JavaScript-based skill:

```
trio-vision-skill/
├── SKILL.md           # Instructions (keep existing)
├── manifest.json      # Input schema definition
└── index.mjs          # Handler with run() function
```

**manifest.json:**
```json
{
  "name": "trio-vision",
  "version": "1.0.0",
  "description": "Monitor and analyze live video streams using Trio Vision AI",
  "schema": {
    "type": "object",
    "properties": {
      "action": {
        "type": "string",
        "enum": ["validate", "check", "monitor", "digest", "analyze", "status", "cancel", "list"],
        "description": "The Trio API action to perform"
      },
      "stream_url": {
        "type": "string",
        "description": "URL of the live video stream"
      },
      "condition": {
        "type": "string",
        "description": "Natural-language condition to check or monitor"
      },
      "job_id": {
        "type": "string",
        "description": "Job ID for status check or cancellation"
      },
      "options": {
        "type": "object",
        "description": "Additional parameters (interval_seconds, webhook_url, etc.)"
      }
    },
    "required": ["action"]
  }
}
```

**index.mjs:**
```javascript
const BASE_URL = "https://trio.machinefi.com/api";

export async function run(params, ctx) {
  const [REDACTED_SECRET];
  if (!apiKey) {
    return { error: true, message: "TRIO_API_KEY is not set. Get one at https://console.machinefi.com" };
  }

  const headers = {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  };

  const { action, stream_url, condition, job_id, options = {} } = params;

  try {
    switch (action) {
      case "validate": {
        const res = await fetch(`${BASE_URL}/streams/validate`, {
          method: "POST",
          headers,
          body: JSON.stringify({ stream_url }),
        });
        return handleResponse(res);
      }

      case "check": {
        const body = { stream_url, condition, ...options };
        const res = await fetch(`${BASE_URL}/check-once`, {
          method: "POST",
          headers,
          body: JSON.stringify(body),
        });
        return handleResponse(res);
      }

      case "monitor": {
        const body = {
          stream_url,
          condition,
          interval_seconds: 10,
          monitor_duration_seconds: 600,
          max_triggers: 1,
          ...options,
        };
        const res = await fetch(`${BASE_URL}/live-monitor`, {
          method: "POST",
          headers,
          body: JSON.stringify(body),
        });
        return handleResponse(res);
      }

      case "digest": {
        const body = {
          stream_url,
          window_minutes: 10,
          capture_interval_seconds: 60,
          ...options,
        };
        const res = await fetch(`${BASE_URL}/live-digest`, {
          method: "POST",
          headers,
          body: JSON.stringify(body),
        });
        return handleResponse(res);
      }

      case "analyze": {
        const body = { ...options };
        const res = await fetch(`${BASE_URL}/analyze-frame`, {
          method: "POST",
          headers,
          body: JSON.stringify(body),
        });
        return handleResponse(res);
      }

      case "status": {
        const res = await fetch(`${BASE_URL}/jobs/${job_id}`, { headers });
        return handleResponse(res);
      }

      case "cancel": {
        const res = await fetch(`${BASE_URL}/jobs/${job_id}`, {
          method: "DELETE",
          headers,
        });
        return handleResponse(res);
      }

      case "list": {
        const query = new URLSearchParams(options).toString();
        const res = await fetch(`${BASE_URL}/jobs?${query}`, { headers });
        return handleResponse(res);
      }

      default:
        return { error: true, message: `Unknown action: ${action}` };
    }
  } catch (err) {
    return { error: true, message: err.message.slice(0, 500) };
  }
}

async function handleResponse(res) {
  const data = await res.json();
  if (!res.ok) {
    return {
      error: true,
      status: res.status,
      code: data?.error?.code,
      message: data?.error?.message,
      remediation: data?.error?.remediation,
    };
  }
  return data;
}
```

This is optional — the SKILL.md-only version is fully functional and recommended for the initial release.

---

## Step 9: Monitor & Iterate Post-Launch

### Metrics to Track

- **ClawHub installs** — check via `clawhub inspect machinefi/trio-vision`
- **API usage from skill** — track in Trio console (console.machinefi.com)
- **GitHub stars** — on the repo
- **Community feedback** — OpenClaw Discord, GitHub issues

### Responding to Reports

ClawHub auto-hides skills after 3 community reports. If your skill gets flagged:
1. Check the reports for specifics
2. Fix the issue
3. Publish a patch version
4. The flag count resets on new versions

### Iteration Ideas

- Add example stream URLs for testing (publicly available live cameras)
- Add a "security camera starter" workflow for common home/business monitoring
- Add integration with OpenClaw's scheduled jobs for recurring checks
- Add webhook server setup instructions for advanced users

---

## Quick Reference: File Locations

| File | Purpose |
|------|---------|
| `~/.openclaw/skills/trio-vision/SKILL.md` | User-level skill install location |
| `./skills/trio-vision/SKILL.md` | Project-level skill install location |
| `~/.zshrc` or `~/.bashrc` | Where to persist `TRIO_API_KEY` |
| OpenClaw config | Alternative API key storage via `skills.entries.trio-vision.apiKey` |

## Quick Reference: Commands

```bash
# Local testing
openclaw skills list --eligible
openclaw skills info trio-vision
openclaw skills check

# Publishing
clawhub login
clawhub publish ./trio-vision-skill --slug machinefi/trio-vision --version 1.0.0
clawhub inspect machinefi/trio-vision

# User installation (after publishing)
openclaw skills install machinefi/trio-vision
```

---

## Summary: Ship Checklist

- [x] **Step 1**: Skill structure created (SKILL.md)
- [ ] **Step 2**: Local testing with real Trio API key
- [ ] **Step 3**: Iterate on skill based on testing
- [ ] **Step 4**: Prepare GitHub account and ClawHub auth
- [ ] **Step 5**: Publish to ClawHub
- [ ] **Step 6**: Distribute (GitHub, docs, Discord, awesome list)
- [ ] **Step 7**: Set up version management workflow
- [ ] **Step 8**: (Optional) Upgrade to JavaScript handler
- [ ] **Step 9**: Monitor post-launch metrics and iterate


path: README.md
content: # trio-stream-vision — Analyze Any Livestream with Natural Language

Paste a YouTube Live URL, RTSP camera feed, or HLS stream — ask questions about what's happening in plain English. Detect specific events, monitor conditions continuously, or get periodic summaries. No ML pipelines, no model downloads, no GPU required.

Powered by [Trio's Reality-as-an-API](https://machinefi.com) vision models.

## The Problem

Live video is everywhere — YouTube streams, security cameras, webcams, Twitch channels — but extracting useful information from them requires building ML pipelines, managing frame extraction, and serving vision models. Enterprise video AI starts at $50K+/year.

## The Solution

Describe what you want to know in plain English. Trio's vision models analyze the stream and return structured answers.

| What You Say | What Happens | Cost |
|-------------|-------------|------|
| "Is anyone visible on this stream?" | Instant yes/no + explanation of what the VLM sees | $0.01 |
| "Alert me when a delivery truck appears" | Continuous monitoring, triggers when condition is met | $0.02/min |
| "Summarize this livestream every 10 minutes" | Periodic narrative digests of stream activity | $0.02/min |

Works with **YouTube Live**, **RTSP/RTSPS cameras**, and **HLS streams**.

## Install

```bash
# From ClawHub
openclaw skills install machinefi/trio-stream-vision

# Or clone directly
git clone https://github.com/machinefi/trio-openclaw-skill.git ~/.openclaw/skills/trio-stream-vision
```

## Setup

1. Get a free API key (100 credits / $1.00) at https://console.machinefi.com
2. Set your key:
   ```bash
   export TRIO_API_KEY="your_key_here"
   ```
3. That's it. No ML setup, no model downloads, no GPU required.

## What You Can Do

**Instant Stream Analysis**
> "What's happening on this YouTube livestream right now?"
> "Is there anyone visible in the frame?"
> "How many cars are in the parking lot?"

**Continuous Event Detection**
> "Watch this stream and alert me when a person appears"
> "Monitor the loading dock — notify me when a truck arrives"
> "Tell me when the streamer starts a new game"

**Periodic Summaries**
> "Summarize this livestream every 5 minutes"
> "Give me a digest of this security feed every 30 minutes"

**Smart Home & Security Cameras**
> "Check the garage camera — is the door open or closed?"
> "Is the baby sleeping or awake?"
> "Watch my front door and tell me when a person (not a cat) approaches"

## How It Works

1. You paste a live stream URL and describe what you want to know
2. Trio extracts frames (or short clips) from the stream
3. A vision language model (VLM) analyzes the visual content against your condition
4. You get a structured response: `triggered` (yes/no), `explanation` (what the VLM sees), and optional frame data

Three analysis modes:
- **Frames** (default) — single frame analysis, best for static objects
- **Clip** — short video segment (1-10s), best for motion and actions
- **Hybrid** — combined analysis for maximum accuracy

## Links

- [Trio API Reference](https://docs.machinefi.com/api-reference/)
- [Trio Console & Free API Key](https://console.machinefi.com)
- [OpenClaw](https://openclaw.ai)
- [ClawHub](https://clawhub.ai)

## License

Apache-2.0


Security scan verdicts — ClawScan: suspicious | static analysis: suspicious | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)