ifc-model-analysis
Skill0 starsChanged 3 months agoMITView on GitHub
Parses and summarizes IFC (Industry Foundation Classes) BIM models into building storeys, element quantities, and entity inventories. Use when analyzing .ifc or .ifcxml files, extracting building structure from BIM models, checking model completeness, or comparing element quantities across models.
- Installs packages
In this repository7 other files it gives its agents.
- bim-interoperabilitySkill
- building-code-reviewSkill
- dxf-drawing-inspectionSkill
- egress-life-safetySkill
- mep-coordinationSkill
- specification-writingSkill
- sustainable-designSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
Locate the file: If the user provides a path, use it.
- Distinctive: line 65
Use a compact report, for example:
- Distinctive: line 78
Huge models (100k+ entities): prefer ifcopenshell; the text fallback is fine for inventory but slow on large files — warn the user.
- Distinctive: line 79
Corrupt or partial files: if the file fails to parse, report the first error line and offer to continue with the entity-count-only pass.
- Distinctive: line 80
Unnamed storeys: use elevation or index as label, note it in the report.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IFC Model Analysis
Summarize an IFC BIM model: what storeys exist, what elements are on them, and what the model contains. This is the standard first pass before any deeper BIM task (clash review, quantity takeoff, model checking).
When to use
- User gives you an
.ifc/.ifcxmlfile and asks "what's in this model?" - Comparing two models (e.g. architect vs. structural model completeness)
- Preparing for clash detection or quantity extraction
- Checking whether required elements (walls, slabs, doors, windows) are present per storey
Workflow
- Locate the file. If the user provides a path, use it. If not, ask for the path or find
.ifcfiles in the working directory. Prefer
ifcopenshell(accurate, fast):pip install ifcopenshellimport ifcopenshell model = ifcopenshell.open("model.ifc") # All entities by type (top 20 by count) from collections import Counter types = Counter() for entity in model: types[entity.is_a()] += 1 for t, c in types.most_common(20): print(f"{t}: {c}") # Storeys and their elements storeys = model.by_type("IfcBuildingStorey") for storey in sorted(storeys, key=lambda s: s.Elevation or 0): print(f"\n{storey.Name or 'Unnamed storey'} (elev {storey.Elevation})") if storey.IsDecomposedBy: for rel in storey.IsDecomposedBy: for el in rel.RelatedObjects: print(f" - {el.is_a()}: {el.Name}")- Fallback (no dependencies): parse the STEP-style text. Lines look like
#123=IfcWallStandardCase('...',...);. Extract entity type names with a regex like^#\d+\s*=\s*([A-Za-z0-9_]+)\(, count them, and infer storeys fromIfcBuildingStoreyentities. - Produce the summary in this order:
- File info: name, size, IFC version (from
FILE_SCHEMAheader) - Total entities, unique entity types
- Building storeys (sorted by elevation) with element counts
- Element inventory: top element types with counts
- Completeness check: flag missing typical elements (walls, slabs, doors, windows) per storey
- File info: name, size, IFC version (from
- Report any parsing errors explicitly instead of guessing.
Output format
Use a compact report, for example:
IFC: office_model.ifc (IFC4, 8.2 MB)
Entities: 148,203 | Types: 47
Storeys: 5 (B1 -4.2, L1 0.0, L2 4.2, L3 8.4, Roof 11.6)
Elements: Wall 1,204 | Slab 402 | Column 186 | Beam 312 | Door 84 | Window 96
Completeness: B1 missing windows (parking), L1-L3 OKEdge cases
- IFC2x3 vs IFC4: both supported;
IfcWallStandardCasevsIfcWallnaming differs — normalize by stripping theIfcprefix and matching suffixes (Wall,Slab,Column,Beam,Door,Window,Roof,Stair,Ramp,Floor,Covering,Plate,Footing,Pile,Member). - Huge models (100k+ entities): prefer ifcopenshell; the text fallback is fine for inventory but slow on large files — warn the user.
- Corrupt or partial files: if the file fails to parse, report the first error line and offer to continue with the entity-count-only pass.
- Unnamed storeys: use elevation or index as label, note it in the report.
Files
references/ifc-quick-reference.md— entity classes and relationships worth knowing during analysis.scripts/analyze_ifc.py— dependency-free parser producing the report above (also reads.ifcxml).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

