uiprotect AGENTS.md

uiprotect AGENTS.md is an instructions file for Codex, OpenCode from uilibs/uiprotect. It costs 6,170 tokens per session, scanned A, original, MIT.

A contributor guide for uiprotect, an unofficial Python client and command-line tool for UniFi Protect security cameras and recorders. It explains the project, its code layout, and its changing server protocol.

In plain words
What is it for?
Orienting contributors, finding important files, understanding the UniFi Protect API and live update stream, and following project-specific development practices.
Why use it?
It gives coding agents the project context needed before changing code. It highlights compatibility concerns caused by firmware changes and the lack of an official protocol owner.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/uilibs/uiprotect/agents-md
Clone the repo
git clone --depth 1 https://github.com/uilibs/uiprotect

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for uiprotect AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/uilibs/uiprotect/agents-md.svg)](https://agentmods.dev/instructions/uilibs/uiprotect/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/uilibs/uiprotect/agents-md"><img src="https://agentmods.dev/badge/instructions/uilibs/uiprotect/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 6,170 This file is loaded in full into every session.
When invoked 6,170 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.06170 $0.06170
Opus 5 $0.03085 $0.03085
Sonnet 5 $0.01234 $0.01234
Haiku 4.5 $0.00617 $0.00617

Measured 4d ago against content hash 186ec49e3321, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

uiprotect AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 460 lines

How it starts

The opening of the file, as written. The whole thing — 460 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Notes for LLM contributors

A short orientation file for an LLM working in this repo. Skim before making changes; keep edits consistent with what's described here. Read README.md for the user-facing intro and CONTRIBUTING.md for the human-facing contributor guide.

What this project is

uiprotect is an unofficial async Python client + CLI for the UniFi Protect surveillance NVR. It is the library that the Home Assistant unifiprotect integration is built on top of, and it is the de-facto Python binding for talking to a UniFi Protect console — Ubiquiti does not publish an official one. Public API is exported from the top-level uiprotect package; the main entry point is uiprotect.ProtectApiClient in src/uiprotect/api.py.

There is no upstream protocol owner. The wire format is whatever the UniFi Protect server in front of you serves: a partially documented REST API plus a binary WebSocket update stream. Both shift across firmware releases, and the test corpus under tests/sample_data/ is the closest thing to a reference. Behaviour changes that depend on a specific Protect firmware version should say so in the commit message.

The project was forked from pyunifiprotect after that project relicensed away from MIT; staying MIT-licensed is a hard requirement so the Home Assistant core integration can keep depending on it.

Code style

  • Docstrings: terse, default to single-line. A docstring is the function's contract, not its narrative. Almost every docstring should be one line — """Summary.""" — describing what the function does and what the caller can pass. Multi-line is the exception, only justified when there is non-obvious caller-visible behaviour the type signature and parameter names don't already convey. Ruff is configured with most of the D family disabled (D100D107, D2xx, D4xx) precisely so that missing docstrings on internal helpers don't flag — only add one when it earns its keep.

Read the full file on GitHub · 460 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 460 lines · 6,170 tokens per session scan A 186ec49e3321

Subscribe to this mod's changes

uiprotect AGENTS.md is an instructions file published in the GitHub repository uilibs/uiprotect (101 stars, last pushed 5d ago), licensed MIT. It adds 6,170 tokens to every session, about $0.0309 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

pypylon AGENTS.md

Instructions for basler/pypylon, covering agents.md, repository map, environment, common commands and or, to (re)build in place after changing bindings.

basler/pypylon · 1,195 tokens

aiohomematic CLAUDE.md

Instructions for SukramJ/aiohomematic, covering claude.md - ai assistant guide for aiohomematic, ⚠️ critical: cuxd/ccu-jack special handling, what makes cuxd/ccu-jack different, key constants to check and in aiohomematic/const.py.

SukramJ/aiohomematic · 7,351 tokens

aiohomematic copilot-instructions.md

Instructions for SukramJ/aiohomematic, covering github copilot instructions for aiohomematic, project overview, mandatory code standards, required import and type annotations.

SukramJ/aiohomematic · 1,062 tokens

CubismExternalEditMCP CLAUDE.md

Instructions for nana7chi/CubismExternalEditMCP, covering claude.md, 构建 / 运行 / 测试, 安装开发依赖(在项目根目录), 语法检查 and 导入检查.

nana7chi/CubismExternalEditMCP · 2,150 tokens

kvm-pilot CLAUDE.md

Instructions for DustinTrap/kvm-pilot, covering claude.md, what this is, non-negotiable conventions, engineering principles (how to make changes) and layout.

DustinTrap/kvm-pilot · 2,625 tokens

CarolinaCodeConferenceBadge2026 AGENTS.md

Instructions for circuitboardmedics/CarolinaCodeConferenceBadge2026, covering agents.md — circuitpython drive guidance, what this directory is, execution model, hardware — esp32-s3-wroom-1-n8 and display — hs180s10b (st7735s, 160×128, 1.77 inch).

circuitboardmedics/CarolinaCodeConferenceBadge2026 · 1,426 tokens