harm-case

harm-case is a skill for Claude Code, Codex from arunveersingh/ai. It costs 105 tokens per session (1,114 once invoked), scanned A, original, Apache-2.0.

A testing method checks an AI system against the specific harmful mistake it could make, rather than relying only on its average evaluation score. It adds focused cases for that harm and requires zero misses on them.

In plain words
What is it for?
It helps define harm cases, find gaps in an evaluation set, and assess prompt or model changes. It is suited to AI steps that route, approve, deny, or otherwise affect customers.
Why use it?
A high overall score can hide rare errors that seriously affect people. This method makes the feared failure visible and compares the old and new system on both general quality and the harm-focused cases.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps define harm cases, find gaps in an evaluation set, and assess prompt or model changes. It is suited to AI steps that route, approve, deny, or otherwise affect customers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arunveersingh/ai/day-15-harm-case
Install

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.

Any agent
npx skills add arunveersingh/ai --skill day-15-harm-case
Clone the repo
git clone --depth 1 https://github.com/arunveersingh/ai

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for harm-case

README.md
[![agentmods](https://agentmods.dev/badge/skills/arunveersingh/ai/day-15-harm-case/github.svg)](https://agentmods.dev/skills/arunveersingh/ai/day-15-harm-case)
Your own site
<a href="https://agentmods.dev/skills/arunveersingh/ai/day-15-harm-case"><img src="https://agentmods.dev/badge/skills/arunveersingh/ai/day-15-harm-case/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.

agentmods 80×15 button for harm-case

Your own site · 80×15
<a href="https://agentmods.dev/skills/arunveersingh/ai/day-15-harm-case"><img src="https://agentmods.dev/badge/skills/arunveersingh/ai/day-15-harm-case.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.01114
Opus 5.5 $0.00042 $0.00446
Sonnet 5.5 $0.00021 $0.00223
Haiku 4.5 $0.00011 $0.00111

Measured 9d ago against content hash 36533cc88718, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

harm-case 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 9d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (harm_check.py, make_demo_results.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

courses/make-ai-fail-safely/practice/day-15-harm-case/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Harm case

A support-triage step routes messages into five queues. The eval is 1,000 messages labelled by the ops team; the ship bar is 92% accuracy. Prompt v3 scores 91%. v4 adds "if the customer asks for money back, use REFUND" and scores 94%, so it ships. But people reporting fraud write "I never made this payment, I want my money back": v4 sends 18 of the 30 unauthorised-payment reports to the wrong queue (v3 missed 3). Under PSD2 those need a refund by the end of the next business day. The misses were in the results all along; accuracy counted each one as one wrong label, like any other.

Passing is not measuring. Score the harm you fear, not the average.

Part A — Ask (project rules, or paste after your ticket)

Before you change a prompt, model or eval for an AI step:
1. HARM: the one production failure that would hurt a customer most, in one line.
2. CATCH: which current eval case or check fails if that harm happens. If none, say NONE.
3. If NONE, propose cases that fail exactly when the harm happens. I'll label them.
   Score them on their own line, zero misses, and failing them fails the suite.
4. Report both lines for the old and new version:
   OVERALL <score> vs <bar> | HARM <caught>/<total> (misses went to: ...)
Never call a change better on OVERALL alone.
If HARM fails, stop and reply: HARM FAIL | misses | change that caused it.

In an orchestrated flow (spec → plan → tasks → implement): write each AI step's feared harm in one line in the spec; make the harm cases and their gate the first plan task for that step, labelled by the people who handle the harm; show OVERALL and HARM before and after in every task review.

Part B — Check (you do this)

harm_check.py has no dependencies. It reads any labelled results file (id,expected,predicted) and prints an OVERALL line against your existing bar and a HARM line for the label whose misses are the harm. Replay the story on made-up results:

python3 make_demo_results.py      # results_v3.csv 910/1000, results_v4.csv 940/1000, results_v5.csv 956/1000
python3 harm_check.py results_v4.csv --must-catch UNAUTHORISED --before results_v3.csv
# before  OVERALL 910/1000 = 91.0%  bar 92.0%  FAIL
#         HARM    UNAUTHORISED caught 27/30  misses 3 (went to: REFUND 2, GENERAL 1)  FAIL
# after   OVERALL 940/1000 = 94.0%  bar 92.0%  PASS
#         HARM    UNAUTHORISED caught 12/30  misses 18 (went to: REFUND 16, GENERAL 2)  FAIL
# VERDICT LYING: the suite passes while the harm you fear happens 18 times. Don't ship.   (exit 1)
python3 harm_check.py results_v5.csv --must-catch UNAUTHORISED --before results_v4.csv
# after   OVERALL 956/1000 = 95.6%  ...  HARM caught 30/30 ... PASS  ->  VERDICT both pass.  (exit 0)

Read the full file on GitHub · 55 lines

Files

What ships with it

5 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.

Changes

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.

  1. 9d ago First seen · 55 lines · 105 tokens per session scan A 36533cc88718

Subscribe to this mod's changes

harm-case is a skill published in the GitHub repository arunveersingh/ai (3 stars, last pushed 3d ago), licensed Apache-2.0. It adds 105 tokens to every session and 1,114 once invoked, about $0.0004 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-10-17.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens

skill-benchmark

Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.

HoangNguyen0403/agent-skills-standard · 16 tokens