revit-api-code

revit-api-code is a skill for Claude Code, Codex from Utopia5327/claude-plugin-for-revit-bim. It costs 166 tokens per session (1,441 once invoked), scanned A, original, MIT.

A code-generation guide for the Revit API, the programming interface for Autodesk Revit building-design software. It creates C# or Python code for macros, add-ins, external commands, and pyRevit scripts.

In plain words
What is it for?
Use it to generate Revit macros, compiled add-in commands, .addin manifests, or pyRevit ribbon scripts after choosing the language, run location, and Revit version.
Why use it?
It helps developers produce the surrounding files and setup details needed to run Revit automation outside Dynamo, a visual programming tool.

Skill for Claude CodeCodex

Part of the revit-bim plugin — 25 skills, 3 agents, 2 hooks shipped together

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 skills/utopia5327/claude-plugin-for-revit-bim/revit-api-code
Any agent
npx skills add Utopia5327/claude-plugin-for-revit-bim --skill revit-api-code
Clone the repo
git clone --depth 1 https://github.com/Utopia5327/claude-plugin-for-revit-bim

Made for: Claude Code, Codex.

Or install revit-bim, the plugin that ships this one along with the rest of its 25 skills, 3 agents, 2 hooks.

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 revit-api-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/utopia5327/claude-plugin-for-revit-bim/revit-api-code.svg)](https://agentmods.dev/skills/utopia5327/claude-plugin-for-revit-bim/revit-api-code)
Your own site
<a href="https://agentmods.dev/skills/utopia5327/claude-plugin-for-revit-bim/revit-api-code"><img src="https://agentmods.dev/badge/skills/utopia5327/claude-plugin-for-revit-bim/revit-api-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 166 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,441 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.00166 $0.01441
Opus 5 $0.00083 $0.00720
Sonnet 5 $0.00033 $0.00288
Haiku 4.5 $0.00017 $0.00144

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

Security

Grade A, and why

revit-api-code 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 4d 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.

skills/revit-api-code/SKILL.md · 207 lines

How it starts

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

Generate Revit API Code

Generate Revit API code for:

"$ARGUMENTS"

Clarify the target

Before writing code, confirm:

  1. C# or Python?
    • C# → Revit macro (internal, .cs file in Revit's SharpDevelop IDE) or add-in (.dll)
    • Python → pyRevit script (.py file in a pyRevit extension bundle)
  2. Where will it run?
    • Macro: runs from Manage → Macros, no installation needed
    • External command: compiled .dll, registered in .addin file
    • pyRevit: drop into extension folder, appears as ribbon button automatically
  3. Revit version? Affects API availability.

C# External Command (Add-in)

Complete, production-ready boilerplate for an IExternalCommand:

using System;
using System.Collections.Generic;
using System.Linq;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace RevitBIMPlugin
{
    [Transaction(TransactionMode.Manual)]
    [Regeneration(RegenerationOption.Manual)]
    public class MyCommand : IExternalCommand
    {
        public Result Execute(
            ExternalCommandData commandData,
            ref string message,
            ElementSet elements)
        {
            UIApplication uiapp = commandData.Application;
            UIDocument    uidoc = uiapp.ActiveUIDocument;
            Document      doc   = uidoc.Document;

            try
            {
                using (Transaction tx = new Transaction(doc, "My BIM Operation"))
                {
                    tx.Start();

                    // ── Your code here ────────────────────────────────
                    // Example: count all walls
                    var walls = new FilteredElementCollector(doc)
                        .OfCategory(BuiltInCategory.OST_Walls)
                        .WhereElementIsNotElementType()
                        .ToElements();

                    tx.Commit();

                    TaskDialog.Show("BIM Manager",
                        $"Operation completed. Found {walls.Count} walls.");
                }

                return Result.Succeeded;
            }
            catch (Exception ex)
            {
                message = ex.Message;
                return Result.Failed;
            }
        }
    }
}

Read the full file on GitHub · 207 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. 4d ago First seen · 207 lines · 166 tokens per session scan A 07d7c8bc5bec

Subscribe to this mod's changes

revit-api-code is a skill published in the GitHub repository Utopia5327/claude-plugin-for-revit-bim (6 stars, last pushed 6mo ago), licensed MIT. It adds 166 tokens to every session and 1,441 once invoked, about $0.0008 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.

Related

Other skills, from other repositories

rhinocommon-geometry

Deep reference for Rhino.Geometry namespace — all geometry types, operations, and patterns in RhinoCommon. Use this skill whenever working with Rhino geometry in C# or Python: Point3d, Vector3d, Curve, Surface, Brep, Mesh, NURBS, intersections, boolean operations, transforms, planes, bounding boxes. Triggers on…

bcshih/rhino-dev-skills · 151 tokens

os2-wpf-theme

Apply the OS2 WPF theme (TripleZeroLabs.Os2) correctly in any XAML or C# file. Activate when building or editing a WPF window, page, view, or UserControl; styling any WPF control (Button, TextBox, DataGrid, ComboBox, CheckBox, nav sidebar, tabs, dialog, banner); building a settings screen, form, dashboard, or toolbar…

TripleZeroLabs/TripleZeroLabs.Os2 · 149 tokens

dotnet-winforms-basics

Building WinForms on .NET 8+. High-DPI, dark mode (experimental), DI patterns, modernization tips.

wshaddix/dotnet-skills · 31 tokens

wpf-best-practices

Best practices for building WPF desktop applications with C# and .NET. Use when working on WPF projects, .NET desktop apps, XAML UI, MVVM architecture, system tray apps, or any C# project using Windows Presentation Foundation.

jcurbelo/skills · 57 tokens

avalonia-zafiro-development

Mandatory skills, conventions, and behavioral rules for Avalonia UI development using the Zafiro toolkit.

lucaspmarie-a11y/claude-skills-vault · 27 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens