ambient-iq
Workspace environment auditor. Captures your desk/room via the local machine camera, runs GPT-4 Vision analysis, and returns multi-dimensional scores (lighting, ergonomics, cables, clutter, focus) with spoken feedback to the R1.
- License 许可
- MIT
- 最近更新
- 2026-09-04
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ambient-iq
- author
- rabbit-r1-skillz
- version
- 1.0.0
- metadata
- { "openclaw": { "requires": { "env": [ "OPENAI_API_KEY" ], "bins": [ "node", "python3" ], "optional_env": [ "AMBIQ_CAMERA_INDEX", "AMBIQ_CAPTURE_CMD", "AMBIQ_SCREENSHOT_MODE" ] }, "primaryEnv": "OPENAI_API_KEY" } }
- description
- Workspace environment auditor. Captures your desk/room via the local machine camera, runs GPT-4 Vision analysis, and returns multi-dimensional scores (lighting, ergonomics, cables, clutter, focus) with spoken feedback to the R1.
02 资源文件 3
- 资产文件card.jpg25.4 KB
- 资产文件icon.png11.7 KB
- 参考文档index.html58.2 KB
03 SKILL.md 正文
AmbientIQ — Workspace Environment Auditor
You are ambient-iq, a skill that captures a photo of the user's workspace via their local machine camera, sends it to GPT-4 Vision for structured environmental analysis, and returns dimension scores and spoken recommendations back to the R1 Creation.
Commands you handle
| Command sent by R1 | What you do |
|---|---|
analyze |
Capture image → GPT-4 Vision analysis → return structured scores and spoken feedback |
Local Setup
1. Install Node.js and Python dependencies
Node.js 18+ is required for the OpenClaw skill runner.
# Inside the skill directory
cd ~/.openclaw/skills/ambient-iq
npm install
Python is used for camera capture (OpenCV):
pip install opencv-python pillow
Windows alternative (no Python): set AMBIQ_SCREENSHOT_MODE=1 in .env to capture the primary monitor screenshot instead of a camera frame. This works well if your workspace monitor is visible from the R1's position.
2. Install the skill
cp -r ambient-iq ~/.openclaw/skills/ambient-iq
cd ~/.openclaw/skills/ambient-iq
npm install
3. Configure environment
Copy .env.example to .env inside the skill directory:
# Required: OpenAI API key with GPT-4 Vision access
OPENAI_API_KEY=sk-...
# Optional: Camera device index (0 = default camera, 1 = second camera, etc.)
# Default: 0
AMBIQ_CAMERA_INDEX=0
# Optional: Use a custom shell command to capture a JPEG and write to stdout.
# If set, overrides the Python OpenCV capture path entirely.
# Example: capture from a Logitech StreamCam on macOS via ffmpeg:
# AMBIQ_CAPTURE_CMD=ffmpeg -f avfoundation -i "0" -frames:v 1 -f image2pipe -vcodec mjpeg -
# Example: take a macOS screenshot:
# AMBIQ_CAPTURE_CMD=screencapture -x -t jpg -
AMBIQ_CAPTURE_CMD=
# Optional: Screenshot mode — captures the primary monitor instead of camera.
# Useful when running on a laptop where the screen IS the workspace view,
# or when testing without a camera attached.
# Set to 1 to enable.
AMBIQ_SCREENSHOT_MODE=0
4. Verify camera access
Test the capture pipeline before running the skill:
# Python test — should open a preview window for 2 seconds then save test.jpg
python3 -c "
import cv2, sys
cam = cv2.VideoCapture(int('${AMBIQ_CAMERA_INDEX:-0}'))
ok, frame = cam.read()
cam.release()
if not ok: print('FAIL: could not capture'); sys.exit(1)
cv2.imwrite('test.jpg', frame)
print('OK: saved test.jpg')
"
# Screenshot mode test (Windows/macOS):
# On Windows (PowerShell):
# Add-Type -AssemblyName System.Windows.Forms
# [System.Windows.Forms.Screen]::PrimaryScreen | Out-Null
# On macOS:
# screencapture -x /tmp/ambiq-test.jpg && open /tmp/ambiq-test.jpg
What the skill does step by step
analyze command
Receives params:
{
"target": "full | lighting | ergonomics | cables | clutter",
"prompt": "Detailed analysis prompt from the R1",
"isMorning": false,
"hasBefore": false
}
Steps:
-
Capture image — uses one of three paths in priority order:
AMBIQ_CAPTURE_CMDif set: runs the command, reads JPEG from stdoutAMBIQ_SCREENSHOT_MODE=1: takes a fullscreen screenshot (usingscreencaptureon macOS,PrintScreenvia PowerShell on Windows)- Default: Python + OpenCV frame grab from camera index
AMBIQ_CAMERA_INDEX
-
Resize image — scales to max 512×512 px to stay within GPT-4 Vision's efficient token range while preserving aspect ratio.
-
Send to GPT-4 Vision — posts the image as a base64
image_urlalong with the prompt from the R1. Usesgpt-4o(vision-capable) with a structured JSON response schema. -
Parse response — extracts:
- Dimension scores (
light,ergo,order,cables,focus,overall) as integers 1–10 - Recommendations array:
[{dim, tag, title, detail}]wheretagis"great" | "ok" | "poor" | "info" spokenFeedback— a natural-language summary suitable for TTS (2–3 sentences max)
- Dimension scores (
-
Write response to OpenClaw shared storage key
openclaw:resp.
Response shape:
{
"status": "done",
"ts": 1700000000000,
"data": {
"scores": {
"light": 7,
"ergo": 5,
"order": 6,
"cables": 4,
"focus": 6,
"overall": 5.6
},
"recs": [
{
"dim": "ergo",
"tag": "poor",
"title": "Monitor too low",
"detail": "Your monitor appears about 3 inches below eye level. Consider a monitor stand to reduce neck strain."
},
{
"dim": "cables",
"tag": "poor",
"title": "Cable bundle visible",
"detail": "A loose cable bundle is visible on the right side of the desk. A cable clip or tray would clean this up."
},
{
"dim": "light",
"tag": "ok",
"title": "Good natural light",
"detail": "Natural light from the left window looks diffuse and well-positioned."
}
],
"spokenFeedback": "Your lighting is good but your monitor appears about 3 inches too low — consider a stand. Desk clutter score is 6 out of 10 — the cable area on your right looks like the main culprit. Overall score: 5.6 out of 10."
}
}
GPT-4 Vision system prompt
The skill sends this system prompt with every analysis request:
You are an expert workspace ergonomics and productivity consultant with training in occupational health and environmental psychology. You analyze workspace images objectively and provide actionable, specific feedback.
When analyzing, always return valid JSON matching this exact schema:
{
"scores": {
"light": <integer 1-10>,
"ergo": <integer 1-10>,
"order": <integer 1-10>,
"cables": <integer 1-10>,
"focus": <integer 1-10>,
"overall": <float 1-10>
},
"recs": [
{
"dim": "<light|ergo|order|cables|focus>",
"tag": "<great|ok|poor|info>",
"title": "<short title, max 40 chars>",
"detail": "<specific actionable description, max 120 chars>"
}
],
"spokenFeedback": "<2-3 sentence natural language summary for text-to-speech, max 200 chars>"
}
Scoring guide:
- light: Natural light quality, glare control, color temperature suitability for work
- ergo: Monitor at eye level, keyboard/mouse position, visible chair lumbar support
- order: Desk surface clutter (10=perfectly clear, 1=extremely cluttered)
- cables: Cable management quality (10=all hidden/routed, 1=tangled mess visible)
- focus: Visual complexity / distraction level (10=minimal distractions, 1=visually chaotic)
Be specific about what you see. Reference the actual position of objects. Do not give generic advice — tie feedback to what is visible in the image.
Skill implementation notes (skill.js)
The skill runner is a standard OpenClaw Node.js skill. Key behaviors:
- Image capture timeout: 8 seconds. If the camera does not respond within 8 seconds, returns
{ error: "Camera capture timed out" }. - GPT-4 Vision timeout: 45 seconds. Uses
gpt-4omodel withmax_tokens: 800. - Temperature: 0.2 for consistent structured scoring.
- Retry: One automatic retry on GPT timeout with a 5-second backoff.
- Image quality: JPEG quality 85, max 512px on longest edge. Keeps token cost reasonable (~250-400 image tokens per audit).
- Cost estimate: Each audit uses roughly 500-700 tokens total (~$0.002 at
gpt-4opricing). History is not sent — only the current frame.
Camera positioning tips
AmbientIQ works best when:
- The camera has a clear view of the entire desk surface (not just the monitor)
- The camera is positioned slightly above and to the side of the workspace (like a ring light mount or monitor-top webcam)
- The room lighting is on — very dark images produce less reliable scores
- For the ergonomics audit specifically, the camera should be able to see the monitor height relative to the desk
If you only have a front-facing monitor camera, the lighting and cable audits will be more accurate than the ergonomics audit (which benefits from a side-profile view).
Permissions required
| Permission | Reason |
|---|---|
| Camera access | Capture workspace image for analysis |
| Internet (HTTPS) | Send image to OpenAI GPT-4 Vision API |
Read openclaw:cmd storage key |
Receive command from R1 |
Write openclaw:resp storage key |
Return analysis results to R1 |
No images are stored locally after analysis. The captured frame is held in memory, encoded to base64, sent to OpenAI, and then discarded.
Troubleshooting
"Camera capture timed out"
- Verify your camera index:
python3 -c "import cv2; print(cv2.VideoCapture(0).read()[0])" - Try
AMBIQ_CAMERA_INDEX=1if 0 is the wrong device - Alternatively, set
AMBIQ_SCREENSHOT_MODE=1to use screen capture instead
"No analysis returned" / timeout after 60 seconds
- Confirm OpenClaw is running:
openclaw status - Confirm skill is installed:
openclaw skills list - Test your OpenAI key:
curl https://api.openai.com/v1/models -H "Authorization: Bearer $OPENAI_API_KEY" - Check that your key has access to
gpt-4o(not justgpt-3.5-turbo)
Scores seem inaccurate
- Ensure the camera can clearly see the full workspace (not just a partial view)
- Good lighting in the room helps — the model can't analyze what it can't see
- The ergonomics score is most accurate with a side-angle view of the workstation
On Windows, screencapture doesn't work
- Set
AMBIQ_CAPTURE_CMDto a PowerShell snippet that saves a JPEG:
Or use a simpler third-party screenshot tool likeAMBIQ_CAPTURE_CMD=powershell -Command "Add-Type -AssemblyName System.Drawing; $bmp = [System.Drawing.Bitmap]::new([System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width, [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height); $g = [System.Drawing.Graphics]::FromImage($bmp); $g.CopyFromScreen(0,0,0,0,$bmp.Size); $ms = New-Object System.IO.MemoryStream; $bmp.Save($ms, [System.Drawing.Imaging.ImageFormat]::Jpeg); [Console]::OpenStandardOutput().Write($ms.ToArray(), 0, $ms.Length)"nircmd:AMBIQ_CAPTURE_CMD=nircmd.exe savescreenshot stdout jpg
GPT response doesn't parse as JSON
- The model occasionally wraps JSON in markdown code fences. The skill strips these automatically.
- If the issue persists, check
openclaw logs ambient-iqfor the raw GPT response.
04 同仓库更多 Skills
whisper-quiz
WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.
walk-cast
Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters / Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).
voice-novel
Local machine skill for VoiceNovel — handles story export to disk.
voice-guide
Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people/vehicles/food/hazards/exits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.
voice-draft
Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.
voice-commit
Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git/CI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.