360 Secure SkillHub
360 安全技能中心

CamSnap

CamSnap 通过 camsnap 命令提供摄像头快照捕获、摄像头列表、快照差异比较、持续监视与变化阈值检测,并可用 on-change 命令触发通知;支持多摄像头 YAML 配置和 JSON 输出。

terrycarter1985
terrycarter1985
热度 46.04
最近更新 2026-08-01 07:35:02
分类:自动化依赖:代码执行 / 读写文件应用场景:自动化脚本 / 工作流 / 数据处理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add terrycarter1985/camsnap
Metadata
name
camsnap
description
Camera snapshot and monitoring skill for OpenClaw — capture, compare, and manage camera snapshots with automated detection and alerts
metadata
{"clawdbot":{"emoji":"📷","requires":{"commands":["camsnap"]}}}
version
0.1.1

CamSnap — Camera Snapshot & Monitoring

Capture snapshots from connected cameras, detect changes between frames, and trigger alerts when motion or scene changes are detected.

Quick Start

# Capture a snapshot from the default camera
camsnap capture

# Capture from a specific camera
camsnap capture --camera front-door

# List available cameras
camsnap list

# Compare two snapshots
camsnap diff snapshot1.jpg snapshot2.jpg

# Watch mode — continuous monitoring with change detection
camsnap watch --interval 30 --threshold 0.05

Commands

Capture

camsnap capture [--camera <name>] [--output <path>] [--quality <1-100>]

List Cameras

camsnap list [--json]

Diff / Compare

camsnap diff <image-a> <image-b> [--threshold <float>] [--json]

Watch Mode

camsnap watch [--camera <name>] [--interval <seconds>] [--threshold <float>]
              [--on-change <command>] [--output-dir <path>]

History

camsnap history [--camera <name>] [--limit <n>] [--since <duration>]

Configuration

Configuration lives in ~/.config/camsnap/config.yaml:

cameras:
  default:
    device: /dev/video0
    resolution: 1920x1080
  front-door:
    device: /dev/video1
    resolution: 1280x720

watch:
  interval: 30
  threshold: 0.05
  output_dir: ~/.local/share/camsnap/snapshots
  on_change: null  # e.g. "notify-send 'CamSnap' 'Change detected'"

Output Format

camsnap capture --json

{
  "success": true,
  "data": {
    "path": "/home/user/.local/share/camsnap/snapshots/2026-08-01T03-45-00.jpg",
    "camera": "default",
    "resolution": "1920x1080",
    "size_bytes": 245760,
    "timestamp": "2026-08-01T03:45:00Z"
  }
}

camsnap diff --json

{
  "success": true,
  "data": {
    "diff_score": 0.12,
    "changed": true,
    "threshold": 0.05,
    "regions": [
      {"x": 120, "y": 80, "w": 200, "h": 300, "score": 0.34}
    ]
  }
}

Best Practices

  1. Use watch mode with --on-change to trigger alerts or webhooks
  2. Set appropriate thresholds — too low = false positives, too high = missed events
  3. Archive snapshots to object storage for long-term retention
  4. Use named cameras for multi-camera setups
  5. Rotate old snapshots with camsnap history --prune --older-than 30d

Installation

npm install -g camsnap
# or from source
cargo install camsnap

License

MIT