Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction --skill clash-detection-analysisgit clone --depth 1 https://github.com/datadrivenconstruction/DDC_Skills_for_AI_Agents_in_ConstructionWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/clash-detection-analysis)<a href="https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/clash-detection-analysis"><img src="https://agentmods.dev/badge/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/clash-detection-analysis/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/clash-detection-analysis"><img src="https://agentmods.dev/badge/skills/datadrivenconstruction/ddc_skills_for_ai_agents_in_construction/clash-detection-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.03656 |
| Opus 5.5 | $0.00013 | $0.01462 |
| Sonnet 5.5 | $0.00007 | $0.00731 |
| Haiku 4.5 | $0.00003 | $0.00366 |
Grade A, and why
clash-detection-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- clash-detection-analysis — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 473 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clash Detection Analysis
Overview
This skill implements automated clash detection for BIM models. Identify conflicts between building elements before construction to prevent costly rework and delays.
Types of Clashes:
- Hard Clash: Physical intersection of elements
- Soft Clash: Clearance/tolerance violations
- Workflow Clash: Scheduling/sequencing conflicts
"Обнаружение коллизий на этапе проектирования может сократить затраты на исправление ошибок до 10 раз по сравнению с исправлением на стройплощадке."
Quick Start
import ifcopenshell
import ifcopenshell.geom
import numpy as np
from itertools import combinations
# Open model
ifc = ifcopenshell.open("model.ifc")
# Get structural and MEP elements
structural = ifc.by_type("IfcColumn") + ifc.by_type("IfcBeam")
mep = ifc.by_type("IfcPipeSegment") + ifc.by_type("IfcDuctSegment")
# Simple bounding box clash check
settings = ifcopenshell.geom.settings()
def get_bbox(element):
try:
shape = ifcopenshell.geom.create_shape(settings, element)
verts = np.array(shape.geometry.verts).reshape(-1, 3)
return verts.min(axis=0), verts.max(axis=0)
except:
return None, None
def check_bbox_clash(bbox1, bbox2):
min1, max1 = bbox1
min2, max2 = bbox2
if min1 is None or min2 is None:
return False
return np.all(max1 >= min2) and np.all(max2 >= min1)
# Find clashes
clashes = []
for s_elem in structural:
for m_elem in mep:
bbox1 = get_bbox(s_elem)
bbox2 = get_bbox(m_elem)
if check_bbox_clash(bbox1, bbox2):
clashes.append({
'element1': s_elem.GlobalId,
'element2': m_elem.GlobalId,
'type': 'Structure-MEP'
})
print(f"Found {len(clashes)} potential clashes")
Clash Detection Engine
Core Detector Class
import ifcopenshell
import ifcopenshell.geom
import numpy as np
import pandas as pd
from dataclasses import dataclass
from typing import List, Dict, Optional, Tuple
from itertools import combinations
from scipy.spatial import cKDTree
@dataclass
class Clash:
element1_id: str
element1_type: str
element1_name: str
element2_id: str
element2_type: str
element2_name: str
clash_type: str
distance: float
location: Tuple[float, float, float]
severity: str
class ClashDetector:
"""Detect clashes between BIM elements"""
def __init__(self, ifc_path: str):
self.model = ifcopenshell.open(ifc_path)
self.settings = ifcopenshell.geom.settings()
self.settings.set(self.settings.USE_WORLD_COORDS, True)
self._geometry_cache = {}
self.clashes: List[Clash] = []
def _get_geometry(self, element):
"""Get or compute element geometry"""
if element.GlobalId in self._geometry_cache:
return self._geometry_cache[element.GlobalId]
try:
shape = ifcopenshell.geom.create_shape(self.settings, element)
verts = np.array(shape.geometry.verts).reshape(-1, 3)
faces = np.array(shape.geometry.faces).reshape(-1, 3)
geom = {
'vertices': verts,
'faces': faces,
'min': verts.min(axis=0),
'max': verts.max(axis=0),
'center': verts.mean(axis=0)
}
self._geometry_cache[element.GlobalId] = geom
return geom
except:
return None
def detect_hard_clashes(self, group1_types: List[str],
group2_types: List[str]) -> List[Clash]:
"""Detect hard clashes (physical intersections) between two groups"""
group1 = []
for ifc_type in group1_types:
group1.extend(self.model.by_type(ifc_type))
group2 = []
for ifc_type in group2_types:
group2.extend(self.model.by_type(ifc_type))
clashes = []
for elem1 in group1:
geom1 = self._get_geometry(elem1)
if geom1 is None:
continue
for elem2 in group2:
if elem1.GlobalId == elem2.GlobalId:
continue
geom2 = self._get_geometry(elem2)
if geom2 is None:
continue
# Bounding box check (fast filter)
if not self._bbox_intersect(geom1, geom2):
continue
# Detailed check
intersection = self._check_intersection(geom1, geom2)
if intersection['intersects']:
clash = Clash(
element1_id=elem1.GlobalId,
element1_type=elem1.is_a(),
element1_name=elem1.Name or '',
element2_id=elem2.GlobalId,
element2_type=elem2.is_a(),
element2_name=elem2.Name or '',
clash_type='Hard',
distance=intersection['distance'],
location=tuple(intersection['point']),
severity=self._classify_severity(intersection['distance'])
)
clashes.append(clash)
self.clashes.extend(clashes)
return clashes
def detect_soft_clashes(self, group1_types: List[str],
group2_types: List[str],
clearance: float = 0.1) -> List[Clash]:
"""Detect soft clashes (clearance violations)"""
group1 = []
for ifc_type in group1_types:
group1.extend(self.model.by_type(ifc_type))
group2 = []
for ifc_type in group2_types:
group2.extend(self.model.by_type(ifc_type))
clashes = []
for elem1 in group1:
geom1 = self._get_geometry(elem1)
if geom1 is None:
continue
for elem2 in group2:
if elem1.GlobalId == elem2.GlobalId:
continue
geom2 = self._get_geometry(elem2)
if geom2 is None:
continue
# Check if within clearance distance
distance = self._min_distance(geom1, geom2)
if distance < clearance and distance > 0:
clash = Clash(
element1_id=elem1.GlobalId,
element1_type=elem1.is_a(),
element1_name=elem1.Name or '',
element2_id=elem2.GlobalId,
element2_type=elem2.is_a(),
element2_name=elem2.Name or '',
clash_type='Soft',
distance=distance,
location=tuple((geom1['center'] + geom2['center']) / 2),
severity='Medium' if distance < clearance/2 else 'Low'
)
clashes.append(clash)
self.clashes.extend(clashes)
return clashes
def _bbox_intersect(self, geom1: Dict, geom2: Dict) -> bool:
"""Check if bounding boxes intersect"""
return (np.all(geom1['max'] >= geom2['min']) and
np.all(geom2['max'] >= geom1['min']))
def _check_intersection(self, geom1: Dict, geom2: Dict) -> Dict:
"""Check for actual geometry intersection"""
# Simplified check using closest points
tree1 = cKDTree(geom1['vertices'])
distances, _ = tree1.query(geom2['vertices'], k=1)
min_dist = distances.min()
if min_dist < 0.001: # Intersection threshold
intersection_idx = np.argmin(distances)
return {
'intersects': True,
'distance': min_dist,
'point': geom2['vertices'][intersection_idx]
}
return {'intersects': False, 'distance': min_dist, 'point': None}
def _min_distance(self, geom1: Dict, geom2: Dict) -> float:
"""Calculate minimum distance between geometries"""
tree1 = cKDTree(geom1['vertices'])
distances, _ = tree1.query(geom2['vertices'], k=1)
return distances.min()
def _classify_severity(self, distance: float) -> str:
"""Classify clash severity"""
if distance < 0.01:
return 'Critical'
elif distance < 0.05:
return 'High'
elif distance < 0.1:
return 'Medium'
else:
return 'Low'
def get_clash_report(self) -> pd.DataFrame:
"""Generate clash report as DataFrame"""
if not self.clashes:
return pd.DataFrame()
return pd.DataFrame([
{
'Element1_ID': c.element1_id,
'Element1_Type': c.element1_type,
'Element1_Name': c.element1_name,
'Element2_ID': c.element2_id,
'Element2_Type': c.element2_type,
'Element2_Name': c.element2_name,
'Clash_Type': c.clash_type,
'Distance_m': c.distance,
'Location_X': c.location[0],
'Location_Y': c.location[1],
'Location_Z': c.location[2],
'Severity': c.severity
}
for c in self.clashes
])
def get_summary(self) -> Dict:
"""Get clash detection summary"""
df = self.get_clash_report()
if df.empty:
return {'total': 0}
return {
'total': len(self.clashes),
'by_type': df['Clash_Type'].value_counts().to_dict(),
'by_severity': df['Severity'].value_counts().to_dict(),
'critical_count': len(df[df['Severity'] == 'Critical']),
'element_types_involved': df['Element1_Type'].unique().tolist() +
df['Element2_Type'].unique().tolist()
}
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 473 lines · 33 tokens per session scan A 6071a070fb8b
clash-detection-analysis is a skill published in the GitHub repository datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction (374 stars, last pushed 8d ago), licensed MIT. It adds 33 tokens to every session and 3,656 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
log-analyzer
A log-analysis helper that reads application and system logs to find unusual patterns and likely causes. Logs are records of events such as errors, requests, warnings, and service activity.
shiny-py-optimize
Diagnose and fix performance problems in Shiny for Python apps — slow startup, sluggish interactions, blocking operations, and apps that struggle beyond a handful of concurrent users. Use when a Shiny for Python app is slow, hangs, recomputes too much, times out, or must support more users; when the user asks to…
code-review-web
Review web application code for bugs, security issues, performance problems, and stack-specific anti-patterns. Use this skill whenever the user wants to review code, debug a production issue, investigate a build failure, audit security, or check a PR before merging. Triggers on code review, review my code, debug…
mcp-maintainer
Operate and maintain the local MCP server for this repository. Use for MCP tool updates, policy-guard changes, host configuration, and MCP runtime troubleshooting.
022-root-cause-analysis
Use when a framed problem needs root-cause investigation rather than a symptom-level fix, applying Five Whys, Fishbone (Ishikawa), Current Reality Tree, and constraint identification. This should trigger when an issue's Root Cause Analysis point of view needs evaluation, or when a maintainer directly asks to find the…
126-java-exception-handling
Use when you need to apply Java exception handling best practices — including using specific exception types, managing resources with try-with-resources, securing exception messages, preserving error context via exception chaining, validating inputs early with fail-fast principles, handling thread interruption…