sketchup-ruby-api-docs

A set of rules and an index for looking up the official SketchUp Ruby API documentation, which describes how Ruby code controls SketchUp.

In plain words
What is it for?
Use it when finding SketchUp Ruby classes, methods, modules, geometry tools, or model and entity APIs.
Why use it?
It gives API searches a fixed source and correct links, reducing the chance of using the wrong class, method, or documentation page.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/jasperhartong/sketchup-code/sketchup-ruby-api-docs
Clone the repo
git clone --depth 1 https://github.com/jasperhartong/sketchup-code

Made for: Cursor.

Per session 602 This file is loaded in full into every session.
When invoked 602 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00602 $0.00602
Opus 5 $0.00301 $0.00301
Sonnet 5 $0.00120 $0.00120
Haiku 4.5 $0.00060 $0.00060

Measured 2d ago against content hash 4c72917101af, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sketchup-ruby-api-docs 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 2d 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.

.cursor/rules/sketchup-ruby-api-docs.mdc · 44 lines

How it starts

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

SketchUp Ruby API — Docs in Agent Context

Use this rule and the project index file for any SketchUp Ruby API lookup.

Index file (single source of truth)

The full class/module index with links is in:

docs/sketchup-ruby-api-index.md

When you need a class, method, or guide: open that file. It contains the official SketchUp Ruby API index (file listing + namespace A–Z with URLs).

Quick reference (always available)

For any other class or method, use docs/sketchup-ruby-api-index.md or the official alphabetic index above.

Keeping the quick reference up to date

When you use or learn a new important SketchUp Ruby API method (non-obvious, easy to get wrong, or likely to be needed again):

  1. Add it to the Quick reference in this file (.cursor/rules/sketchup-ruby-api-docs.mdc).
  2. Use one line per entry: - **Class#method_or_class:** URL with the official docs link (e.g. #method_name-instance_method for instance methods).
  3. Prefer methods we had to look up, debug, or that have subtle behavior (e.g. d.start / d.send(:end) for DimensionLinear, units in inches, etc.).

Read the full file on GitHub · 44 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. 2d ago First seen · 44 lines · 602 tokens per session scan A 4c72917101af

Subscribe to this mod's changes

sketchup-ruby-api-docs is a cursor rule published in the GitHub repository jasperhartong/sketchup-code (5 stars, last pushed 3mo ago), licensed MIT. It adds 602 tokens to every session, about $0.0030 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.