ai-act-scan-fix

ai-act-scan-fix is a command for Claude Code from Peaky8linders/eu-ai-act-scanner. It costs 43 tokens per session (1,366 once invoked), scanned A, original, Apache-2.0.

A command that scans a codebase for gaps related to the European Union Artificial Intelligence Act and proposes fixes. It shows a remediation plan before making any changes, and stops when the project is not identified as an AI system.

In plain words
What is it for?
Use it to select the top compliance gaps and describe the missing controls, relevant law articles, proposed code or file changes, and needed tests.
Why use it?
It turns compliance findings into specific engineering work without writing unsupported compliance evidence or changing files automatically. This helps teams focus on the most important gaps first.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: positional $N argument; mentions Claude Code.

Good fit Use it to select the top compliance gaps and describe the missing controls, relevant law articles, proposed code or file changes, and needed tests.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/peaky8linders/eu-ai-act-scanner/ai-act-scan-fix
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/Peaky8linders/eu-ai-act-scanner

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 ai-act-scan-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/peaky8linders/eu-ai-act-scanner/ai-act-scan-fix/github.svg)](https://agentmods.dev/commands/peaky8linders/eu-ai-act-scanner/ai-act-scan-fix)
Your own site
<a href="https://agentmods.dev/commands/peaky8linders/eu-ai-act-scanner/ai-act-scan-fix"><img src="https://agentmods.dev/badge/commands/peaky8linders/eu-ai-act-scanner/ai-act-scan-fix/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 ai-act-scan-fix

Your own site · 80×15
<a href="https://agentmods.dev/commands/peaky8linders/eu-ai-act-scanner/ai-act-scan-fix"><img src="https://agentmods.dev/badge/commands/peaky8linders/eu-ai-act-scanner/ai-act-scan-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 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,366 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.00043 $0.01366
Opus 5 $0.00022 $0.00683
Sonnet 5 $0.00009 $0.00273
Haiku 4.5 $0.00004 $0.00137

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

Security

Grade A, and why

ai-act-scan-fix 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 11d 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.

commands/ai-act-scan-fix.md · 91 lines

How it starts

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

/ai-act-scan-fix

Run /ai-act-scan, then build a remediation plan for the top compliance gaps.

Arguments

  • $1 (optional) — path to scan. Defaults to the current directory.
  • --top N (default 3) — number of gaps to remediate.

Behaviour

  1. Invoke the scanner as in /ai-act-scan. If the result has is_ai_system: false, stop: the project is not an AI system (EU AI Act Art. 3(1)), so there is nothing to remediate. Surface scope_note and do not propose any fixes — writing compliance "evidence" into a non-AI project fabricates a story the Regulation does not ask for. (The eu-ai-act-fix CLI enforces this automatically: it short-circuits and writes nothing.)
  2. Select the top N gap findings by (low score × article weight). Prioritisation order when scores are tied:
    1. risk_mgmt (Art. 9) — foundational, blocks conformity assessment
    2. data_gov (Art. 10) — training-data provenance affects all downstream
    3. human_oversight (Art. 14) — hard legal requirement for high-risk
    4. logging (Art. 12) — auditability
    5. Everything else
  3. For each selected gap, produce a remediation proposal:
    • What: one-sentence description of the missing control
    • Article: the obligation driving the fix (e.g. Art. 14(1))
    • Where: specific file path(s) to create or edit
    • What to add: concrete code / YAML / markdown snippet
    • Verification: how the scanner would recognise the fix on a re-scan
  4. Show the plan. Do NOT apply edits yet. Ask the user which proposals to apply. Then:
    • Apply approved proposals one at a time
    • Re-run the scanner after each fix
    • Report the delta in compliance score per dimension
  5. If the user says "apply all", still apply serially and re-scan between fixes so regressions are caught early.

Remediation pattern library

When proposing fixes, lean on these canonical patterns — they are what the scanner's analyzers are looking for:

Gap dimension Minimal evidence the scanner will accept
logging structlog or logging.getLogger() with correlation IDs, OR MLflow run tracking
human_oversight A function/decorator named human_review, approval_gate, confidence_threshold, or human_in_the_loop
tech_docs A README.md with ≥5 sections covering purpose, data, risks, monitoring, and contacts; or a MODEL_CARD.md
test_suite A tests/ directory with pytest files covering model behaviour (not just unit tests on utils)
data_gov A DATA_CARD.md or docs/data/ describing sources, collection, bias assessment
security_controls Auth middleware, rate limiting, input validation on any AI-serving endpoint
fairness_testing Tests that import aif360, fairlearn, or compute disparate-impact metrics
transparency / content_transparency (Art. 50) An AI-interaction disclosure string ("you are chatting with an AI"), a C2PA / watermark / SynthID marking call on generated output, an emotion/biometric exposure notice, or a visible "AI-generated" deep-fake label

Read the full file on GitHub · 91 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. 11d ago First seen · 91 lines · 43 tokens per session scan A da1c9f572df0

Subscribe to this mod's changes

ai-act-scan-fix is a command published in the GitHub repository Peaky8linders/eu-ai-act-scanner (5 stars, last pushed 4d ago), licensed Apache-2.0. It adds 43 tokens to every session and 1,366 once invoked, about $0.0002 per session on Opus 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-08-31.