workflow

A reference collection of examples for creating and editing SketchUp models with Ruby. It covers geometry, materials, components, and transformations such as moving, rotating, and scaling.

In plain words
What is it for?
Creating faces and groups, extruding geometry, applying materials and textures, placing components, and transforming model objects.
Why use it?
It provides ready-made patterns for common 3D modelling operations without having to work out the SketchUp API from scratch.

Agent

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 agents/darwin/supex/workflow
Clone the repo
git clone --depth 1 https://github.com/darwin/supex
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 986 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00986
Opus 5 $0.00000 $0.00493
Sonnet 5 $0.00000 $0.00197
Haiku 4.5 $0.00000 $0.00099

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

Security

Grade A, and why

workflow 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.

docs/agents/workflow.md · 180 lines

How it starts

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

Extended Workflow Examples

Extended examples and reference material. For essential patterns, see prompt.md.

Common Geometry Operations

# Create face and extrude
face = entities.add_face([0,0,0], [1.m,0,0], [1.m,1.m,0], [0,1.m,0])
face.pushpull(50.cm)

# Create group with geometry
group = entities.add_group
group.entities.add_face(points)

# Transform/move
tr = Geom::Transformation.translation([1.m, 0, 0])
group.transform!(tr)

# Rotation around axis
tr = Geom::Transformation.rotation(ORIGIN, Z_AXIS, 45.degrees)
group.transform!(tr)

# Scale
tr = Geom::Transformation.scaling(2.0)
group.transform!(tr)

# Combined transformation
tr = Geom::Transformation.new(point, xaxis, yaxis, zaxis)

Materials

# Create material
material = model.materials.add('Wood')
material.color = Sketchup::Color.new(139, 69, 19)

# Apply to group (preferred)
group.material = material

# Apply to face (only if explicitly needed)
face.material = material

# Texture
material.texture = '/path/to/texture.jpg'
material.texture.size = [1.m, 1.m]

Components

# Create component definition
definition = model.definitions.add('MyComponent')
definition.entities.add_face(points)

# Place instance
instance = entities.add_instance(definition, transformation)
instance.name = 'Instance 1'

# Access definition from instance
instance.definition.entities.each { |e| puts e }

Curves and Arcs

# Arc (center, xaxis, normal, radius, start_angle, end_angle)
edges = entities.add_arc(center, X_AXIS, Z_AXIS, radius, 0, 90.degrees)

# Circle
edges = entities.add_circle(center, Z_AXIS, radius, 24)

# Polygon
edges = entities.add_ngon(center, Z_AXIS, radius, 6)

# Curve from points
edges = entities.add_curve(points_array)

Layers/Tags

# Create layer
layer = model.layers.add('My Layer')

# Assign to entity
group.layer = layer

# Hide layer
layer.visible = false

Selection and Iteration

# Get selection
selection = model.selection
selection.each { |entity| puts entity }

# Filter by type
groups = entities.grep(Sketchup::Group)
faces = entities.grep(Sketchup::Face)

# Find by name
table = entities.find { |e| e.respond_to?(:name) && e.name == 'Table' }

# Find by attribute
tagged = entities.select { |e| e.get_attribute('supex', 'type') == 'my_tag' }

Read the full file on GitHub · 180 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 · 180 lines · 0 tokens per session scan A 760d8c717a93

Subscribe to this mod's changes

workflow is an agent published in the GitHub repository darwin/supex (44 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 986 tokens. 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.