sketchup-mcp2: Instructions file for Claude Code

CLAUDE.md

sketchup-mcp2 CLAUDE.md is an instructions file for Claude Code from zinin/sketchup-mcp2. It costs 3,235 tokens per session, scanned A, original, MIT.

A project instruction file for a server that lets Claude control a live SketchUp model through the Model Context Protocol, a standard way for AI tools to call software functions.

In plain words
What is it for?
Use it as guidance when developing, installing, or modifying the Python server and Ruby SketchUp extension.
Why use it?
It records repository details and important implementation constraints, such as unit conversion, SketchUp's single-threaded design, and its network message format.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

Nothing to install: this file belongs to zinin/sketchup-mcp2. 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/zinin/sketchup-mcp2/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/zinin/sketchup-mcp2

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 sketchup-mcp2 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zinin/sketchup-mcp2/claude-md/github.svg)](https://agentmods.dev/instructions/zinin/sketchup-mcp2/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/zinin/sketchup-mcp2/claude-md"><img src="https://agentmods.dev/badge/instructions/zinin/sketchup-mcp2/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 sketchup-mcp2 CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zinin/sketchup-mcp2/claude-md"><img src="https://agentmods.dev/badge/instructions/zinin/sketchup-mcp2/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,235 This file is loaded in full into every session.
When invoked 3,235 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 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.03235 $0.03235
Opus 5 $0.01618 $0.01618
Sonnet 5 $0.00647 $0.00647
Haiku 4.5 $0.00324 $0.00324

Measured 9d ago against content hash 51a6b799ac60, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

sketchup-mcp2 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 9d 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.

CLAUDE.md · 199 lines

How it starts

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

CLAUDE.md

Guidance for Claude Code (claude.ai/code) working in this repository.

What This Project Does

MCP Server for SketchUp bridges Claude AI and SketchUp via the Model Context Protocol (MCP). Two components:

  1. Python MCP server (src/sketchup_mcp/) — receives Claude's tool calls, forwards them over TCP
  2. Ruby SketchUp extension (mcp_for_sketchup/mcp_for_sketchup/) — TCP server inside SketchUp, executes commands against the live model

Non-Obvious Constraints

  • Units: SketchUp's internal Ruby API uses inches; all MCP tools accept and return mm. Convert at the boundary via MM = 25.4.
  • Group#subtract is reversed: A.subtract(B) returns B - A. To get «target minus tool», call tool.subtract(target). Verified empirically against SketchUp 2026.
  • SketchUp is single-threaded: the Ruby extension cannot use threads; all I/O runs in UI.start_timer callbacks.
  • Wire protocol (v0.0.1+): 4-byte big-endian length-prefix framing, 64 MiB cap.
  • Persistent socket: Python server holds one TCP connection; asyncio.Lock serializes tool-calls. Ruby reads non-blocking inside UI.start_timer, capped at 50 reads per tick (~3.2 MB) to keep SketchUp's UI responsive.
  • Ruby supports N concurrent TCP clients: core/server.rb keeps @clients (sock → ClientState) + a global FIFO @frame_queue. Each timer tick: accept connections, drain reads into each client's FrameReader, dispatch frames in FIFO decode-arrival order (accept-order across clients, decode-order within a client — single shared queue, not round-robin). Operations still serialise on the single-threaded SketchUp UI thread. Per-client errors close only that client. Logical races between clients on the model are the user's responsibility (no server-side locking). Half-open sockets detected via SO_KEEPALIVE (OS default ~2h).
  • Entity IDs: SketchUp's find_entity_by_id requires Integer; cast incoming string IDs with .to_i.
  • Solid tools are unreliable on non-manifold geometry: boolean_operation and edge ops use copy-based + sequential-per-edge workarounds.
  • Sketchup::Model#undo does not exist: programmatic undo dispatches Sketchup.send_action("editUndo:").
  • Request IDs round-trip: both sides preserve the JSON-RPC id so async responses can be matched.
  • Mutating handlers wrap edits in model.start_operation/commit_operation so undo rolls back atomically.
  • eval gate: eval_ruby is gated by the eval_enabled pref, which ships on (Config::DEFAULTS[:eval_enabled] = true) and is closed from Plugins → MCP Server → Settings.... An absent pref resolves to that default; a present-but-non-boolean pref fails closed — a corrupt value is no basis for enabling arbitrary code execution. Gate closed ⇒ handlers/eval.rb::eval_ruby raises JSON-RPC -32010, which tools.py::eval_ruby turns into a user-facing message (no [code] prefix) so the LLM repeats it verbatim. Arbitrary-code risk is guarded in two layers: (1) a blocking enable-time security confirm (ui/settings_dialog.rb::confirm_eval_enable — warns it grants full filesystem/network/shell access), shown on an off→on transition inside the Settings dialog — and only there. An upgrade does not pass through the dialog, so an install with no stored pref (never opened Settings) gets the new open default with no confirm, including one upgrading from a -warehouse build where the gate was closed; (2) per-call review at the MCP client — Claude Desktop / Claude Code show each eval_ruby call's code to approve or deny. Note this second layer is a client convention, not a protocol guarantee: MCP does not mandate an interaction model, and a client running pre-authorized (--dangerously-skip-permissions) shows nothing. The extension deliberately does NOT log or re-prompt the code — that would duplicate the client's permission UI and break autonomous (--dangerously-skip-permissions) operation.
  • Version handshake (one-time on connect): every TCP connection MUST begin with a JSON-RPC hello request carrying params.client_version. The server validates against core/compat.rb's MIN_PYTHON..MAX_PYTHON range and replies with {server_version, client_id} in result. Mismatches return JSON-RPC error -32001 (IncompatibleVersionError on the Python side) and the server closes the socket. After a successful handshake, regular tools/call requests carry no client_version field and responses carry no server_version field. Compatibility ranges live in src/sketchup_mcp/compat.py and mcp_for_sketchup/mcp_for_sketchup/core/compat.rb. get_version remains a regular tool returning the verdict payload.
  • Literal source-guard tests: test/test_operation_names.rb, test/test_transform_absolute.rb, test/test_joints_frame_compensation.rb pin exact handler source text (down to indentation) to protect invariants like the reversed Group#subtract. Never run an auto-formatter over handlers or tests; when refactoring pinned code, update the pins deliberately.

Read the full file on GitHub · 199 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. 9d ago First seen · 199 lines · 3,235 tokens per session scan A 51a6b799ac60

Subscribe to this mod's changes

sketchup-mcp2 CLAUDE.md is an instructions file published in the GitHub repository zinin/sketchup-mcp2 (20 stars, last pushed 10d ago), licensed MIT. It adds 3,235 tokens to every session, about $0.0162 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-30.

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

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

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens