Borrowing it
Nothing to install: this file belongs to devjourney/unifi-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/devjourney/unifi-mcp/main/.agents/skills/api-endpoint-serializer-authoring/SKILL.mdgit clone --depth 1 https://github.com/devjourney/unifi-mcpWrote 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.
[](https://agentmods.dev/skills/devjourney/unifi-mcp/api-endpoint-serializer-authoring)<a href="https://agentmods.dev/skills/devjourney/unifi-mcp/api-endpoint-serializer-authoring"><img src="https://agentmods.dev/badge/skills/devjourney/unifi-mcp/api-endpoint-serializer-authoring/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/devjourney/unifi-mcp/api-endpoint-serializer-authoring"><img src="https://agentmods.dev/badge/skills/devjourney/unifi-mcp/api-endpoint-serializer-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00219 | $0.02158 |
| Opus 5 | $0.00110 | $0.01079 |
| Sonnet 5 | $0.00044 | $0.00432 |
| Haiku 4.5 | $0.00022 | $0.00216 |
Grade A, and why
myco:api-endpoint-serializer-authoring 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 8d 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.
This is a copy
100% identical to myco:api-endpoint-serializer-authoring — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 243 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Endpoint and Serializer Authoring (apps/api)
A. Adding a Resource or Action Endpoint
1. Classify the endpoint type
- Resource endpoint (
GET /v1/sites/{id}/cameras): implies the resource exists; return HTTP 409 when the required product is absent. - Action endpoint: advisory; always return HTTP 200 with a
capability_not_availableenvelope when the capability is missing — never 404 or 409 for action endpoints.
2. Wire cursor-based pagination
Use Cursor and paginate() from
apps/api/src/unifi_api/services/pagination.py:
from unifi_api.services.pagination import Cursor, InvalidCursor, paginate
cursor = Cursor.decode(cursor_str) if cursor_str else None
page, next_cursor = paginate(items, cursor=cursor, limit=limit, key_fn=key_fn)
- Cursor encodes
{last_id, last_ts}as Base64 — survives new inserts; offset/page-number pagination does not. - Default limit 50, max 200. Expose
cursoras an opaque query-string param.
3. Apply the dependency rule
apps/api/ MUST only import from unifi-core. Never import unifi-mcp-shared
inside apps/api/ — it couples the REST server to MCP protocol concerns.
4. Wire ManagerFactory
ManagerFactory lives in apps/api/src/unifi_api/services/managers.py. It
caches one manager per (controller_id, product) pair behind asyncio locks:
manager = await factory.get_connection_manager(session, controller_id, product)
product_kindsin the DB row is a comma-separated string. The factory splits it and raisesUnknownProductif the product isn't listed — so setproduct_kindsaccurately when registering a controller.- Each concurrency scope (request) shares the cached manager instance; no per-request teardown.
B. Phase 5A Advanced Routing Patterns
Capability-aware dispatch
When two products expose identically-named endpoint families (e.g., both
Network and Protect expose /events), dispatch at request time by consulting
controller.product_kinds. Route to the correct manager based on which
products are active — avoids collisions without duplicate routes.
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.
- 8d ago First seen · 243 lines · 219 tokens per session scan A 49a54b91ab72
myco:api-endpoint-serializer-authoring is a skill published in the GitHub repository devjourney/unifi-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 219 tokens to every session and 2,158 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to myco:api-endpoint-serializer-authoring, differing in 3 lines, and is treated as a copy.
Other skills, from other repositories
express-docs
Comprehensive Express.js reference covering getting started, routing, middleware, error handling, the Application/Request/Response/Router API objects, template engines, debugging, database integration, security, performance, production patterns, and migration guides. Use whenever the user mentions Express, Express.js…
api
FastAPI + async/sync HTTP client patterns, JWT auth, multi-provider routing, Pydantic request/response models, CORS, background tasks, and typed frontend API clients — synthesized from lead-gen-engine and seo-geo-aeo-engine.
api-design-principles
Master REST API design principles to build intuitive, scalable, and maintainable APIs. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
api-design
Design and implement RESTful APIs with proper routing, validation, error handling, and documentation. Use when building new API endpoints, designing API architecture, or improving existing APIs.
api-docs-generator
Generate API documentation from code - produce OpenAPI/Swagger specs, Markdown API references, request/response examples, and interactive documentation from source code analysis.
api-rate-limit-handler
Implement bounded, idempotency-aware API throttling, backoff, and retry handling for 429 and transient 5xx responses.