MCPInstall

bim-consistency-checker

Check BIM model consistency: naming conventions, parameter completeness, spatial relationships, and data integrity across model elements.

Installs
156
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction --skill bim-consistency-checker
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads bim-consistency-checker automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

BIM Consistency Checker for Construction

Overview

Validate BIM model consistency including naming conventions, parameter completeness, spatial relationships, classification compliance, and cross-reference integrity.

Business Case

BIM consistency checking ensures:

  • Data Quality: Complete and accurate model data
  • Interoperability: Models work across platforms
  • Coordination: Consistent information for all trades
  • Deliverable Compliance: Meet BIM execution plan requirements

Technical Implementation

from dataclasses import dataclass, field
from typing import List, Dict, Any, Optional, Set
from enum import Enum
import re

class CheckSeverity(Enum):
    ERROR = "error"
    WARNING = "warning"
    INFO = "info"

class CheckCategory(Enum):
    NAMING = "naming"
    PARAMETERS = "parameters"
    SPATIAL = "spatial"
    CLASSIFICATION = "classification"
    GEOMETRY = "geometry"
    RELATIONSHIPS = "relationships"

@dataclass
class ConsistencyIssue:
    element_id: str
    element_name: str
    category: CheckCategory
    severity: CheckSeverity
    rule: str
    message: str
    suggestion: str = ""

@dataclass
class ConsistencyReport:
    model_name: str
    total_elements: int
    elements_checked: int
    issues: List[ConsistencyIssue]
    issues_by_category: Dict[str, int]
    issues_by_severity: Dict[str, int]
    pass_rate: float

@dataclass
class NamingConvention:
    element_type: str
    pattern: str
    description: str
    examples: List[str]

class BIMConsistencyChecker:
    """Check BIM model consistency and data quality."""

    # Default naming conventions
    DEFAULT_NAMING_RULES = [
        NamingConvention(
            element_type='Level',
            pattern=r'^(L|Level)\s*\d{1,2}$|^(B|Basement)\s*\d?$|^(R|Roof)$',
            description='Levels should follow L01, Level 1, B1, Roof pattern',
            examples=['L01', 'Level 1', 'B1', 'Roof']
        ),
        NamingConvention(
            element_type='Grid',
            pattern=r'^[A-Z]$|^\d{1,2}$|^[A-Z]\.\d$',
            description='Grids should be single letters (A-Z) or numbers',
            examples=['A', '1', 'A.1']
        ),
        NamingConvention(
            element_type='Room',
            pattern=r'^\d{3,4}[A-Z]?\s*-?\s*.+',
            description='Rooms should have number and name (101 - Office)',
            examples=['101 - Office', '201A Conference']
        ),
        NamingConvention(
            element_type='Wall',
            pattern=r'^(INT|EXT|CW|CMU|GYP)[-_].+',
            description='Walls should have type prefix',
            examples=['INT-GYP-1HR', 'EXT-CMU-8IN']
        ),
        NamingConvention(
            element_type='Door',
            pattern=r'^[A-Z]?\d{2,3}[A-Z]?$',
            description='Doors should follow type numbering',
            examples=['101', 'A101', '101A']
        ),
    ]

    # Required parameters by element type
    REQUIRED_PARAMETERS = {
        'Wall': ['Fire Rating', 'Function', 'Structural'],
        'Door': ['Fire Rating', 'Width', 'Height', 'Frame Material'],
        'Room': ['Name', 'Number', 'Area', 'Department'],
        'Window': ['Width', 'Height', 'Glass Type'],
        'Floor': ['Structural', 'Fire Rating'],
        'Ceiling': ['Height', 'Type'],
        'Column': ['Structural Material', 'Shape'],
        'Beam': ['Structural Material', 'Size'],
    }

    def __init__(self):
        self.naming_rules: List[NamingConvention] = list(self.DEFAULT_NAMING_RULES)
        self.required_params: Dict[str, List[str]] = dict(self.REQUIRED_PARAMETERS)
        self.issues: List[ConsistencyIssue] = []

    def add_naming_rule(self, rule: NamingConvention):
        """Add custom naming convention rule."""
        self.naming_rules.append(rule)

    def set_required_parameters(self, element_type: str, parameters: List[str]):
        """Set required parameters for an element type."""
        self.required_params[element_type] = parameters

    def check_model(self, elements: List[Dict]) -> ConsistencyReport:
        """Run all consistency checks on model elements."""
        self.issues = []

        for element in elements:
            self._check_naming(element)
            self._check_parameters(element)
            self._check_spatial(element)
            self._check_classification(element)
            self._check_geometry(element)

        # Cross-element checks
        self._check_relationships(elements)
        self._check_duplicates(elements)

        # Calculate statistics
        issues_by_category = {}
        issues_by_severity = {}

        for issue in self.issues:
            cat = issue.category.value
            sev = issue.severity.value
            issues_by_category[cat] = issues_by_category.get(cat, 0) + 1
            issues_by_severity[sev] = issues_by_severity.get(sev, 0) + 1

        elements_with_issues = len(set(i.element_id for i in self.issues))
        pass_rate = (len(elements) - elements_with_issues) / len(elements) * 100 if elements else 100

        return ConsistencyReport(
            model_name='Model',
            total_elements=len(elements),
            elements_checked=len(elements),
            issues=self.issues,
            issues_by_category=issues_by_category,
            issues_by_severity=issues_by_severity,
            pass_rate=pass_rate
        )

    def _check_naming(self, element: Dict):
        """Check element naming conventions."""
        element_type = element.get('type', '')
        name = element.get('name', '')
        element_id = element.get('id', '')

        if not name:
            self.issues.append(ConsistencyIssue(
                element_id=element_id,
                element_name='(no name)',
                category=CheckCategory.NAMING,
                severity=CheckSeverity.ERROR,
                rule='Name Required',
                message='Element has no name',
                suggestion='Assign a descriptive name following conventions'
            ))
            return

        # Check against naming rules
        for rule in self.naming_rules:
            if rule.element_type.lower() in element_type.lower():
                if not re.match(rule.pattern, name, re.IGNORECASE):
                    self.issues.append(ConsistencyIssue(
                        element_id=element_id,
                        element_name=name,
                        category=CheckCategory.NAMING,
                        severity=CheckSeverity.WARNING,
                        rule=f'{rule.element_type} Naming',
                        message=f'Name "{name}" does not follow convention',
                        suggestion=f'{rule.description}. Examples: {", ".join(rule.examples)}'
                    ))

        # Check for special characters
        if re.search(r'[<>:"/\\|?*]', name):
            self.issues.append(ConsistencyIssue(
                element_id=element_id,
                element_name=name,
                category=CheckCategory.NAMING,
                severity=CheckSeverity.ERROR,
                rule='Invalid Characters',
                message='Name contains invalid characters',
                suggestion='Remove special characters: < > : " / \\ | ? *'
            ))

    def _check_parameters(self, element: Dict):
        """Check parameter completeness."""
        element_type = element.get('type', '')
        element_id = element.get('id', '')
        name = element.get('name', '')
        params = element.get('parameters', {})

        # Check required parameters
        required = self.required_params.get(element_type, [])
        for param in required:
            if param not in params or params[param] in [None, '', 'None']:
                self.issues.append(ConsistencyIssue(
                    element_id=element_id,
                    element_name=name,
                    category=CheckCategory.PARAMETERS,
                    severity=CheckSeverity.WARNING,
                    rule='Required Parameter',
                    message=f'Missing required parameter: {param}',
                    suggestion=f'Set value for {param}'
                ))

        # Check for default/placeholder values
        placeholder_values = ['TBD', 'XXX', 'TODO', 'CHANGE', '<default>']
        for param, value in params.items():
            if str(value).upper() in placeholder_values:
                self.issues.append(ConsistencyIssue(
                    element_id=element_id,
                    element_name=name,
                    category=CheckCategory.PARAMETERS,
                    severity=CheckSeverity.WARNING,
                    rule='Placeholder Value',
                    message=f'Parameter "{param}" has placeholder value: {value}',
                    suggestion='Replace with actual value'
                ))

    def _check_spatial(self, element: Dict):
        """Check spatial consistency."""
        element_id = element.get('id', '')
        name = element.get('name', '')
        element_type = element.get('type', '')

        # Check level assignment
        level = element.get('level')
        requires_level = element_type in ['Wall', 'Door', 'Window', 'Room', 'Floor', 'Ceiling']

        if requires_level and not level:
            self.issues.append(ConsistencyIssue(
                element_id=element_id,
                element_name=name,
                category=CheckCategory.SPATIAL,
                severity=CheckSeverity.ERROR,
                rule='Level Assignment',
                message='Element not assigned to a level',
                suggestion='Assign element to appropriate level'
            ))

        # Check room bounding
        if element_type == 'Wall':
            room_bounding = element.get('room_bounding', True)
            if not room_bounding:
                self.issues.append(ConsistencyIssue(
                    element_id=element_id,
                    element_name=name,
                    category=CheckCategory.SPATIAL,
                    severity=CheckSeverity.INFO,
                    rule='Room Bounding',
                    message='Wall is not room bounding',
                    suggestion='Verify this is intentional'
                ))

    def _check_classification(self, element: Dict):
        """Check classification codes."""
        element_id = element.get('id', '')
        name = element.get('name', '')
        params = element.get('parameters', {})

        # Check for classification
        classification = params.get('Classification') or params.get('OmniClass') or params.get('UniFormat')

        if not classification:
            self.issues.append(ConsistencyIssue(
                element_id=element_id,
                element_name=name,
                category=CheckCategory.CLASSIFICATION,
                severity=CheckSeverity.INFO,
                rule='Classification Required',
                message='Element has no classification code',
                suggestion='Assign OmniClass, UniFormat, or other classification'
            ))
        else:
            # Validate format
            if not re.match(r'^\d{2}[-\s]?\d{2}[-\s]?\d{2}', str(classification)):
                self.issues.append(ConsistencyIssue(
                    element_id=element_id,
                    element_name=name,
                    category=CheckCategory.CLASSIFICATION,
                    severity=CheckSeverity.WARNING,
                    rule='Classification Format',
                    message=f'Invalid classification format: {classification}',
                    suggestion='Use standard format (XX XX XX)'
                ))

    def _check_geometry(self, element: Dict):
        """Check geometry validity."""
        element_id = element.get('id', '')
        name = element.get('name', '')
        geometry = element.get('geometry', {})

        # Check for zero area/volume
        area = geometry.get('area', 0)
        volume = geometry.get('volume', 0)

        if area == 0 and volume == 0 and element.get('type') not in ['Grid', 'Level', 'ReferencePlane']:
            self.issues.append(ConsistencyIssue(
                element_id=element_id,
                element_name=name,
                category=CheckCategory.GEOMETRY,
                severity=CheckSeverity.ERROR,
                rule='Zero Geometry',
                message='Element has zero area and volume',
                suggestion='Check element geometry is valid'
            ))

        # Check for extremely small elements
        if 0 < area < 0.01:  # Less than 0.01 m² or ft²
            self.issues.append(ConsistencyIssue(
                element_id=element_id,
                element_name=name,
                category=CheckCategory.GEOMETRY,
                severity=CheckSeverity.WARNING,
                rule='Tiny Element',
                message=f'Element has very small area: {area}',
                suggestion='Verify element is intentional and not a modeling error'
            ))

    def _check_relationships(self, elements: List[Dict]):
        """Check cross-element relationships."""
        # Build lookup
        elements_by_id = {e['id']: e for e in elements}
        elements_by_type = {}
        for e in elements:
            t = e.get('type', '')
            if t not in elements_by_type:
                elements_by_type[t] = []
            elements_by_type[t].append(e)

        # Check door-wall relationships
        for door in elements_by_type.get('Door', []):
            host_wall = door.get('host_id')
            if host_wall and host_wall not in elements_by_id:
                self.issues.append(ConsistencyIssue(
                    element_id=door['id'],
                    element_name=door.get('name', ''),
                    category=CheckCategory.RELATIONSHIPS,
                    severity=CheckSeverity.ERROR,
                    rule='Invalid Host',
                    message=f'Door references non-existent wall: {host_wall}',
                    suggestion='Rehost door to valid wall'
                ))

        # Check room enclosure
        for room in elements_by_type.get('Room', []):
            if not room.get('is_bounded', True):
                self.issues.append(ConsistencyIssue(
                    element_id=room['id'],
                    element_name=room.get('name', ''),
                    category=CheckCategory.RELATIONSHIPS,
                    severity=CheckSeverity.ERROR,
                    rule='Unbounded Room',
                    message='Room is not properly bounded',
                    suggestion='Check room boundary walls'
                ))

    def _check_duplicates(self, elements: List[Dict]):
        """Check for duplicate elements."""
        seen: Dict[str, List[Dict]] = {}

        for element in elements:
            # Create signature for duplicate detection
            sig_parts = [
                element.get('type', ''),
                str(element.get('geometry', {}).get('location', '')),
                element.get('name', '')
            ]
            signature = '|'.join(sig_parts)

            if signature in seen:
                for dup in seen[signature]:
                    self.issues.append(ConsistencyIssue(
                        element_id=element['id'],
                        element_name=element.get('name', ''),
                        category=CheckCategory.RELATIONSHIPS,
                        severity=CheckSeverity.WARNING,
                        rule='Duplicate Element',
                        message=f'Possible duplicate of element {dup["id"]}',
                        suggestion='Review and remove duplicate if confirmed'
                    ))

            if signature not in seen:
                seen[signature] = []
            seen[signature].append(element)

    def generate_report(self, report: ConsistencyReport) -> str:
        """Generate consistency check report."""
        lines = ["# BIM Consistency Check Report", ""]
        lines.append(f"**Model:** {report.model_name}")
        lines.append(f"**Elements Checked:** {report.elements_checked}")
        lines.append(f"**Pass Rate:** {report.pass_rate:.1f}%")
        lines.append("")

        # Summary
        lines.append("## Summary")
        lines.append(f"- **Total Issues:** {len(report.issues)}")
        lines.append(f"- Errors: {report.issues_by_severity.get('error', 0)}")
        lines.append(f"- Warnings: {report.issues_by_severity.get('warning', 0)}")
        lines.append(f"- Info: {report.issues_by_severity.get('info', 0)}")
        lines.append("")

        # By category
        lines.append("## Issues by Category")
        for cat, count in sorted(report.issues_by_category.items()):
            lines.append(f"- {cat}: {count}")
        lines.append("")

        # Critical issues
        errors = [i for i in report.issues if i.severity == CheckSeverity.ERROR]
        if errors:
            lines.append("## Critical Issues (Errors)")
            for issue in errors[:20]:
                lines.append(f"\n### {issue.element_name} ({issue.element_id})")
                lines.append(f"- **Rule:** {issue.rule}")
                lines.append(f"- **Issue:** {issue.message}")
                lines.append(f"- **Fix:** {issue.suggestion}")

        return "\n".join(lines)

Quick Start

# Initialize checker
checker = BIMConsistencyChecker()

# Sample model elements
elements = [
    {
        'id': 'wall-001',
        'type': 'Wall',
        'name': 'INT-GYP-1HR',
        'level': 'Level 1',
        'parameters': {'Fire Rating': '1 Hour', 'Function': 'Interior'},
        'geometry': {'area': 50.5}
    },
    {
        'id': 'door-001',
        'type': 'Door',
        'name': '101',
        'level': 'Level 1',
        'host_id': 'wall-001',
        'parameters': {'Width': 36, 'Height': 84}
    }
]

# Run checks
report = checker.check_model(elements)

print(f"Pass Rate: {report.pass_rate:.1f}%")
print(f"Issues Found: {len(report.issues)}")

# Generate report
print(checker.generate_report(report))

Dependencies

pip install (no external dependencies)

FAQ

What does the bim-consistency-checker skill do?

Check BIM model consistency: naming conventions, parameter completeness, spatial relationships, and data integrity across model elements.

How do I install bim-consistency-checker?

Run npx skills add https://github.com/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction --skill bim-consistency-checker in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/bim-consistency-checker/ (personal) or .claude/skills/bim-consistency-checker/ (project).

Which AI agents can use bim-consistency-checker?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is bim-consistency-checker safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains bim-consistency-checker?

It is published by datadrivenconstruction in datadrivenconstruction/ddc_skills_for_ai_agents_in_construction. It has 156 recorded installs.

More from datadrivenconstruction/ddc_skills_for_ai_agents_in_construction

View all →

warranty-tracker

datadrivenconstruction/ddc_skills_for_ai_agents_in_construction

Track and manage construction warranties. Monitor expiration dates, claims, and manufacturer documentation.

AI & Agents996 installs

cad-to-data

datadrivenconstruction/ddc_skills_for_ai_agents_in_construction

Convert CAD/BIM files to structured data. Extract element data from Revit, IFC, DWG, DGN files.

AI & Agents333 installs

dwg-to-excel

datadrivenconstruction/ddc_skills_for_ai_agents_in_construction

Open the skill to read its SKILL.md instructions.

Data & Databases309 installs

drawing-analyzer

datadrivenconstruction/ddc_skills_for_ai_agents_in_construction

Open the skill to read its SKILL.md instructions.

AI & Agents259 installs

permit-tracking-automation

datadrivenconstruction/ddc_skills_for_ai_agents_in_construction

Automate construction permit tracking and management. Monitor application status, track renewal deadlines, manage document requirements, and integrate with municipal systems.

cost-estimation-resource

datadrivenconstruction/ddc_skills_for_ai_agents_in_construction

Calculate construction costs using resource-based method. Estimate project costs from work items, physical resource norms, and current prices.

AI & Agents193 installs

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs