Borrowing it
Nothing to install: this file belongs to sirkirby/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/sirkirby/unifi-mcp/main/.agents/skills/api-endpoint-serializer-authoring/SKILL.mdgit clone --depth 1 https://github.com/sirkirby/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/sirkirby/unifi-mcp/api-endpoint-serializer-authoring)<a href="https://agentmods.dev/skills/sirkirby/unifi-mcp/api-endpoint-serializer-authoring"><img src="https://agentmods.dev/badge/skills/sirkirby/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/sirkirby/unifi-mcp/api-endpoint-serializer-authoring"><img src="https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/api-endpoint-serializer-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.5 | $0.00088 | $0.00863 |
| Sonnet 5.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 1mo 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- myco:api-endpoint-serializer-authoring — 100% identical, 3 lines differ
How it starts
The opening of the file, as written. The whole thing — 246 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.
- 1mo ago First seen · 246 lines · 219 tokens per session scan A 842d44e7d0f3
myco:api-endpoint-serializer-authoring is a skill published in the GitHub repository sirkirby/unifi-mcp (955 stars, last pushed yesterday), licensed MIT. It adds 219 tokens to every session and 2,158 once invoked, about $0.0009 per session on Opus 5.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.
Other skills, from other repositories
pipefy-api-fallback
Use this skill when a toolkit operation fails AND the introspection skill could not resolve the problem. This is the last-resort fallback (Tier 3): call the Pipefy GraphQL API directly using curl or httpx, authenticating with the Service Account (OAuth2) or a Personal Access Token (PAT) available as env var. Follow…
gitlab-api-development
Develop, test, gate, and release the GitLab REST and GraphQL connector. Use this skill when changing API mappings, governed MCP tools, authentication, tenant selection, KG ingestion, packaged content, or repository gates.
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…
webhooks
Webhook subscriptions for the Ayrshare MCP server: register, unregister, and list HTTPS push notifications so an agent or app is notified on events instead of polling. Use whenever someone wants event push: "notify me when a post publishes", "let me know when a scheduled post goes out", "set up a webhook for new…
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-docs-generator
Generate API documentation from code - produce OpenAPI/Swagger specs, Markdown API references, request/response examples, and interactive documentation from source code analysis.