Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/deephaven/deephaven-mcp/ref-mcp-module-organizationnpx skills add deephaven/deephaven-mcp --skill ref-mcp-module-organizationgit clone --depth 1 https://github.com/deephaven/deephaven-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/deephaven/deephaven-mcp/ref-mcp-module-organization)<a href="https://agentmods.dev/skills/deephaven/deephaven-mcp/ref-mcp-module-organization"><img src="https://agentmods.dev/badge/skills/deephaven/deephaven-mcp/ref-mcp-module-organization.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.00028 | $0.01979 |
| Opus 5 | $0.00014 | $0.00989 |
| Sonnet 5 | $0.00006 | $0.00396 |
| Haiku 4.5 | $0.00003 | $0.00198 |
Grade A, and why
ref-mcp-module-organization 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.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP Tools Module Organization Guidelines
Scope. This skill applies only to MCP server tool modules under
src/deephaven_mcp/mcp_systems_server/_tools/. For commands in the localdhcliCLI undersrc/deephaven_mcp/cli/_commands/, apply thecli-command-addskill instead — the CLI uses a different framework (click), a different async pattern (@run_asyncfromcli/_async.py), and a different error contract (CliErrorfromcli/_errors.py). Do not transplant patterns between the two.
File Organization Principles
-
Module Cohesion: Each file in
_tools/should contain MCP tools and helpers for a single, well-defined domain (e.g., table operations, session lifecycle, script execution). -
Helper Function Placement:
- If used by 1 module → keep it in that module (private with
_prefix). - If used by 2 modules → duplicate is acceptable. Promote to
_tools/shared.pywhen a third consumer appears (rule below). - If used by 3+ modules → move to
_tools/shared.py.
- If used by 1 module → keep it in that module (private with
-
Constant Placement:
- Module-specific constants → keep in that module after imports
- Shared constants → place in
_tools/shared.pyor the most relevant module - Always include a docstring explaining the constant's purpose
- Operator-tunable values (timeouts, defaults, thresholds) are not module constants — see the
ref-configuration-conventionsskill for where they live and how to read them.
-
New MCP Tool Placement:
- Before creating a new file, check if the tool fits an existing domain
- Only create a new module if the tool represents a distinct new domain
- Module size is a consequence of one-domain-per-module, not a target to hit
-
Registering New Tool Modules:
- CRITICAL: Every tool module must define a
register_tools(server: FastMCP) -> Nonefunction - This function calls
server.tool()(tool_fn)for each tool in the module - After creating a new module, add a
module.register_tools(server)call to_register_tools()insrc/deephaven_mcp/mcp_systems_server/_fastmcp.py. Registration is not gated by configuration — every tool module registers unconditionally, so the tool surface is stable and self-describing across all deployment shapes (and matches the staticdhcliCLI command tree). A tool that needs a configuration section the deployment lacks self-reports applicability when invoked: it returns an empty result where one is meaningful (e.g.enterprise_systems_status→{"systems": []}) or a structured user-facing error otherwise. The section accessors enforce this —get_enterprise_settingsraisesEnterpriseNotConfiguredErrorandget_community_settings/get_community_registryraiseCommunityNotConfiguredError(bothConfigurationErrorsubclasses), which each tool'sexcepthandler converts to asuccess=Falseresponse. Do not gate registration onmulti_config.community/multi_config.enterprise. See_register_toolsinmcp_systems_server/_fastmcp.py.
- CRITICAL: Every tool module must define a
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.
- 5d ago First seen · 109 lines · 28 tokens per session scan A 59b4056a1364
ref-mcp-module-organization is a skill published in the GitHub repository deephaven/deephaven-mcp (5 stars, last pushed today), licensed Apache-2.0. It adds 28 tokens to every session and 1,979 once invoked, about $0.0001 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-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-cache-components-optimizer
Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…