agentleFS
aianime0012-coderaianime0012-coder/vitruvius-skills/skills/ifc-model-analysis/SKILL.md

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

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
  1. Very specific:

    Locate the file: If the user provides a path, use it.

    line 24
  2. Distinctive:

    Use a compact report, for example:

    line 65
  3. Distinctive:

    Huge models (100k+ entities): prefer ifcopenshell; the text fallback is fine for inventory but slow on large files — warn the user.

    line 78
  4. Distinctive:

    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.

    line 79
  5. Distinctive:

    Unnamed storeys: use elevation or index as label, note it in the report.

    line 80

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 / .ifcxml file 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

  1. Locate the file. If the user provides a path, use it. If not, ask for the path or find .ifc files in the working directory.
  2. Prefer ifcopenshell (accurate, fast):

    pip install ifcopenshell
    import 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}")
  3. 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 from IfcBuildingStorey entities.
  4. Produce the summary in this order:
    • File info: name, size, IFC version (from FILE_SCHEMA header)
    • 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
  5. 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 OK

Edge cases

  • IFC2x3 vs IFC4: both supported; IfcWallStandardCase vs IfcWall naming differs — normalize by stripping the Ifc prefix 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).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.