Queries Revit models using Nice3point.Revit.Extensions fluent FilteredElementCollector wrappers with native parameter filters instead of LINQ. For retrieving elements by class, category, or parameter value.
Ships in revit-api. 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.
Query the model through the fluent FilteredElementCollector wrappers in Nice3point.Revit.Extensions.
They wrap the raw Revit collector API into a single readable chain and run the filtering inside Revit's native database engine.
The database engine evaluates the filters before elements expand into memory.
Filtering the collector output with LINQ materializes every element first.
new FilteredElementCollector(document) by hand or filters collector output with .Where(...).revit-element-and-parameter-access.ElementFilter the extensions do not expose — fall back to a raw FilteredElementCollector with that filter.Always prefer the built-in methods of FilteredElementCollector extensions over using LINQ.
LINQ materializes and marshals every element into the .NET process's memory and does not filter at the database level.
Use LINQ only when the built-in methods are insufficient for filtering.
var collector = document.CollectElements(); // whole document
var viewScoped = document.CollectElements(view); // elements visible in a view
var restricted = document.CollectElements(elementIds); // a known id set
Prefer the generic and multi-argument overloads over raw typeof filters.
var walls = document.CollectElements()
.OfClass<Wall>()
.ToElements();
var openings = document.CollectElements()
.OfCategories(BuiltInCategory.OST_Walls, BuiltInCategory.OST_Floors)
.Instances() // only instances; use .Types() for element types
.ToElements();
var annotated = document.CollectElements()
.WithExtensibleStorage(schemaGuid) // elements that store add-in data
.ToElements();
WhereParameter builds a native ElementParameterFilter — evaluated at the database level before element expansion — then continues the collector chain.
var tallWalls = document.CollectElements()
.OfClass<Wall>()
.WhereParameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM).IsGreaterThan(3.0, 1e-6)
.ToElements();
// BAD — loads every wall into memory, then filters
var tallWalls = new FilteredElementCollector(document)
.OfClass(typeof(Wall))
.Cast<Wall>()
.Where(wall => wall.get_Parameter(BuiltInParameter.WALL_USER_HEIGHT_PARAM).AsDouble() > 3.0);
Comparisons include Equals, IsGreaterThan/IsGreaterThanOrEqualTo, IsLessThan/IsLessThanOrEqualTo (with an optional double epsilon), Contains/StartsWith (and their Not… inversions), and HasValue.
Use the extension terminators, not LINQ.
The terminators call Revit's native fast implementations, and Count() calls GetElementCount().
var firstRoom = document.CollectElements().OfClass<SpatialElement>().FirstOrDefault();
var wallCount = document.CollectElements().OfClass<Wall>().Count();
var hasLevels = document.CollectElements().OfClass<Level>().Any();
.Where(...) over materialized elements.WhereParameter, not a post-collection predicate.ToElements, First, FirstOrDefault, Count, Any).document.CollectElements(...), not a hand-written new FilteredElementCollector(...).WhereParameter(...), filtering at the database level.First/FirstOrDefault/Count/Any, not LINQ.| Pitfall | Correct approach |
|---|---|
.Where(element => element.get_Parameter(...).AsDouble() > x) after the collector | WhereParameter(param).IsGreaterThan(x, epsilon) — a native rule. |
collector.ToElements().Count / .Any() (LINQ over the list) | collector.Count() / collector.Any() — native fast paths. |
Comparing double parameters without an epsilon | Use the IsGreaterThan(value, epsilon) overload. |
CollectElements or WhereParameter not found | The Nice3point.Revit.Extensions package is not referenced in the project. |
| Reusing one collector after a terminator | Start a fresh CollectElements() per query; terminators stop the iterator. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
7 skills in this plugin
/revit-api-option-handlersSupply small Autodesk Revit API callback interfaces with Nice3point.Revit.Toolkit ready-made handlers, not hand-rolled classes. USE FOR: passing IFamilyLoadOptions, IDuplicateTypeNamesHandler, or ISaveSharedCoordinatesCallback to a Revit API call. DO NOT USE FOR: constraining what a user can pick in an interactive selection, or building a dockable pane's UI element.
/revit-code-styleStructure Autodesk Revit API code — API boundaries, document and transaction lifetime, thread affinity, and converting Revit objects to plain models. USE FOR: structuring Revit API code — which projects may reference Revit types, which scope opens and closes a document, how to scope a transaction, thread affinity, and converting Revit objects before they cross a service or process boundary. DO NOT USE FOR: the mechanics of individual model operations (querying, parameter read/write, *Utils wrappers), which have their own focused skills — apply this to the structure around them.
/revit-element-and-parameter-accessRead and write Autodesk Revit elements and parameters with the Nice3point.Revit.Extensions fluent accessors. USE FOR: finding an Element by ElementId, finding a parameter by BuiltInParameter/ParameterTypeId/Guid/name, reading its typed value, setting it, and converting internal units. DO NOT USE FOR: querying the model for a set of elements (use revit-element-collector).
/revit-api:revit-element-collectorfrom revit-api
npx claudepluginhub nice3point/revit-skills --plugin revit-apiOther plugins' skills for the same job