legal-check

legal-check is a command for Claude Code from hamza-ali-shahjahan/hamzaish. It costs 89 tokens per session (1,430 once invoked), scanned A, original, MIT.

A code and product check for six specific legal launch risks, including missing age gates, privacy-related tracking, marketing email rules, subscription renewal terms, and copyright takedown requirements.

In plain words
What is it for?
Use it to scan a product repository for the listed legal traps and distinguish real findings from pattern-matching noise. It can also target one product or scan all configured products.
Why use it?
It helps find compliance problems that can be missed before a product launches. By default it reports findings without changing the code; an optional fix mode works on a branch and opens a pull request.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; positional $N argument.

Good fit Use it to scan a product repository for the listed legal traps and distinguish real findings from pattern-matching noise. It can also target one product or scan all configured products.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hamza-ali-shahjahan/hamzaish/legal-check
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.

Clone the repo
git clone --depth 1 https://github.com/hamza-ali-shahjahan/hamzaish

Made for: Claude Code.

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 legal-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/hamza-ali-shahjahan/hamzaish/legal-check/github.svg)](https://agentmods.dev/commands/hamza-ali-shahjahan/hamzaish/legal-check)
Your own site
<a href="https://agentmods.dev/commands/hamza-ali-shahjahan/hamzaish/legal-check"><img src="https://agentmods.dev/badge/commands/hamza-ali-shahjahan/hamzaish/legal-check/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 legal-check

Your own site · 80×15
<a href="https://agentmods.dev/commands/hamza-ali-shahjahan/hamzaish/legal-check"><img src="https://agentmods.dev/badge/commands/hamza-ali-shahjahan/hamzaish/legal-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,430 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.00089 $0.01430
Opus 5.5 $0.00036 $0.00572
Sonnet 5.5 $0.00018 $0.00286
Haiku 4.5 $0.00009 $0.00143

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

Security

Grade A, and why

legal-check 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 16d 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.

factory/commands/legal-check.md · 99 lines

How it starts

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

The user invoked: /legal-check $ARGUMENTS

Six legal traps ship by default in AI-built apps, each fined per child, visitor, session, email, renewal or work — how zero sales becomes a six-figure exposure. This command finds them, separates real ones from regex noise, and (with --fix) fixes the real ones on a branch and opens a PR. Knowledge: factory/playbooks/launch-stage/legal-launch-traps.md (read it first — it holds each fix and its "done when" test). Detection only, with no fixing, also runs inside /security-check § 7a and blocks /ship.

Resolve the target(s)

  • <slug> → ${HAMZAISH_ROOT:-$HOME/Claude/Hamzaish}/code-paths.local.json → the product's code path.
  • A path → use it directly (works on any repo, Hamzaish-built or not).
  • --all → every product in code-paths.local.json. Several products? Run one worker per product in parallel when subagents are available, each with only its own repo (factory/playbooks/mvp-stage/fleet-patterns.md); serial is fine otherwise.
  • Nothing given → ask which product.

1 · Scan

bun ${HAMZAISH_ROOT:-$HOME/Claude/Hamzaish}/scripts/check-legal-traps.ts <code_path>

Exit 1 only means a FAIL was found.

2 · Verify every FAIL and WARN — the scanner is regex, you are the judge

Open each evidence file:line and decide if the trap is real. Common false calls: seed/demo data and tool catalogs that merely name Hotjar or "newsletter"; a pricing mock with no real checkout; a file input that only reads a CSV in the browser; a "Sign up" link to a page that doesn't exist. Common misses: signup through server actions or custom email-code auth, a font URL built in JS, a replay snippet in index.html, a subscription via a payment link.

Also note what the repo is: a deployed product, a prototype, a CLI, a skills-only repo, or a game. And whether it could be directed at children: an age gate does not satisfy COPPA for a child-directed service, so flag that for the operator, don't "fix" it.

Read the full file on GitHub · 99 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. 16d ago First seen · 99 lines · 89 tokens per session scan A 54d7f89fa4cf

Subscribe to this mod's changes

legal-check is a command published in the GitHub repository hamza-ali-shahjahan/hamzaish (11 stars, last pushed 16d ago), licensed MIT. It adds 89 tokens to every session and 1,430 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-08.