Hubitat-local-MCP-server: Instructions file for Claude Code

CLAUDE.md

Hubitat-local-MCP-server CLAUDE.md is an instructions file for Claude Code from kingpanther13/Hubitat-local-MCP-server. It costs 16,059 tokens per session, scanned A, a copy of Hubitat-local-MCP-server AGENTS.md, MIT.

Repository instructions for AI coding agents working on a Hubitat local MCP server. MCP is a standard way for an AI assistant to use external tools; the instructions cover commands, Groovy code restrictions, and tool naming.

In plain words
What is it for?
Use them when changing the Hubitat Groovy server or rules, choosing allowed APIs, naming tools, and running the Gradle tests and sandbox linter before pushing.
Why use it?
They reduce mistakes caused by differences between ordinary Groovy and Hubitat's restricted runtime. They also keep AGENTS.md and CLAUDE.md aligned and require the same checks used by continuous integration.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is kingpanther13/Hubitat-local-MCP-server's own configuration. It tells Claude Code how to work on Hubitat-local-MCP-server 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 Hubitat-local-MCP-server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to kingpanther13/Hubitat-local-MCP-server. 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/kingpanther13/Hubitat-local-MCP-server/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/kingpanther13/Hubitat-local-MCP-server

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 Hubitat-local-MCP-server CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kingpanther13/hubitat-local-mcp-server/claude-md/github.svg)](https://agentmods.dev/instructions/kingpanther13/hubitat-local-mcp-server/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/kingpanther13/hubitat-local-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/kingpanther13/hubitat-local-mcp-server/claude-md/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 Hubitat-local-MCP-server CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kingpanther13/hubitat-local-mcp-server/claude-md"><img src="https://agentmods.dev/badge/instructions/kingpanther13/hubitat-local-mcp-server/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16,059 This file is loaded in full into every session.
When invoked 16,059 The same file — it is already loaded in full.
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.16059 $0.16059
Opus 5 $0.08030 $0.08030
Sonnet 5 $0.03212 $0.03212
Haiku 4.5 $0.01606 $0.01606

Measured today against content hash 82815a5cf965, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

Hubitat-local-MCP-server CLAUDE.md 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 today.

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 Hubitat-local-MCP-server AGENTS.md — 0 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.

CLAUDE.md · 346 lines

How it starts

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

AGENTS.md

Conventions for AI coding agents working on this repo (OpenAI Codex, Cursor, Aider, Windsurf, Zed, etc.). Claude Code reads CLAUDE.md, which is kept byte-identical to this file — the PR Guard CI workflow flags drift. AGENTS.md is the source of truth. Edit it, then cp AGENTS.md CLAUDE.md before committing. (GitHub Copilot uses .github/copilot-instructions.md; .gemini/styleguide.md drove Gemini Code Assist's reviews — that bot is sunset and disabled, its replacement TBD.)

This file is for AI agents. Human contributors follow .github/pull_request_template.md and .gemini/styleguide.md.

Commands

./gradlew test                     # full Spock suite (~1 min)
./gradlew test --tests "<spec>"    # single spec
python tests/sandbox_lint.py       # Groovy sandbox lint

Run both before pushing. CI runs the same.

Code style

Hubitat Groovy sandbox (hubitat-mcp-server.groovy, hubitat-mcp-rule.groovy) blocks several JVM features the runtime would otherwise expose. Highlights — see tests/sandbox_lint.py for the full set:

  • Eval.*, GroovyShell, Class.forName, Runtime.exec, new Thread, new File / java.io.File — not allowed
  • getClass() — reflection blocked
  • log.isDebugEnabled() — not exposed
  • Date.format(String, Locale) — only the no-Locale overload works
  • Filesystem only via the hub File Manager API (/hub/fileManager); MCP-tool surface is list_files / read_file / write_file / delete_file

Use atomicState for thread-safe persistence, state for UI/counters. Compare device IDs as strings (.toString()).

Comments: only when the WHY is non-obvious. No multi-paragraph docblocks. Don't reference the current PR/issue/caller.

Tool design rules

These rules apply to every MCP tool added or renamed. Cached MCP clients refresh their tool list on update — no deprecation aliases are shipped.

Tool naming

  • Universal service prefix. Every MCP tool name begins with hub_. Anthropic's verified guidance: prefix-namespacing tools by service has "non-trivial effects on our tool-use evaluations" — writing-tools-for-agents (2025-09-11). Example: hub_list_devices, hub_create_room, hub_call_device_command.
  • Verb-noun order. After the hub_ prefix, the name reads verb-noun. Verbs are drawn from the strict vocabulary table below. Nouns are the most natural English for the entity in context (drop redundant qualifiers — e.g., rule is preferred over rm_rule where context disambiguates).
  • Gateway verbs — manage_ (write-bearing) and read_ (pure-read). A gateway's verb encodes whether it can mutate. manage_ names any gateway that contains at least one write tool, whether mixed read+write or write-only (e.g., hub_manage_rooms, hub_manage_code, hub_manage_destructive_ops). read_ names a gateway whose every sub-tool is read-only (e.g., hub_read_apps_code, hub_read_diagnostics). This lets an AI consumer enable the hub_read_* gateways for safe read-only access while gating every write-bearing hub_manage_* gateway behind a write permission. manage_ MAY also be used by a flat-only tool — one that never sits behind any gateway and is always kept top-level on tools/list — even though it is not itself a gateway. The canonical case is a flat tool that action-dispatches a small set (≤4) of verbs on a single noun (current example: hub_manage_virtual_device with action: "create"/"delete"). Don't introduce more flat manage_ tools without explicit maintainer sign-off. A gateway read_ prefix is distinct from the file-manager leaf tools hub_read_file/hub_write_file (see the verb table) — those keep their own read/write verbs; the noun (file vs a gateway domain) disambiguates.
  • Multi-gateway membership. A tool MAY appear under more than one gateway when both gateway domains apply.
  • Gateway read/write split. A read-only tool MUST be reachable from a hub_read_* gateway (or be a flat top-level tool) — it may never be unique to a hub_manage_* gateway. A hub_manage_* gateway MAY be mixed (carry its read tools too, for workflow cohesion) as long as those reads are also surfaced in a hub_read_* gateway via multi-gateway membership (same tool listed in both; no code duplication). This guarantees an AI consumer can reach every read through a pure-read surface while disabling every write-bearing manage_ gateway. Pure-read gateways enable cleaner per-gateway disable in LLM client settings and clearer mental models for AI consumers.
  • Hard rename, no aliases. Non-conforming tools are renamed in lockstep when the convention requires it. The expectation: MCP clients refresh their cached tool list on server update. No deprecation aliases are shipped.

Read the full file on GitHub · 346 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. today Changed · +2 lines · +163 tokens per session 82815a5cf965
  2. 2d ago Changed · -338 tokens per session 1a8ac482935b
  3. 5d ago Changed · +2 lines · +68 tokens per session 521c864a354c
  4. 6d ago Changed · -95 tokens per session 15dd011827c0
  5. 10d ago First seen · 342 lines · 16,261 tokens per session scan A 9b7377c5a578

Subscribe to this mod's changes

Hubitat-local-MCP-server CLAUDE.md is an instructions file published in the GitHub repository kingpanther13/Hubitat-local-MCP-server (17 stars, last pushed today), licensed MIT. It adds 16,059 tokens to every session, about $0.0803 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to Hubitat-local-MCP-server AGENTS.md, differing in 0 lines, and is treated as a copy.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens