I Encoded the WHS Act 2011 & HSWA 2015 Into an AI Skill

Why I built a Claude Skill that turns a general AI into a credible WHS/OHS professional calibrated to AU/NZ law, and what it taught me about trustworthy AI for safety.

Updated 3 June 20264 min read
  • AI
  • Claude
  • WHS
  • OHS
  • Prompt Engineering
  • AI Skills
Source code for a Claude Skill on a developer's screen

I built a Claude Skill that turns a general-purpose AI into something closer to an experienced WHS/OHS professional, calibrated to Australian and New Zealand regulatory frameworks. The point was not novelty. It was to fix the single most dangerous thing general AI does in a safety context: answer confidently, plausibly, and sometimes wrongly about the law people are relying on.

I have spent a decade in workplace safety. I have investigated critical incidents, run Zero Harm programs, and sat accreditation as an ICAM lead investigator and a certified OHS professional. I also build software. This skill is what happened when those two halves met. Here is what I learned making it.

Why does general AI get safety law wrong?

Ask a general model a WHS question and you will usually get a fluent, well-structured response. The trouble is that fluency is not accuracy. It will cite a section number that does not say what it claims, blend Australian and overseas regimes, or invent a standard outright. In most domains that is annoying. In safety, where someone may act on the answer, it is a hazard.

The instinct is to "prompt better." That helps at the margins, but it does not touch the root cause: the model is reasoning from a fuzzy memory of the law instead of from the law itself.

What I built

A Claude Skill that encodes the frameworks a practitioner actually works from, and the behaviour a practitioner actually needs.

whs-professional-skill/
├── SKILL.md            # role, scope, refusal rules, tone
├── frameworks/
│   ├── whs-act-2011.md       # model WHS Act: duties, primary duty, non-delegation
│   ├── hswa-2015.md          # NZ Health and Safety at Work Act
│   ├── iso-45001.md          # management-system structure
│   └── icam.md               # incident investigation method
└── references/         # regulator guidance, codes of practice

The skill does three things a bare prompt cannot do reliably:

  • Grounds answers in the right framework. It reasons from the encoded Act and practice standards, not from a half-remembered version of them.
  • Scopes itself to AU/NZ. It does not silently apply an overseas regime to an Australian question.
  • Carries its behaviour with it. The role, the tone and the guardrails load every time, instead of depending on whoever wrote the prompt that day.

The hardest part was teaching it to refuse

I expected the law to be the difficult bit. It was not. The difficult bit was restraint.

A useful safety assistant has to know the edges of its own competence. So the skill is built to flag uncertainty rather than paper over it, to defer to a competent person on anything that carries a duty, and to decline to invent regulatory detail when it is not sure. That last behaviour, preferring "I am not certain, verify this against the source" over a confident guess, is what makes the output safe to work with.

If you want to build your own

The pattern generalises to any high-stakes domain. Four moves carried most of the weight:

  1. Encode the primary sources, not summaries. Give the skill the actual frameworks to reason from, and tell it to cite the source it used.
  2. Scope it explicitly. State the jurisdiction and the boundaries, so it refuses to apply the wrong regime.
  3. Write the refusal rules first. Decide what it must decline, what it must flag, and when it must hand back to a human, before you tune anything else.
  4. Keep a human gate on anything that matters. The skill drafts and explains; a competent person verifies and owns the call.

What it is good for, and what it is not

It is good for explaining a duty in plain language, drafting the skeleton of an investigation or a procedure, orienting someone new to the right framework, and acting as a fast, sceptical second set of eyes. It is not for making the call that carries the duty of care. That stays with a competent person, by design and by law.

If you want the bigger picture on where AI helps and where it is dangerous across safety work, I wrote a practitioner's field guide to AI in workplace safety.

Frequently asked questions

Is the skill a substitute for a safety professional?
No, and it is built not to pretend to be. It is a first-pass aid that drafts, explains and points to the right framework. The duty of care and the final decision stay with a competent person.
Why a Claude Skill rather than a custom prompt?
A prompt is fragile and has to be re-pasted every time. A skill packages the instructions, the regulatory scope and the behavioural guardrails so they load consistently, which is exactly what you want when accuracy matters.
How do you stop the skill inventing legislation?
Two mechanisms. It reasons from the encoded primary frameworks rather than the model's memory, and it is instructed to flag uncertainty and decline rather than guess. Grounding fixes where it thinks from; refusal fixes when it stops.
Does encoding the law make the AI legally reliable?
No. It makes it a better-informed first-pass aid. It can still be wrong, and the duty of care stays with a competent person who verifies anything that matters against the primary source.
Can I use it?
Yes, it is on GitHub. Treat its output the way you would treat a capable graduate's: useful, fast and always reviewed before it counts.

More from the blog