unifi-mcp: Skill for Claude Code

.agents/skills/runtime-bootstrap-and-test-isolation/SKILL.md

myco:runtime-bootstrap-and-test-isolation is a skill for Claude Code, Codex from sirkirby/unifi-mcp. It costs 224 tokens per session (5,458 once invoked), scanned A, original, MIT.

A project guide for lazy tool loading, shared runtime setup, test isolation, and tool discovery in a UniFi MCP server. Lazy loading means loading detailed tools only when needed rather than all at startup.

In plain words
What is it for?
Use it when adding managers or tool categories, writing tests, investigating invisible tools, or maintaining the server’s discovery system.
Why use it?
It helps avoid missing tools, broken test state, startup slowdowns, and runtime errors when extending the server.

Skill for Claude CodeCodex

Written for Claude Code and Codex: allowed-tools in frontmatter, but also reads ~/.codex or $CODEX_HOME. Also seen: installed under .agents/ (shared by several agents); mentions Codex; built for openclaw.

This is sirkirby/unifi-mcp's own configuration. It tells Claude Code and Codex 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/runtime-bootstrap-and-test-isolation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sirkirby/unifi-mcp

Made for: Claude Code, Codex.

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:runtime-bootstrap-and-test-isolation

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/sirkirby/unifi-mcp/runtime-bootstrap-and-test-isolation"><img src="https://agentmods.dev/badge/skills/sirkirby/unifi-mcp/runtime-bootstrap-and-test-isolation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 224 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,458 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 192
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • high Anti-Refusal · line 317
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
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.00224 $0.05458
Opus 5 $0.00112 $0.02729
Sonnet 5 $0.00045 $0.01092
Haiku 4.5 $0.00022 $0.00546

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

Security

Grade A, and why

myco:runtime-bootstrap-and-test-isolation 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/runtime-bootstrap-and-test-isolation/SKILL.md · 326 lines

How it starts

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

Runtime Bootstrap, Singleton Management, Test Isolation, and Tool Discovery

The project uses a four-stage lazy-loading architecture that keeps startup token cost near ~200 tokens (meta-tools only) while making the full ~5000-token tool suite available on demand. Understanding the layer boundaries is essential for knowing where to make changes when adding managers, tool categories, or writing tests. The wrong layer means silent failures — missing singletons, invisible tools, or broken test imports. The tool_index meta-tool (Procedure F) is the discovery layer that surfaces those lazily-loaded tools to agents.

Prerequisites

  • Familiarity with the project's runtime.py, main.py, and tools/ directory layout. Each app has its own copy under apps/{app}/src/{package}/ (e.g., apps/network/src/unifi_network_mcp/runtime.py).
  • make manifest available (run from repo root; uv run make manifest if outside the venv)
  • Any new tool category module must be created on disk before regenerating the manifest
  • For Procedure F (tool discovery): two implementation surfaces exist — local server (per-app handler, e.g. apps/access/src/unifi_access_mcp/tool_index.py, plus the shared packages/unifi-mcp-shared/src/unifi_mcp_shared/tool_index.py) and Worker cloud (apps/worker/worker/src/). Both must move together.

Procedure A: Understanding the Bootstrap Sequence and Layer Ownership

Bootstrap follows four stages in strict order:

main.py
  └─► runtime.py          # decorator wiring + @lru_cache singleton factories
        └─► tools/ (lazy) # loaded on first meta-tool execute() call
              └─► managers/ # domain logic only; no MCP awareness

Layer responsibilities:

Layer Owns Does NOT own
main.py Live permission enforcement (stage 3 decorator via setup_permissioned_tool) Business logic, tool registration
runtime.py Decorator pipeline, singleton manager factories Domain logic
tools/ (lazy) Tool definitions, MCP registration Singletons, permissions
managers/ Domain logic, API calls MCP adapter, decorators

Read the full file on GitHub · 326 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 · +2 lines bf6cfacd6042
  2. 12d ago First seen · 324 lines · 224 tokens per session scan A fb0d8fe6b40a

Subscribe to this mod's changes

myco:runtime-bootstrap-and-test-isolation is a skill published in the GitHub repository sirkirby/unifi-mcp (809 stars, last pushed yesterday), licensed MIT. It adds 224 tokens to every session and 5,458 once invoked, about $0.0011 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.