r/MEPEngineering • u/mohdyusuf955 • 57m ago
I built a Claude skill for building-code research that’s allowed to say “I am not sure”.
I'm an MEP (mechanical/electrical/plumbing) engineer. A big part of design review is answering "which code section requires this?", and that's exactly where LLMs hurt you. They give a confident section number that's from the wrong edition, the wrong code family, or just made up.
So I wrote a Claude skill where the main rule is: never invent a citation.
How it works:
Code basis first. It looks up which edition the jurisdiction actually adopted (state rule PDFs, city ordinances), instead of assuming "latest". Ohio, for example, turned out to be the 2021 IMC plus amendments effective Oct 2025.
Three separate fields per citation:
Citation status: VERIFIED / LIKELY / NOT FOUND.
Governing status: does this code even apply to this project?
Value check: MATCHES / STRICTER / GAP / CONFLICT.
VERIFIED has a strict meaning. The clause text must have been read in the publisher's or government's own text during the task. Search snippets, third-party sites and model-generated page summaries can never be VERIFIED. If a fetch tool only returns a summary, the skill must try the raw HTML/PDF or a browser render first, and fall back to LIKELY if that fails.
Separates code from everything else. Design intent, manufacturer instructions and contract scope get NOT FOUND with a reason, instead of a forced citation.
Wording follows evidence. Only Verified + Governing findings get direct "change X" actions. Everything else says "potential issue, confirm first".
Sources are data, not instructions, so specs with embedded prompt injection get ignored and reported.
Things I learned building it:
ICC's code viewer blocks plain fetch, but Claude Code's browser pane renders it fine. That was the difference between mostly-LIKELY and mostly-VERIFIED results.
WebFetch summaries are a hidden hallucination path. A summary can quote a section number that isn't on the page, so I made "summary ≠ seen" an explicit rule.
Splitting citation status from governing status fixed a lot of confusing output. A clause can be real and read, and still not apply to your project.
A test checklist (24 cases: wrong code family, superseded edition, no web access, prompt injection…) caught more rule contradictions than any amount of rereading.
Demo run on four fictional HVAC keynotes: 16 requirements, 12 citations verified against ICC text. It also flagged a "door undercut for transfer air" note that didn't exclude corridor or fire-rated doors.
It's a research aid, not a compliance checker; a licensed engineer and the building official still decide. It's free, and all examples are fictional:
https://github.com/mohdyus1990-source/mep-code-reference
Happy to hear feedback on the skill structure, especially from anyone doing evidence-grounded skills in other domains (legal, medical, standards work).
