loophole-hunter

loophole-hunter is a skill for Claude Code from ihabkhaled/AI-Psychiatry. It costs 36 tokens per session (651 once invoked), scanned A, a copy of anti-gaming, MIT.

A review guide for spotting cases where an AI agent follows the wording of a rule but avoids its intended result.

In plain words
What is it for?
Auditing suspicious resets, relabeling, budget changes, and requests related to AI-Psychiatry.
Why use it?
It helps distinguish genuine compliance from rule gaming by checking observable actions and their history.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: $skill-name invocation.

Part of the ai-psychiatry plugin — 55 skills shipped together

Good fit Auditing suspicious resets, relabeling, budget changes, and requests related to AI-Psychiatry.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ihabkhaled/ai-psychiatry/loophole-hunter
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 ihabkhaled/AI-Psychiatry --skill loophole-hunter
Clone the repo
git clone --depth 1 https://github.com/ihabkhaled/AI-Psychiatry

Made for: Claude Code.

Or install ai-psychiatry, the plugin that ships this one along with the rest of its 55 skills.

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 loophole-hunter

README.md
[![agentmods](https://agentmods.dev/badge/skills/ihabkhaled/ai-psychiatry/loophole-hunter/github.svg)](https://agentmods.dev/skills/ihabkhaled/ai-psychiatry/loophole-hunter)
Your own site
<a href="https://agentmods.dev/skills/ihabkhaled/ai-psychiatry/loophole-hunter"><img src="https://agentmods.dev/badge/skills/ihabkhaled/ai-psychiatry/loophole-hunter/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 loophole-hunter

Your own site · 80×15
<a href="https://agentmods.dev/skills/ihabkhaled/ai-psychiatry/loophole-hunter"><img src="https://agentmods.dev/badge/skills/ihabkhaled/ai-psychiatry/loophole-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 651 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 89% copy Near-identical to another mod 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.00036 $0.00651
Opus 5 $0.00018 $0.00326
Sonnet 5 $0.00007 $0.00130
Haiku 4.5 $0.00004 $0.00065

Measured 12d ago against content hash e173d100adf1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

loophole-hunter 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 12d 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.

Origin

This is a copy

89% identical to anti-gaming — 14 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.ai/skills/loophole-hunter/SKILL.md · 45 lines

How it starts

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

Loophole Hunter

Core principle

Semantic compliance is stronger than literal compliance. Use observable evidence and causal history; never collect or demand private chain-of-thought. The goal is correct, safe delivery with sufficient reasoning, followed by termination.

Procedure

  1. Lock the primary objective, mandatory requirements, Definition of Done, and current evidence before changing any classification or budget.
  2. Identify the specific observable signal. Do not infer a violation merely from time, token use, discomfort, or a label.
  3. Audit observed action history against the loophole catalog. Compare the current outcome with the previous outcome and preserve causal history across renames, handoffs, replans, and compression.
  4. Produce the compact record: Loophole -> Example -> Risk -> Detection -> Strict Rule -> Recovery. Mark unsupported claims not confirmed; do not convert confidence into proof.
  5. Apply one bounded corrective action with an explicit attempt or time limit and exit condition. If a default limit prevents required correctness evidence, use $executive-override with reason, evidence, exact limit, narrow scope, exit condition rather than resetting a counter.
  6. Revalidate only the affected requirement or policy. Report a finite list of evidenced loopholes and patched controls and return to productive work.

Repository runtime

Apply this procedure inside the installed .ai/ framework. Record observable state in the relevant JSON ledger and route detailed judgment to the linked rules and guides.

Semantic boundaries

  • System, platform, user, repository, domain, safety, security, permission, and destructive-action controls remain higher priority.
  • Equivalent actions share history when their hypothesis, expected evidence, target failure, and intended outcome are unchanged.
  • Preserve immutable parent, caused-by, and delegated-from identifiers across handoffs and context compression; missing ancestry makes depth not confirmed, never zero.
  • Activity alone is not progress. Completion and blockers require their structured evidence contracts.
  • Critical correctness evidence cannot be discarded because a retry, critic, verification, context, or delegation budget expired.
  • Security-negative cases are selected from explicit requirements and the observed trust boundary (identity, permission, ownership/tenant, denial response, and side effects). An agent may mark a case inapplicable only with evidence, not by shrinking Definition of Done.
  • An override permits one extension only. Do not renew or stack overrides unless materially new evidence justifies a separately recorded override; repeated renewal without convergence must stop and report the unresolved condition.

Read the full file on GitHub · 45 lines

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. 12d ago First seen · 45 lines · 36 tokens per session scan A e173d100adf1

Subscribe to this mod's changes

loophole-hunter is a skill published in the GitHub repository ihabkhaled/AI-Psychiatry (3 stars, last pushed 27d ago), licensed MIT. It adds 36 tokens to every session and 651 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to anti-gaming, differing in 14 lines, and is treated as a copy.

Related

Other skills, from other repositories

open-weights

Use when choosing an open-weight LLM and clearing it for use — which family and size fit the task, the hardware and the budget, and above all whether the license permits shipping. Owns the license-class map (OSI-open versus custom-community versus non-commercial), the always-verify-the-model-card rule, size-to-VRAM…

ericrisco/rsc-harness · 146 tokens

contracts

Use when drafting or reviewing business contracts and clauses in plain language — NDAs, MSAs, SOWs, contractor agreements, risk boilerplate (liability caps, indemnity, force majeure, termination, IP) — or redlining a counterparty's paper. NOT consumer Terms of Service (that is terms-conditions) and NOT the signing…

ericrisco/rsc-harness · 80 tokens

data-policy

Use when building internal data-governance machinery: a retention schedule (period, lawful basis, expiry action, system where deletion runs), an Art. 6 lawful-basis register, an Art. 30 ROPA, or a consent capture/withdrawal model. NOT the public privacy notice or DSAR handling (that is gdpr-privacy), NOT SOC 2 posture…

ericrisco/rsc-harness · 88 tokens

e-signature

Use when wiring an e-signature flow with DocuSign or Dropbox Sign — picking the SES/AES/QES legal tier, sending a PDF or template for signature, embedded signing, verifying signing webhooks, retrieving the signed PDF plus audit trail. NOT drafting contract text (that is contracts), NOT extracting fields from PDFs…

ericrisco/rsc-harness · 77 tokens

hiring

Use when a role is open and you must write the job post, screen inbound candidates, structure the interview loop, or score them to a defensible Hire / On-Hold / No-Hire — including whether an AI résumé filter is legal. NOT after the offer is accepted — onboarding, payroll, performance (that is people-ops), NOT offer…

ericrisco/rsc-harness · 82 tokens

compliance

Use when scoping which regulatory frameworks bind a business — SOC 2, ISO 27001, HIPAA, PCI DSS, EU AI Act, DORA, NIS2 — building a control register with owners and evidence, or standing up the cadence that keeps it audit-ready. NOT drafting privacy-policy/ROPA/DPA or ToS text (that is gdpr-privacy, terms-conditions)…

ericrisco/rsc-harness · 96 tokens