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/runtime-bootstrap-and-test-isolation/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/runtime-bootstrap-and-test-isolation)<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>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.00224 | $0.05246 |
| Opus 5 | $0.00112 | $0.02623 |
| Sonnet 5 | $0.00045 | $0.01049 |
| Haiku 4.5 | $0.00022 | $0.00525 |
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.
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.
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, andtools/directory layout. Each app has its own copy underapps/{app}/src/{package}/(e.g.,apps/network/src/unifi_network_mcp/runtime.py). make manifestavailable (run from repo root;uv run make manifestif 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 sharedpackages/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 |
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.
- 7d ago First seen · 318 lines · 224 tokens per session scan A c06907c33946
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.
Other skills, from other repositories
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
nw-fp-clojure
Clojure language-specific patterns, data-first modeling, REPL-driven development, and spec.
restore-internals-seams-in-finally-blocks-after-each-test
When delegating a task affected by this skill, include.
mobiai-ios-testing
Use when writing or running tests in an iOS project — unit tests, UI tests, snapshot tests, choosing the right framework.
testing-llm
LLM and AI testing patterns — mock responses, evaluation with DeepEval/RAGAS, structured output validation, and agentic test patterns (generator, healer, planner). Use when testing AI features, validating LLM outputs, or building evaluation pipelines.