360 Secure SkillHub
360 安全技能中心

camsnap

通过 Python 脚本调用默认摄像头拍摄快照,可指定输出路径、预览或输出目录;未指定时保存到 snapshots 目录,并返回文件路径。

分类:自动化
terrycarter1985
terrycarter1985
热度 24.90
最近更新 2026-05-12 06:48:23

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add terrycarter1985/camsnap-terry
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
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]
version
1.0.0

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

Usage

python {{SKILL_DIR}}/camsnap.py [output_path] [--preview] [--output-dir DIR]
  • output_path — optional path to save the snapshot (must be within cwd; extensions: .jpg/.jpeg/.png/.bmp/.webp)
  • --preview — show a preview window (GUI environments only)
  • --output-dir — directory for auto-generated filenames (default: snapshots)

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

Steps

  1. Run the snapshot script:
python {{SKILL_DIR}}/camsnap.py {{ $ARGUMENTS }}
  1. Confirm the snapshot was saved successfully and return the file path.

Security

  • Output paths are validated to stay within the working directory (no path traversal).
  • Only safe image extensions are accepted.