/revit-bim:revit-api-codefrom revit-bim
Generates production-ready Revit API code in C# or Python for macros, external commands, add-ins, and pyRevit scripts. Use when users need standalone Revit automation beyond Dynamo.
Ships in revit-bim. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate Revit API code for:
"$ARGUMENTS"
Before writing code, confirm:
.cs file in Revit's SharpDevelop IDE) or add-in (.dll).py file in a pyRevit extension bundle).dll, registered in .addin fileComplete, 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;
}
}
}
}
Corresponding .addin manifest (save as MyPlugin.addin in %AppData%\Autodesk\Revit\Addins\20XX\):
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Name>My BIM Command</Name>
<Assembly>C:\Path\To\MyPlugin.dll</Assembly>
<FullClassName>RevitBIMPlugin.MyCommand</FullClassName>
<ClientId>YOUR-GUID-HERE</ClientId>
<VendorId>YOURINITIALS</VendorId>
<VendorDescription>Your Company</VendorDescription>
</AddIn>
</RevitAddIns>
For quick scripts run directly from Revit without compiling a DLL:
// In Revit: Manage → Macros → Module → add this method
public void MyMacro()
{
Document doc = this.ActiveUIDocument.Document;
using (Transaction tx = new Transaction(doc, "Macro Operation"))
{
tx.Start();
// ── Your code here ────────────────────────────────────────
var rooms = new FilteredElementCollector(doc)
.OfCategory(BuiltInCategory.OST_Rooms)
.WhereElementIsNotElementType()
.ToElements();
TaskDialog.Show("Macro", $"Found {rooms.Count} rooms.");
tx.Commit();
}
}
For ribbon button scripts using the pyRevit framework:
# -*- coding: utf-8 -*-
"""BIM Manager — pyRevit Script.
tooltip: Brief description shown on hover
"""
from pyrevit import revit, DB, UI, script, forms
doc = revit.doc
uidoc = revit.uidoc
output = script.get_output()
# ── Your code here ───────────────────────────────────────────────────────────
# Read elements
rooms = list(DB.FilteredElementCollector(doc)
.OfCategory(DB.BuiltInCategory.OST_Rooms)
.WhereElementIsNotElementType()
.ToElements())
# Modify with transaction
with revit.Transaction('BIM Operation'):
pass # ← your modifications
# Output to pyRevit's output panel (supports HTML/markdown)
output.print_md('## Done!')
output.print_table(
table_data=[[r.Number, r.get_Parameter(DB.BuiltInParameter.ROOM_NAME).AsString()]
for r in rooms],
columns=['Number', 'Name']
)
pyRevit extension structure:
MyExtension.extension/
├── MyPanel.panel/
│ └── MyButton.pushbutton/
│ ├── script.py ← your code above
│ └── icon.png ← 32×32 PNG
└── extension.json
Show a TaskDialog with user options:
TaskDialogResult result = TaskDialog.Show("Confirm",
"This will modify all wall types. Proceed?",
TaskDialogCommonButtons.Yes | TaskDialogCommonButtons.No);
if (result != TaskDialogResult.Yes) return Result.Cancelled;
Select elements in the UI:
IList<Reference> refs = uidoc.Selection.PickObjects(
ObjectType.Element, "Select elements to process");
var selected = refs.Select(r => doc.GetElement(r.ElementId)).ToList();
Print to Output window (pyRevit):
output.print_md('**Found** {} walls'.format(len(walls)))
output.print_table(data, columns=['ID', 'Type', 'Length'])
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
revit-api, revit-macros, pyrevit, bim-automation, addin-development
npx claudepluginhub utopia5327/claude-plugin-for-revit-bim --plugin revit-bim25 skills in this plugin
/acc-api-setupSet up Python authentication and a reusable client for the Autodesk Platform Services (APS) API to access Autodesk Construction Cloud (ACC). Use this skill first before any other ACC API script — it handles OAuth2 token acquisition (2-legged and 3-legged), environment configuration, hub/project discovery, and the Python boilerplate that all ACC API scripts depend on. Trigger on phrases like "ACC API setup", "authenticate with APS", "get an APS token", "connect to ACC", "Autodesk API token", "APS credentials", "set up Forge API", "configure ACC API", "get access token Autodesk", or whenever a user is starting to write ACC/APS API scripts and needs the authentication foundation. Always offer this skill before any other ACC API skill if the user hasn't authenticated yet.
/acc-coordinateWork with Autodesk Construction Cloud (ACC) Coordinate — list and inspect model sets, retrieve clash results, create clash issues, manage model activation for coordination, and export coordination reports via the APS Model Coordination API. Use this skill when a user needs to automate clash detection workflows, pull clash data from ACC for reporting, create ACC issues from clashes, check which models are active in a model set, or integrate ACC coordination data with other tools. Trigger on phrases like "ACC Coordinate", "model coordination", "model set", "clash results", "clash data", "ACC clashes", "coordination space", "activated models", "clash issues", "federated model", "coordination report", "BIM coordination", or any request to work with ACC's model coordination module via API. Also offer this when users want to export or report on clash data from ACC.
/acc-design-collaborationGuide Revit ↔ ACC Design Collaboration workflows — setting up cloud worksharing, creating and consuming design packages, shared views, Design Collaboration setup, model publishing, and Revit cloud model best practices. Also covers the API for querying shared views and design package status. Use this skill when a user needs help with Revit cloud models, BIM 360 Design / ACC Design Collaboration, creating or receiving design packages, activating models for coordination, or troubleshooting cloud worksharing issues. Trigger on phrases like "Design Collaboration", "cloud worksharing", "Revit cloud model", "design package", "shared views", "consume package", "publish model to ACC", "BIM 360 Design", "Revit cloud", "cloud model", "collaboration workflow", "ACC Revit workflow", or any request involving the Revit-to-ACC publishing and collaboration pipeline.
/acc-docsManage Autodesk Construction Cloud (ACC) Docs — list folders and files, upload documents, download files, create folder structures, manage transmittals, reviews, and packages via the APS Data Management API and ACC Docs REST API. Use this skill when a user needs to automate document control workflows in ACC: bulk uploading drawing sets, creating folder structures, listing published files, downloading specific versions, setting up transmittals, creating document packages, or writing reports of what's in their ACC Docs library. Trigger on phrases like "ACC Docs", "upload to ACC", "download from ACC", "list files in ACC", "document control", "ACC folder", "transmittal", "document package", "file versions", "publish drawings", "drawing register", "ACC file management", or any request to read, write, or organise files in Autodesk Construction Cloud Docs.
/acc-reportsExport ACC project data to CSV or Excel — issues, RFIs, document logs, clash summaries, transmittals, and project activity reports — using the APS REST API with Python. Use this skill when a user needs to report on ACC project health, export an issues register, pull RFI status into a spreadsheet, generate a document transmittal log, create a clash trend report, or produce any data export from Autodesk Construction Cloud. Trigger on phrases like "export issues", "issues report", "RFI report", "ACC report", "export from ACC", "document log", "clash report", "ACC data export", "project status report", "pull data from ACC", "ACC Excel export", "transmittal log", or any request to extract or report on data stored in Autodesk Construction Cloud.
/analyze-roomsAnalyze rooms, spaces, and areas in a Revit model — GIA calculations, space program comparison, department breakdowns, unbounded/unplaced room audits, and CSV export. Use this skill when a user wants to calculate total floor area, check room areas against a brief, export a room data table, find unplaced or unbounded rooms, or produce a GIA (Gross Internal Area) report. Trigger on phrases like "room areas", "GIA", "space program", "analyze rooms", "unbounded rooms", "area schedule", "room data", "floor area summary", "net internal area", or any request involving Revit room/space quantities. Also use when someone mentions area validation before planning submission.
Other plugins' skills for the same job