unifi-mcp: Skill for Claude Code

.agents/skills/extend-unifi-api/SKILL.md

myco:extend-unifi-api is a skill for Claude Code from sirkirby/unifi-mcp. It costs 197 tokens per session (8,330 once invoked), scanned A, original, MIT.

A development guide for adding a new UniFi resource type across the project. UniFi is a product family for managing networks, security cameras, and access systems; a resource type is one kind of item, such as a DNS record.

In plain words
What is it for?
Use it to add UniFi resource support end to end, including create/read/update/delete operations, API exposure, models, tests, and action handling.
Why use it?
It helps prevent incomplete integrations where the manager, tools, data models, API, or tests do not agree.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is sirkirby/unifi-mcp's own configuration. It tells Claude Code how to work on unifi-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unifi-mcp configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/sirkirby/unifi-mcp/main/.agents/skills/extend-unifi-api/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sirkirby/unifi-mcp

Made for: Claude Code.

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 myco:extend-unifi-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/extend-unifi-api/github.svg)](https://agentmods.dev/skills/sirkirby/unifi-mcp/extend-unifi-api)
Your own site
<a href="https://agentmods.dev/skills/sirkirby/unifi-mcp/extend-unifi-api"><img src="https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/extend-unifi-api/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.

agentmods 80×15 button for myco:extend-unifi-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/sirkirby/unifi-mcp/extend-unifi-api"><img src="https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/extend-unifi-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 197 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,330 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00197 $0.08330
Opus 5 $0.00098 $0.04165
Sonnet 5 $0.00039 $0.01666
Haiku 4.5 $0.00020 $0.00833

Measured 5d ago against content hash dcf76970f5bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

myco:extend-unifi-api 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 5d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/extend-unifi-api/SKILL.md · 557 lines

How it starts

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

Implementing New UniFi Resource Types End-to-End

This unified skill covers the complete flow for adding a new UniFi resource type from manager implementation through API exposure. Both manager/tool layer (apps/{package}/) and API layer (apps/api/) must be implemented together for a complete resource.

Prerequisites

  • Understand which package owns the resource (network, protect, access).
  • Know whether the resource's GET-by-ID endpoint returns 405 (Step 2A).
  • Have a live controller available for validation output in PR description.
  • Dependency rule: apps/api/ may only import from unifi-core, never unifi-mcp-shared.
  • V2 API identifier hazard: Understand the difference between UniFi V2 ObjectID (_id) and Integration UUID semantics before implementing cross-controller queries.

Part 1: Manager/Tool Layer (apps/{package}/)

Step 1 — Create Manager Class

File: packages/unifi-core/src/unifi_core/<server>/managers/{resource}_manager.py

Reference packages/unifi-core/src/unifi_core/network/managers/dns_manager.py as the golden pattern. Key naming conventions: method names use the full resource name (e.g., list_dns_records, get_dns_record, create_dns_record). The class constructor takes a ConnectionManager directly — not a raw HTTP client. The @lru_cache factory function lives in the app's runtime module and takes no arguments:

from functools import lru_cache
from unifi_core.network.managers.dns_manager import DnsManager


@lru_cache
def get_dns_manager() -> DnsManager:
    return DnsManager(get_connection_manager())

Step 2 — Check for 405 Endpoints and V2 Response Shapes

2A: 405 resources (DNS, AP groups, ACL rules, filtering rules) implement get_{resource} via list-and-filter rather than a direct GET-by-ID HTTP call:

async def get_dns_record(self, record_id: str) -> dict:
    records = await self.list_dns_records()
    for record in records:
        if record.get("_id") == record_id:
            return record
    raise UniFiNotFoundError(...)

Read the full file on GitHub · 557 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. 5d ago Changed · +10 lines dcf76970f5bf
  2. 12d ago First seen · 547 lines · 197 tokens per session scan A 72ed588acadb

Subscribe to this mod's changes

myco:extend-unifi-api is a skill published in the GitHub repository sirkirby/unifi-mcp (809 stars, last pushed yesterday), licensed MIT. It adds 197 tokens to every session and 8,330 once invoked, about $0.0010 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 skills, from other repositories

n8n-code-tool

Write JavaScript or Python for the n8n Custom Code Tool (@n8n/n8n-nodes-langchain.toolCode) — the AI-agent-callable tool, NOT the workflow Code node. Use when building a Code Tool attached to an AI Agent, writing code that an LLM will invoke, parsing the query input, returning a string result, defining an input schema…

czlonkowski/n8n-mcp · 221 tokens

n8n-subworkflows

Build reusable, composable n8n sub-workflows. Use when extracting shared logic, building anything multi-step or reused across workflows, or any workflow over 10 nodes — and whenever the user mentions sub-workflows, Execute Workflow, reuse, shared/common logic, modular workflows, "Define Below" inputs…

czlonkowski/n8n-mcp · 121 tokens

sanity-best-practices

Sanity development best practices for schema design, GROQ queries, TypeGen, Visual Editing, images, Portable Text, Studio structure, localization, migrations, Sanity Functions, webhooks, Blueprints, and framework integrations such as Next.js, Nuxt, Astro, Remix, SvelteKit, Angular, Hydrogen, and the App SDK. Use this…

sanity-io/agent-toolkit · 164 tokens

tech-specs

To define clear, testable tech specs from requirements — target-state architecture, contracts, interfaces.

griddynamics/rosetta · 23 tokens

frontmcp-development

Use when building any FrontMCP server component other than a tool (for tools, use create-tool). Covers @Resource static resources and parameterized URI templates; @Prompt reusable prompts (RAG, multi-turn); @Provider singleton dependency-injection providers (database pools, API clients); @Agent autonomous LLM agents…

agentfront/frontmcp · 196 tokens

pipefy-api-fallback

Use this skill when an MCP tool 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 the 3-tier…

pipefy/ai-toolkit · 86 tokens