360 Secure SkillHub
360 安全技能中心

Camsnap

该 Skill 提供摄像头快照工具 camsnap:可通过命令行或 take_snapshot() 模块接口,按指定摄像头索引拍摄一帧画面并保存到输出目录,包含路径校验、扩展名校验和摄像头资源释放;依赖 Python3 与 opencv-python。

分类:自动化
terrycarter1985
terrycarter1985
热度 21.97
最近更新 2026-05-12 06:56:46

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add terrycarter1985/camsnap-snap
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
camsnap
description
Take webcam snapshots with path validation, safe resource handling, and flexible output options.
metadata
{"openclaw":{"requires":{"commands":["python3"],"pypi":["opencv-python"]}}}

Camsnap

Camera snapshot utility for AI agents.

Features

  • Safe webcam capture with guaranteed resource release
  • Path traversal protection and extension validation
  • Configurable camera index and output directory
  • Structured logging (no print statements)
  • Type-annotated API

Usage

python3 camsnap.py
python3 camsnap.py --output-dir ./photos
python3 camsnap.py snapshot.png --camera 1

As a module

from camsnap import take_snapshot

path = take_snapshot(output_dir="snapshots", camera_index=0)