writing-openstudio-model-measures

Scaffold OpenStudio ModelMeasure directories and generate measure.rb boilerplate.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mbcoalson/skills --skill writing-openstudio-model-measures
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-openstudio-model-measures
Source: https://github.com/mbcoalson/skills/tree/main/.claude/skills/writing-openstudio-model-measures
Command: npx skills add https://github.com/mbcoalson/skills --skill writing-openstudio-model-measures

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides guidance for creating OpenStudio ModelMeasures (Ruby scripts) that modify .osm files, including boilerplate code, scaffolding, and testing patterns.

Core Features & Use Cases

  • Measure Scaffold: Generate boilerplate measure structure and boilerplate code.
  • Measure Writing: Create measure.rb, test templates, and metadata.
  • Guidance: Best practices from OpenStudio measure writing guides.

Quick Start

Scaffold a new measure named "Add Window Overhangs" and begin editing measure.rb.

Frequently Asked Questions about writing-openstudio-model-measures

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write an OpenStudio ModelMeasure to modify .osm files?

Write an OpenStudio ModelMeasure by creating a Ruby class that inherits from OpenStudio::Measure::ModelMeasure and implements required methods: name(), description(), modeler_description(), arguments(model), and run(model, runner, user_arguments) returning a boolean. This Skill provides scaffolding to generate boilerplate measure directories, measure.rb templates, and test patterns for OpenStudio 3.9 environments.

What's the fastest way to scaffold a new OpenStudio measure?

Use the Skill's scaffolding script to generate a complete measure directory structure, including boilerplate measure.rb, test templates, and metadata files. Name your measure (e.g., 'Add Window Overhangs'), run the scaffold command, and begin editing measure.rb with the generated framework in place.

Do I need to follow specific conventions when creating OpenStudio measures?

Yes. OpenStudio ModelMeasures require inheritance from OpenStudio::Measure::ModelMeasure, implementation of name(), description(), modeler_description(), arguments(model), and run(model, runner, user_arguments) methods, and a boolean return value. This Skill enforces these conventions through scaffolding and guidance aligned with OpenStudio measure writing best practices.

Can I generate tests for my OpenStudio measure?

Yes. The Skill's scaffolding generates test templates alongside measure.rb and resources, providing a testing pattern structure. You populate the tests with your measurement logic and assertions for your specific measure behavior.

What Ruby knowledge do I need to write OpenStudio measures?

You need intermediate Ruby proficiency to write measure logic within the ModelMeasure framework. The Skill provides boilerplate code and scaffolding to handle class structure and method signatures, so you focus on the modeling logic inside run() and argument definitions.

Does this work with OpenStudio 3.9?

Yes. This Skill is designed for OpenStudio 3.9 environments and modeling workflows. It generates measures compliant with the OpenStudio::Measure::ModelMeasure API and conventions in that version.