Ptz docs

From damionrashford/media-os · View interactive version

Ptz docs is an AI agent skill from the GitHub repository damionrashford/media-os. Search and fetch docs for PTZ camera control protocols: Sony VISCA (Command List v2.00, BRC-H900, SRG-300H, PTZOptics VISCA over IP) — byte-level serial or UDP:52381 with payload-wrapped VISCA, and ONVIF (onvif.org profiles — S streaming deprecated, T successor with H.264/H.265/metadata, G on-device

How to use this skill

Skill file

PTZ Docs

Context: $ARGUMENTS

Anti-hallucination guardrail for PTZ protocol work. Fetches and searches the canonical Sony VISCA PDFs and the onvif.org profile pages. Pair with ptz-visca (wire protocol) and ptz-onvif (SOAP control) for actual camera operations.

Quick start

When to use

Step 1 — Know the page catalog

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py list-pages

| Page | What it is |

|---|---|

| visca-v2 | Sony VISCA Command List v2.00 (interchangeable lens) PDF |

| visca-brc-h900 | Sony BRC-H900 VISCA reference PDF |

| visca-srg-300h | Sony SRG-300H VISCA-over-IP PDF (AES6 manual) |

| visca-ptzoptics | PTZOptics community VISCA-over-IP reference PDF |

| onvif-profiles | onvif.org Profiles hub (all profiles overview) |

| onvif-specifications | onvif.org Profile Specifications index |

| onvif-profile-overview | Profile feature overview PDF (v2.1) |

| onvif-profile-s | Profile S (streaming — deprecated 2027-03-31) |

Only the HTML pages are text-searchable. PDF pages return a URL + note (PDF bytes aren't parsed).

Step 2 — Search first

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py search --query "Pan Tilt" --limit 5

Scope to a single page when you know which one:

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py search --query "GetProfiles" --page onvif-profile-s

Output per hit:

--- <page>:<line> — <nearest heading>
<URL with #anchor>
<snippet ±3 lines>

Use --format json for structured output.

Step 3 — Read one section

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py section --page onvif-profiles --id profile-s

--id accepts an anchor id (from [§...] in search hits) or a heading keyword.

Step 4 — Fetch whole page

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py fetch --page onvif-profile-s

Step 5 — Pre-cache

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py index

Override cache via PTZ_DOCS_CACHE=/path. Clear: clear-cache.

Gotchas

Examples

Example 1 — "What's the VISCA byte sequence for Pan-Tilt Drive?"

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py search --query "Pan.Tilt" --regex --limit 5

Then open the PDF URL printed in the hit for the exact byte table.

Example 2 — "Does Profile T include metadata streaming?"

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py search --query "metadata" --page onvif-profile-overview

Example 3 — "Which PTZ subcommand is preset recall?"

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py search --query "preset recall"

Example 4 — "Profile S specification URL for citation"

uv run ${CLAUDE_SKILL_DIR}/scripts/ptzdocs.py list-pages | grep profile-s

Reference docs

Troubleshooting

Error: `unknown page: foo`

Cause: Not in catalog.

Solution: Run list-pages.

PDF page returns "binary page — URL only"

Cause: The skill doesn't parse PDFs (stdlib only).

Solution: Open the printed URL in a browser/Preview/Acrobat, or search references/visca-commands.md which has the curated byte table.

Search returns zero hits on ONVIF pages

Cause: ONVIF marketing pages are light on technical detail.

Solution: Drop the --page filter to search across all pages, or try onvif-profile-overview (the v2.1 PDF summary link).

Cache stale after upstream edits

Solution: clear-cache then index, or fetch --no-cache --page <name>.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.