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 devjourney/unifi-mcp. It costs 224 tokens per session (5,246 once invoked), scanned A, a copy of myco:runtime-bootstrap-and-test-isolation, MIT.

Um conjunto de regras para inicialização, testes e descoberta de ferramentas no servidor MCP do projeto UniFi. Ele descreve uma arquitetura de carregamento sob demanda, na qual as ferramentas completas ficam disponíveis quando são necessárias.

In plain words
What is it for?
Serve para adicionar gerenciadores ou categorias de ferramentas, escrever e depurar testes, investigar falhas de visibilidade e manter o sistema de descoberta de ferramentas.
Why use it?
Evita problemas como ferramentas invisíveis, instâncias compartilhadas ausentes, testes que interferem entre si e inicialização lenta. Também orienta em qual camada cada alteração deve ser feita.

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 devjourney/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 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.

Copy the file
curl -O https://raw.githubusercontent.com/devjourney/unifi-mcp/main/.agents/skills/runtime-bootstrap-and-test-isolation/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/devjourney/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/devjourney/unifi-mcp/runtime-bootstrap-and-test-isolation.svg)](https://agentmods.dev/skills/devjourney/unifi-mcp/runtime-bootstrap-and-test-isolation)
Your own site
<a href="https://agentmods.dev/skills/devjourney/unifi-mcp/runtime-bootstrap-and-test-isolation"><img src="https://agentmods.dev/badge/skills/devjourney/unifi-mcp/runtime-bootstrap-and-test-isolation.svg" alt="Measured on agentmods" 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,246 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.
Origin 100% copy Near-identical to another mod 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.05246
Opus 5 $0.00112 $0.02623
Sonnet 5 $0.00045 $0.01049
Haiku 4.5 $0.00022 $0.00525

Measured 7d ago against content hash c06907c33946, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 7d 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

This is a copy

100% identical to myco:runtime-bootstrap-and-test-isolation — 22 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.

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

How it starts

The opening of the file, as written. The whole thing — 318 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 · 318 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. 7d ago First seen · 318 lines · 224 tokens per session scan A c06907c33946

Subscribe to this mod's changes

myco:runtime-bootstrap-and-test-isolation is a skill published in the GitHub repository devjourney/unifi-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 224 tokens to every session and 5,246 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:runtime-bootstrap-and-test-isolation, differing in 22 lines, and is treated as a copy.