Studio Matrx Monthly · Volume 1 · Issue 4 · September 2026
Amogh N P
 In loving memory of Amogh N P — Architect · Designer · Visionary 
Claude for Grasshopper & PythonLesson 8.1
Claude for Architects & Designers/Module 8 · Code & Automation

Lesson 8.1 · Code & Automation

Claude for Grasshopper & Python

You describe the geometry or the task in plain English; Claude writes the Grasshopper or Python; you read it, run it on a copy, and verify the result you own.

13 min Interactive lessonFree · open lessonByAmogh N P· Architect & interior designer
The hook

You do not need to learn to code. You need to learn to read, run and check the code Claude writes for you.

Most designers close the door on code early. Somewhere in school a Python tutorial or a wall of Grasshopper components made it clear this was for other people, and the door stayed shut. That door has just opened, quietly and completely. You can now describe a piece of geometry or a repetitive task in ordinary language - "make a grid of points five by eight, three metres apart" or "take these floor areas and give me the percentages" - and Claude writes correct, short, readable code that does it. The barrier was never the ideas; it was the syntax, and syntax is exactly what Claude is good at.

The catch is the same one that runs through this whole course. Claude produces plausible code, not guaranteed-correct code. It will happily write something that runs cleanly and gives you a confident, wrong answer - a grid rotated the wrong way, a factor applied twice, an off-by-one that drops a row. So the skill you are building here is not writing code; it is directing it in plain English, reading what comes back closely enough to follow the logic, running it on a copy or a small sample, and verifying the output before you trust it. You stay the author of the result. Claude is the fast, tireless intern who can type in any language you cannot.

Say it in words. Read the code. Run on a copy. Verify one known case. Then trust it.

The door to code just opened

For a generation of architects and interior designers, computational tools sat behind a wall of syntax. You could see what Grasshopper or a Python script might do - a facade that adapts to sun angle, a script that renumbers three hundred rooms - but the cost of entry was learning to write in a language that punishes a missing colon. Claude changes the economics of that entirely. You supply the intent; it supplies the syntax. The part you were good at all along - knowing what you want the geometry or the data to do - is now the only part you strictly need.

That is genuinely liberating, and it is genuinely dangerous, for the same reason. When the friction of writing code drops to zero, the temptation is to accept whatever runs. But "it ran without an error" and "it did the right thing" are two completely different claims. A script that produces a beautiful, plausible, wrong result is worse than no script, because it looks finished. This is why the discipline reverses: less time typing, far more time reading and checking.

Think of the loop the way you would with any assistant. You direct - describe the task, the inputs you have, the output you want, and the units. Claude drafts - a few lines of Python or a GhPython snippet. You read it - not to admire it, but to follow the logic. You run it on a copy or a small sample where a mistake costs nothing. You verify - count the points by hand, check one row against a calculator - and only then use it on real work. Three of those five steps are yours. Notice how little of it is typing and how much of it is judgement - which is the whole point. The figure below is the whole lesson in one picture: Claude writes it, but you still own whether it is correct.

It helps to name why this matters so much for a designer specifically. In most professions a wrong line of code produces a crash or a garbled screen, and someone notices. In ours it can produce a beautiful, credible-looking result - a panel layout, a set of areas, a schedule of quantities - that goes forward into a drawing, a tender, or a client presentation before anyone questions it. The plausibility that makes Claude so useful is the same quality that makes an unchecked result dangerous, and only your trained eye closes that gap.

PLAIN ENGLISH TO CODEYOU SAYMake a grid ofpoints, 5 by 8,3m apartCLAUDE WRITESshort Python orGhPython youcan readYOU VERIFYread it, run ona copy, checkthe resultClaude writes it - you still own whether it is correct.No coding background needed to direct it. A critical eye is needed to trust it.
Zoom
The whole lesson in one picture: you say what you want in plain English, Claude writes short Python or GhPython you can read, and you read it, run it on a copy or sample, and verify the result. No coding background is needed to direct it; a critical eye is needed to trust it.

It ran = it ran. It ran RIGHT = a different claim you have to check.

Grasshopper, GhPython and rhino3dm - what they are

A little vocabulary makes the rest of the lesson easy, and you can hold all of it in plain terms. Rhino is a 3D modelling program well liked for free-form and complex geometry. Grasshopper is its visual programming environment: rather than typing, you wire together boxes called components on a canvas, each doing one small operation, and data flows along the wires. It lets a designer build parametric logic - change a number, watch the model update - without writing a line. GhPython is one of those boxes: a component that runs a short piece of Python you place inside it, for the moments when wiring components together gets clumsy and a few lines of code are simply clearer. rhino3dm is a separate, small library that lets Python read and write Rhino's .3dm files outside Rhino altogether - useful for batch jobs like auditing a folder of models.

You do not need to master any of these. You describe the geometry or the operation, and Claude writes the GhPython or Python. Ask for a grid of points and you get back something you can actually read:

python
# GhPython: build a grid of points, nx by ny, spaced sx and sy
# inputs (set on the GH component): nx, ny (int), sx, sy (float)
# output: pts
import Rhino.Geometry as rg

pts = []
for i in range(nx):
    for j in range(ny):
        pts.append(rg.Point3d(i * sx, j * sy, 0))

Even with no coding background you can follow that: two loops walk across rows and columns, and each step adds a point at a position worked out from the spacing. When you paste this into a GhPython component and set nx to 5 and ny to 8, you should get exactly forty points. That expectation - forty, not thirty-nine, not two thousand - is your first verification, and it is the habit that keeps you safe. Always ask Claude to name the inputs and outputs and to add a one-line comment per block; readable code is checkable code, and you are the checker.

PLAIN ENGLISH TO CODEYOU SAYMake a grid ofpoints, 5 by 8,3m apartCLAUDE WRITESshort Python orGhPython youcan readYOU VERIFYread it, run ona copy, checkthe resultClaude writes it - you still own whether it is correct.No coding background needed to direct it. A critical eye is needed to trust it.
Zoom
The whole lesson in one picture: you say what you want in plain English, Claude writes short Python or GhPython you can read, and you read it, run it on a copy or sample, and verify the result. No coding background is needed to direct it; a critical eye is needed to trust it.

Reading code you did not write

Reading code is a far gentler skill than writing it, and it is the one that matters here. You are not looking for elegance; you are looking for whether the logic matches what you asked for. Four habits get you most of the way. First, make Claude annotate: ask it to add a plain-English comment to every line or block, and to explain, above the code, what the script assumes. Second, find the inputs and the output: what does it take in, what does it hand back, and in what units? Third, read the transformations in the middle: what happens to the data between input and output - is anything multiplied, filtered, rounded, or reordered? Fourth, hunt for the assumptions that could be wrong: a hard-coded number, an assumed unit (millimetres vs metres), an assumed order of items.

Here is a rhino3dm example that reads a Rhino file and counts objects per layer - a genuinely useful audit before you inherit someone else's model:

python
# rhino3dm: open a .3dm file and count objects on each layer
import rhino3dm

model = rhino3dm.File3dm.Read("site-model.3dm")
counts = {}
for obj in model.Objects:
    layer = model.Layers[obj.Attributes.LayerIndex].Name
    counts[layer] = counts.get(layer, 0) + 1

for name, n in sorted(counts.items()):
    print(name, n)

Read it as a sentence: open this file; for every object, find which layer it sits on; keep a tally per layer; then print the tallies. The assumptions worth questioning are visible - it expects the file to exist at that exact name, and it counts every object including ones you might consider junk. None of that is hidden. If a number looks wrong when you run it - say a layer you know is full reports zero - that is the script telling you an assumption did not hold, and you go back to Claude with the specifics. The read-run-verify sequence in the figure is the whole professional method compressed into four rows.

CODE YOU DID NOT WRITE - HOW TO TRUST IT1 READAsk Claude to comment every line in plain English.2 RUNRun it on a COPY or a small sample, never live work.3 VERIFYCount by hand: did 40 points appear? Do totals match?4 KEEPSave the working script with a note on what it does.
Zoom
How to trust code you did not write, in four rows: have Claude comment every line so you can read the logic; run it on a copy or a small sample, never live work; verify against a case you already know; and keep the working script with a note. This is the professional method, not a coding trick.

Read code like a sentence: inputs -> what happens -> output. Question every hard-coded number.

Run it on a copy, verify the result

The single rule that separates a safe designer-coder from a reckless one is this: run new code where a mistake is cheap. For geometry that means a fresh Rhino file or a duplicated Grasshopper definition, not the live model you have spent a week on. For a rhino3dm batch job that touches files, it means pointing it at a copied folder first, never the original. Code that reads and reports is low risk; code that writes, moves, deletes or overwrites is where an unchecked script can quietly ruin an afternoon, or a week. Match your caution to what the code can destroy.

Verification is not vague suspicion; it is a concrete check you can name before you run. For the point grid, the check is a count: five by eight must be forty. For the layer audit, pick one layer you know well and confirm the tally matches what you see in Rhino. For anything that computes numbers, take one case and reproduce it on a calculator by hand. If Claude wrote a script to convert areas to a cost, feed it one room whose cost you already know, and see if the answer matches to the rupee. When the sample checks out, your confidence in the whole is earned rather than assumed.

Finally, close the loop like a professional keeps a drawing. When a script works, save it with a short note - what it does, what inputs it expects, the date, and the one result you verified against. A folder of small, trusted, commented scripts becomes a quiet superpower over a year; a pile of anonymous snippets you no longer understand becomes a liability. Claude will happily regenerate any of them, but it cannot remember which one you tested and trusted. That memory, that judgement, and that accountability stay with you - which is exactly as it should be, because it is your name on the work the code produces.

Claude features & terms in this lesson

Plain-English intent

Describing the geometry or task in words, not syntax

Claude turns intent into code. The clearer you state inputs, output and units, the more checkable the code you get back.

GhPython / rhino3dm

A Python component inside Grasshopper; a library to read/write .3dm files

Claude writes both. It knows the common libraries, but version details and edge cases still need testing in your own setup.

Read-run-verify loop

The discipline of checking code you did not write

Not a Claude feature - your professional method. Run on a copy or sample; verify against a known case before trusting it.

Hands-on workshop

Workshop — your first verified script

You will direct Claude to write a genuinely small, useful Python script, then practise the part that matters: reading, running on a sample, and verifying. Pick a task where a wrong answer would be obvious to you - that is how you learn to catch errors.

Claude.ai and any way to run Python (an online sandbox is fine). No prior coding needed.

Given & goal
Goal: get one small script working AND verified
Inputs: a short list of rooms with lengths and widths (from any project)
Time: ~30 minutes
  1. 1In Claude.ai, describe the task in plain English: 'Write short Python that takes a list of rooms with length and width in metres, computes each area, and prints a table with a total.' Give it your real numbers.
  2. 2Ask Claude to add a one-line comment to every block and to state its assumptions above the code (units, rounding).
  3. 3Read the code as a sentence: what goes in, what happens in the middle, what comes out. Note any hard-coded number or assumed unit.
  4. 4Run it on your sample - in an online Python sandbox or a local install. Before you look, predict the total area yourself.
  5. 5Verify: does the printed total match your prediction? Check one room's area on a calculator. If anything is off, tell Claude the specific mismatch and have it fix the logic.
  6. 6Save the working script with a note: what it does, expected inputs, the date, and the one case you verified.

You’ll walk away with
One short, commented Python script that you have run on real numbers and verified against a hand calculation, saved with a note on its inputs and the case you checked.

The worked example

Three altitudes on the same idea

Read the band that fits you — or all three.

For the architectClaude across the whole practice

Treat Claude as the computational-design colleague your practice could never quite justify hiring. The wins are the repetitive, rule-based jobs: renumbering, auditing inherited models, generating option variants, batch-processing files. Keep a shared, commented library of scripts your team has actually verified, and enforce one rule - new code runs on a copy first. The leverage is real, but a wrong script scales a mistake across a whole model, so scrutiny scales with what the code can touch and change.

For the interior designerClaude for specs, client work & sourcing

You do not need Grasshopper to gain from this - start with tiny Python that tidies data. Ask Claude to convert a supplier's messy area list into clean rooms and totals, to reformat an FF&E export, or to renumber a schedule. These are small, read-only tasks where a mistake is obvious and cheap. Verify one row by hand, keep the working snippet, and grow from there. The point is confident automation of drudgery, not a computational-design career.

For the studentA Claude-fluent design skillset

This is the best time in history to learn to read code, and Claude is a patient tutor. Do not paste and run blindly - that teaches you nothing and quietly weakens the judgement you will need in practice. Instead ask Claude to explain each line, predict what a script will do before you run it, then check whether you were right. Build the habit of reading, running on samples, and verifying now; it is a skill studios increasingly assume you already have.

Misconception check

If Claude can write the code, I never need to understand any of it.

Tempting, and quietly dangerous. Claude writes plausible code that usually works and sometimes runs perfectly while doing the wrong thing - a rotated grid, a double-counted factor, a dropped row - with no error to warn you. You do not need to write code, but you must be able to read it well enough to follow the logic, and to run and verify it on a copy or sample. The understanding you need is not syntax; it is knowing what the script should produce and checking that it did. Skip that and you are shipping unverified results under your own name.
Try it

Do it yourself

Reason these through - they are about judgement, not syntax.

  1. 1Why is 'the script ran without an error' not the same as 'the script did the right thing'?
  2. 2Name the five steps of the loop for using code Claude writes, and say which three are yours.
  3. 3For a script that makes a 5-by-8 point grid, what is your one-number verification?
  4. 4Which is riskier to run unchecked: code that reads and reports, or code that writes and overwrites? Why?
  5. 5What should you save alongside a script that finally works, and why does it matter a year later?
Take this with you

The one line to carry out

Claude writes the code; you own whether it is correct. Describe the task in plain English, then read the result, run it on a copy or sample, and verify it against a case you already know - the syntax is Claude's job, the judgement is yours.
Take it further
References & further reading

Peer-reviewed journals & authoritative standards

  1. 01Grasshopper 3DWikipedia, 2026.
  2. 02Rhinoceros 3DWikipedia, 2026.
  3. 03Python (programming language)Wikipedia, 2026.
  4. 04Meet ClaudeAnthropic, 2026.
Related lessons
Recap
Claude has opened computational tools to designers who do not code: you describe intent in plain English and it writes short, readable Grasshopper (GhPython) or Python, including libraries like rhino3dm. But it produces plausible code, not guaranteed-correct code, and code can run cleanly while doing the wrong thing. So the skill is reading the logic, running on a copy or small sample, and verifying against a known case before trusting the output. Save what works with a note. You stay the author of the result.
Carry forward →

Rhino and Grasshopper are one world; the other is BIM. Next we point Claude at Revit, Dynamo and pyRevit to automate the repetitive chores of a BIM model - with an even stricter rule about testing on a copy.

A

The author

Amogh N P

Architect, interior designer, and creative polymath. Studio Matrx began in his notebooks — his vision of design made honest, useful, and open to everyone. Its Academy is written and taught in his memory, and free, forever.

More about Amogh →