agents/skills/amcrest-camera/SKILL.md
Access and control the Amcrest IP camera at 10.0.0.221 via the Amcrest/Dahua HTTP API. Use when the user wants snapshots, device info, config reads/writes, streams, or PTZ-style camera control for an Amcrest camera.
npx skillsauth add jason0x43/dotfiles amcrest-cameraInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/Users/jason/Downloads/HTTP_API_V3.26.pdf/cgi-bin/*.cgiexport CAMERA_HOST=10.0.0.221
export CAMERA_USER='...'
export CAMERA_PASS='...'
<skill>/scripts; they already use digest auth and basic timeouts.curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/magicBox.cgi?action=getDeviceType"
channel values usually start at 10getConfig/setConfig use key=value query params/cgi-bin/api/... endpoints use JSON request bodiesset... operations often return plain OKUse the helper scripts in <skill>/scripts before hand-writing curl commands when they fit the task.
<skill>/scripts/get_camera_info.shFetches common identification and status endpoints.
export CAMERA_HOST=10.0.0.221
export CAMERA_USER='...'
export CAMERA_PASS='...'
<skill>/scripts/get_camera_info.sh
<skill>/scripts/take_snapshot.shCaptures a JPEG snapshot and prints the output path.
export CAMERA_HOST=10.0.0.221
export CAMERA_USER='...'
export CAMERA_PASS='...'
<skill>/scripts/take_snapshot.sh
<skill>/scripts/take_snapshot.sh latest.jpg
Optional env:
CHANNEL default 1TYPE default 0If the user asks to see the image, display the saved file with show_image.
<skill>/scripts/ptz_move.shUse for PTZ-capable cameras only.
Common PTZ codes for start/stop include:
UpDownLeftRightLeftUpRightUpLeftDownRightDownZoomTeleZoomWideFocusNearFocusFarexport CAMERA_HOST=10.0.0.221
export CAMERA_USER='...'
export CAMERA_PASS='...'
<skill>/scripts/ptz_move.sh status
<skill>/scripts/ptz_move.sh start Up
<skill>/scripts/ptz_move.sh stop Up
<skill>/scripts/ptz_move.sh relative 0.1 0.1 0
<skill>/scripts/ptz_move.sh absolute -0.8 0.3 0.5
Optional env:
CHANNEL default 1Prefer:
<skill>/scripts/get_camera_info.sh
Or call individual endpoints:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/magicBox.cgi?action=getDeviceType"
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/magicBox.cgi?action=getSystemInfoNew"
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/magicBox.cgi?action=getSerialNo"
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/global.cgi?action=getCurrentTime"
URL-encode the space as %20:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/global.cgi?action=setCurrentTime&time=2026-05-17%2021:00:00"
Prefer:
<skill>/scripts/take_snapshot.sh
<skill>/scripts/take_snapshot.sh snapshot.jpg
Or call the endpoint directly:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" -o snapshot.jpg "http://$CAMERA_HOST/cgi-bin/snapshot.cgi?channel=1&type=0"
If the user asks to see the image, display the saved file with show_image.
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/configManager.cgi?action=getConfig&name=General"
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/configManager.cgi?action=getConfig&name=Encode"
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget"
Be conservative. Read config first, then change only the needed keys.
Example:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/configManager.cgi?action=setConfig&General.MachineName=FrontDoorCam"
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/mjpg/video.cgi?channel=1&subtype=0"
Some streaming workflows use a token endpoint with JSON:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" \
-H 'Content-Type: application/json' \
-d '{"Channel":0}' \
"http://$CAMERA_HOST/cgi-bin/api/TokenManager/createToken"
Only use PTZ endpoints if the device supports PTZ.
Prefer:
<skill>/scripts/ptz_move.sh status
<skill>/scripts/ptz_move.sh start Up
<skill>/scripts/ptz_move.sh stop Up
<skill>/scripts/ptz_move.sh relative 0.1 0.1 0.0
<skill>/scripts/ptz_move.sh absolute -0.8 0.3 0.5
Or call the endpoints directly.
Start moving up:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/ptz.cgi?action=start&channel=1&code=Up&arg1=0&arg2=1&arg3=0"
Stop moving up:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/ptz.cgi?action=stop&channel=1&code=Up&arg1=0&arg2=0&arg3=0"
Relative move:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/ptz.cgi?action=moveRelatively&channel=1&arg1=0.1&arg2=0.1&arg3=0.0"
Absolute move:
curl --digest -u "$CAMERA_USER:$CAMERA_PASS" "http://$CAMERA_HOST/cgi-bin/ptz.cgi?action=moveAbsolutely&channel=1&arg1=-0.8&arg2=0.3&arg3=0.5"
magicBox.cgi?action=getDeviceTypemagicBox.cgi?action=getSystemInfoNewglobal.cgi?action=getCurrentTimeconfigManager.cgi?action=getConfig&name=...Convert the PDF to text and search it:
pdftotext /Users/jason/Downloads/HTTP_API_V3.26.pdf /tmp/amcrest-api.txt
rg -n "snapshot|configManager|magicBox|ptz|global.cgi|TokenManager" /tmp/amcrest-api.txt
Useful documented endpoints from this PDF include:
/cgi-bin/snapshot.cgi/cgi-bin/magicBox.cgi?action=getDeviceType/cgi-bin/magicBox.cgi?action=getSystemInfoNew/cgi-bin/global.cgi?action=getCurrentTime/cgi-bin/global.cgi?action=setCurrentTime/cgi-bin/configManager.cgi?action=getConfig/cgi-bin/configManager.cgi?action=setConfig/cgi-bin/mjpg/video.cgi/cgi-bin/api/TokenManager/createToken/cgi-bin/ptz.cgi401 Unauthorized: digest challenge / bad auth setup403 Forbidden: authenticated but not allowed, or wrong credentials after challenge404 Not Found: endpoint unsupported on this model/firmware500 Internal Server Error: request shape accepted but device failed to execute itWhen an endpoint fails, verify:
10.0.0.221channel=1 is appropriatetools
Instructions for interacting with a Mist robot; use when the user asks to interact with a Mistry robot.
tools
Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage. Use when cleaning up a SwiftUI view, splitting long bodies, removing inline actions or side effects, reducing computed `some View` helpers, or standardizing `@Observable` and view model initialization patterns.
development
Best practices and example-driven guidance for building SwiftUI views and components, including navigation hierarchies, custom view modifiers, and responsive layouts with stacks and grids. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens with VStack/HStack, managing @State or @Binding, building declarative iOS interfaces, or needing component-specific patterns and examples.
development
Audit and improve SwiftUI runtime performance from code review and architecture. Use for requests to diagnose slow rendering, janky scrolling, high CPU/memory usage, excessive view updates, or layout thrash in SwiftUI apps, and to provide guidance for user-run Instruments profiling when code review alone is insufficient.