360 Secure SkillHub
360 安全技能中心

terry-camsnap

核心功能:调用camsnap工具从默认摄像头拍摄快照,自动丢弃预热帧避免欠曝,验证输出路径防止遍历。典型场景:用户提出拍照、捕获摄像头图像、拍摄快照需求。输入可指定输出路径、--preview预览(仅支持有显示环境)、--output-dir目录;无路径时默认存至./snapshots/带时间戳文件名。输出为成功保存的文件路径。

terrycarter1985
terrycarter1985
热度 29.20
最近更新 2026-05-11 17:47:22
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add terry-camsnap
Metadata
name
camsnap
description
Take camera snapshots and save them to disk. Use when the user asks to take a photo, capture an image from webcam, or take a snapshot.
allowed-tools
Bash
argument-hint
[output_path] [--preview]

Take a snapshot from the default webcam using the camsnap utility.

Usage

/camsnap [output_path] [--preview] [--output-dir DIR]

If no output path is provided, the snapshot will be saved to the ./snapshots/ directory with a timestamp filename.

Steps

  1. Run the snapshot script:
python3 ~/.openclaw/workspace/src/camsnap.py {{ $ARGUMENTS }}
  1. Confirm the snapshot was saved successfully and return the file path.

Notes

  • The script discards the first few warm-up frames to avoid underexposed captures.
  • Output paths are validated against path-traversal; only allowed directories are writable.
  • Use --preview only in environments with a display (headless servers will fail).