deephaven-mcp: Skill for Claude Code

.agents/skills/ref-mcp-module-organization/SKILL.md

ref-mcp-module-organization is a skill for Claude Code from deephaven/deephaven-mcp. It costs 28 tokens per session (2,021 once invoked), scanned A, original, Apache-2.0.

A set of code-organization rules for MCP tool modules. MCP, or Model Context Protocol, is a way for AI agents to call tools provided by another program.

In plain words
What is it for?
Use it when creating or changing MCP tools, including deciding where modules, helper functions, and constants should live.
Why use it?
It keeps related tools and helper code together and avoids mixing MCP server patterns with the project's separate command-line interface code.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: installed under .agents/ (shared by several agents).

This is deephaven/deephaven-mcp's own configuration. It tells Claude Code how to work on deephaven-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 deephaven-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to deephaven/deephaven-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/deephaven/deephaven-mcp/main/.agents/skills/ref-mcp-module-organization/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/deephaven/deephaven-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 ref-mcp-module-organization

README.md
[![agentmods](https://agentmods.dev/badge/skills/deephaven/deephaven-mcp/ref-mcp-module-organization/github.svg)](https://agentmods.dev/skills/deephaven/deephaven-mcp/ref-mcp-module-organization)
Your own site
<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/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 ref-mcp-module-organization

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,021 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 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.00028 $0.02021
Opus 5.5 $0.00011 $0.00808
Sonnet 5.5 $0.00006 $0.00404
Haiku 4.5 $0.00003 $0.00202

Measured 2mo ago against content hash 03a499c42388, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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.

.agents/skills/ref-mcp-module-organization/SKILL.md · 109 lines

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 local dhcli CLI under src/deephaven_mcp/cli/_commands/, apply the cli-command-add skill instead — the CLI uses a different framework (click), a different async pattern (@run_async from cli/_async.py), and a different error contract (CliError from cli/_errors.py). Do not transplant patterns between the two.

File Organization Principles

  1. 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).

  2. 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.py when a third consumer appears (rule below).
    • If used by 3+ modules → move to _tools/shared.py.
  3. Constant Placement:

    • Module-specific constants → keep in that module after imports
    • Shared constants → place in _tools/shared.py or 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-conventions skill for where they live and how to read them.
  4. 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
  5. Registering New Tool Modules:

    • CRITICAL: Every tool module must define a register_tools(server: FastMCP) -> None function
    • 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() in src/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 static dhcli CLI 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_settings raises EnterpriseNotConfiguredError and get_community_settings/get_community_registry raise CommunityNotConfiguredError (both ConfigurationError subclasses), which each tool's except handler converts to a success=False response. Do not gate registration on multi_config.community/multi_config.enterprise. See _register_tools in mcp_systems_server/_fastmcp.py.

Read the full file on GitHub · 109 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. 2mo ago Changed 03a499c42388
  2. 3mo ago First seen · 109 lines · 28 tokens per session scan A 59b4056a1364

Subscribe to this mod's changes

ref-mcp-module-organization is a skill published in the GitHub repository deephaven/deephaven-mcp (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 28 tokens to every session and 2,021 once invoked, about $0.0001 per session on Opus 5.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.

Related

ref-mcp-module-organization compared with skills from other repositories

ref-mcp-module-organization next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ref-mcp-module-organizationdeephaven/deephaven-mcpSkill5yesterdayApache-2.0A28Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82ktodayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102kyesterdayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code