本文へ移動
cccskills
無料GitHub で公開

sanctions-screening

Screen a client, counterparty, payer or corporate against the sanctions lists published by the designating authorities themselves — the UK Sanctions List (FCDO), OFSI, the UN Security Council, the EU consolidated list and OFAC's SDN and non-SDN lists. Use when onboarding, before taking a payment, before completing a transaction, or whenever a name must be checked against sanctions. Produces candidates and provenance, never a clearance: the record names every list searched with its publication date and count, states what was NOT searched, and ends at a blank decision block. Fails closed — a cache that is missing, damaged, truncated or stale is reported NOT SEARCHED and the process exits non-zero, so nothing can read an incomplete run as clean. Matches across transliteration, diacritics, homoglyphs and initials, because nobody spells a name the way the publisher does. Standard library only; screening opens no network connection.

インストール方法を見る

含まれるファイル(15)

  • SKILL.md12.9 KB
  • LICENSE1.9 KB
  • matching.py27.2 KB
  • README.md5.7 KB
  • reference/sources.md7.5 KB
  • screen.py71.5 KB
  • sources.py96.2 KB
  • TESTING.md94.2 KB
  • tests/adversarial.py98.5 KB
  • tests/benchmark.py10.1 KB
  • tests/integrity.py40.7 KB
  • tests/prefilter_safety.py2.8 KB
  • tests/release_gate.py8.7 KB
  • tests/test_screen.py26.5 KB
  • tests/threshold_sweep.py2.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Open-source sanctions screening

Three Python files, standard library only. No install step, no API key, no account, and no third-party screening vendor in the path — so there is no per-search cost and no reason to leave anybody unscreened.

The tool produces candidates and provenance. It never clears anybody. The comparison of a candidate against what is actually known of the subject, the decision that follows, and the record of that decision belong to the fee earner.

Running it

python3 screen.py refresh                       # fetch + parse the default six lists (~30s)
python3 screen.py status                        # freshness, designation counts, failures
python3 screen.py sources                       # the registry, coverage and licences

python3 screen.py check "Ivan Petrov" --dob 1975-03-02 --nationality Russia
python3 screen.py check "Acme Trading LLC" --type entity --threshold 80
python3 screen.py check "Ramzan Kadyrov" --dob 05/10/1976 \
    --client MATTER-2026-0099 --matter "immigration advice" \
    --report ./screening/kadyrov-2026-09-01.md

python3 screen.py batch subjects.csv --report-dir ./screening/   # name,dob,nationality,type,client,matter

Exit codes: 0 complete search and nothing found, 2 candidates, 3 the search cannot be relied on, 4 the request was refused.

Switches: --source uk-sanctions-list,ofsi (restrict, or reach the non-default lists), --threshold (default 88 — see below), --include-delisted, --max-age-hours (default 24), --strict, --json, --verbose.

The default threshold is set from measurement. Recall is identical at every cut-off from 85 to 92 (99.7%) while false positives fall from 20% to 2%, and no true match scored between 85 and 92. Lower it to 82 to catch a query as thin as an initial plus one name, at a 40% false-positive rate; raise it to 92 for a first pass over a large book of clients.

Requires Python 3.11 or later (3.9 parses but is not tested). Nothing else. The cache lives in ~/.claude/sanctions-data (override with SANCTIONS_DATA) and is about 100 MB for the eight government lists; a run holds roughly 230 MB in memory while scanning.

The completeness gate

Every route out of this tool — text, JSON, a written record, a batch summary, an exit code — is rendered from one Outcome object, and an Outcome knows whether the search was complete. There is no path that reports "nothing found" without also carrying whether anything was actually searched.

A search is complete only if the request was valid and every list asked for was read in full, matched the digest recorded when it was fetched, and is current. Anything else is incomplete, and an incomplete search never exits 0.

ExitMeaning
0Complete search, no candidate at or above the threshold
2Candidates to consider
3The search cannot be relied on — a list was missing, damaged, altered, short, stale or never fetched
4The request itself was refused — an unusable option, a name with nothing searchable in it, a CSV with no name column

The cache is bound to its metadata by digest and parser version, so a list that has been altered, truncated or parsed by a different version of this code is refused rather than searched. Upgrading the tool therefore requires a refresh — that is the gate working, not a fault.

The lists

idListAuthorityDefault
uk-sanctions-listUK Sanctions ListFCDO✓
ofsiConsolidated List of Financial Sanctions TargetsHM Treasury / OFSI✓
unSecurity Council Consolidated ListUnited Nations✓
euConsolidated financial sanctions listEuropean Commission✓
ofac-sdnSpecially Designated NationalsUS Treasury / OFAC✓
ofac-consConsolidated non-SDN (SSI, FSE, NS-PLC, CAPTA)US Treasury / OFAC✓
canadaSEMA / JVCFOA consolidated listGlobal Affairs Canada
swissSECO sanctions listSwiss Confederation
opensanctions-sanctions~90 sources, deduplicatedOpenSanctions (aggregator)
opensanctions-pepsPolitically exposed personsOpenSanctions (aggregator)

The UK Sanctions List and the OFSI list are not the same thing and neither subsumes the other: the FCDO list is the legal list and carries every measure imposed (travel ban, arms, trade, transport, director disqualification), while the OFSI list carries the financial-sanctions targets and the asset-freeze detail. Both are searched by default.

The OpenSanctions datasets are CC BY-NC 4.0. Screening fee-earning client work is commercial use. Those two sources refuse to refresh until SANCTIONS_OPENSANCTIONS_LICENCE is set — set it to noncommercial for genuinely non-commercial work, or to your commercial licence reference once one is held. They are also the only PEP source here.

Per-source detail, quirks and failure modes: reference/sources.md.

What the law requires, and of whom

Verified against the in-force text on legislation.gov.uk on 02.09.2026. This is a UK-facing tool; practitioners elsewhere should read the equivalents.

The prohibitions reach the work, whoever the client is. UK regimes are made under the Sanctions and Anti-Money Laundering Act 2018 s.1, and s.21(1) sets their reach: prohibitions may be imposed in relation to conduct in the United Kingdom or its territorial sea by any person, and to conduct elsewhere only where it is by a United Kingdom person — s.21(2)-(3): a UK national (a British citizen, British overseas territories citizen, British National (Overseas) or British Overseas citizen, a British subject under the British Nationality Act 1981, or a British protected person), or a body incorporated or constituted under the law of any part of the UK. Read the two limbs separately. Limb (a) catches everything done in this jurisdiction whoever does it, so it reaches work carried out here regardless of counsel's nationality. Limb (b) reaches conduct abroad only if the actor is a United Kingdom person: practising here does not by itself make a foreign national one, though a UK-incorporated entity is one whatever the nationality of those behind it. Dealing with a designated person's funds, or making funds or economic resources available to or for the benefit of one, is prohibited by the regime regulations themselves. There is no client-type threshold and no de minimis, so this catches a fee taken from a third-party payer as readily as a corporate retainer.

Much litigation practice sits outside the MLR customer due diligence duty. An "independent legal professional" is defined in reg 12(1) of the Money Laundering Regulations 2017 (SI 2017/692) by reference to participation in financial or real property transactions — buying and selling property or business entities, managing client money or assets, opening or managing accounts, organising company contributions, and creating or managing trusts and companies. The test is what the retainer involves, not what the practice area is called: ordinary criminal, extradition and immigration advocacy will not usually engage that limb, but a matter that turns on any of those transactions does, whatever it is filed under. Where it is engaged, reg 33(1)(d) and reg 35 make PEP status an enhanced due diligence trigger (a trigger, never a prohibition), and reg 40(2)(a) with reg 40(3) require the CDD material to be kept for five years — running from the end of the business relationship for a relationship (reg 40(3)(b)), but from completion of the transaction for an occasional transaction (reg 40(3)(a)), which is the limb a one-off retainer falls into. Reg 40(4) caps relationship records at ten years, and reg 40(5) requires the personal data to be deleted once the period expires unless another duty or a legal-proceedings ground keeps it. Retention is a duty in both directions: keeping a screening record indefinitely is its own breach.

The reporting duty is wider than the CDD duty, and does reach a legal practice. Under the Russia (Sanctions) (EU Exit) Regulations 2019 (SI 2019/855), reg 71(1)(d)(ii) makes a firm or sole practitioner providing "legal or notarial services" by way of business a relevant firm — with no transaction limb — and reg 70(1) requires a relevant firm to inform the Treasury as soon as practicable where it knows or has reasonable cause to suspect that a person is a designated person or has breached a prohibition, and the knowledge or suspicion came to it in the course of its business. Verified for the Russia regime; other regimes follow the same drafting, but the regime in play must be checked rather than assumed.

Ownership and control are not screened by any name search. Under reg 7 of SI 2019/855 a non-individual is owned or controlled by a designated person where that person holds, directly or indirectly, more than 50% of the shares or voting rights, or the right to appoint or remove a majority of the board — or, on the second limb, where it is reasonable to expect that they could achieve the result that the company's affairs are conducted in accordance with their wishes. An unlisted company can therefore be caught by a listed shareholder. That has to be worked out from the ownership structure; no list holds it.

The discipline

  1. A candidate is not a match. The score measures name similarity, nothing else. Adopting or discounting a candidate is a human comparison against date of birth, nationality, address, identifiers and the statement of reasons.
  2. A nil return is bounded, and the record says by what — the lists actually searched, the date each was published, and the spelling used. It is not a statement that the subject is not sanctioned.
  3. A failed read never reads as a clean result. A list that is missing, damaged, truncated, or short of the count recorded when it was fetched is reported as NOT SEARCHED on the face of the screening record, its hits are discarded rather than half-reported, and the run exits 3.
  4. Search more than one spelling of a transliterated name. The tool itself romanises Cyrillic only — under four systems, each searched — and any Cyrillic letter in a name triggers that. Arabic, Chinese and every other script are NOT romanised: a query in them is refused, and the passport or publisher spelling must be searched in Latin script. OFAC's files are entirely ASCII, so a non-Latin name can never match there except through a romanisation. The matcher folds diacritics and homoglyphs but cannot invent a spelling nobody gave it. Search the passport spelling and the common alternative.
  5. Screen the payer, not only the client. Third-party payers, corporate parents, funders and the opponent in a matter where money will move.
  6. Re-screen. Designations are made weekly. A screen done at intake says nothing about the position when the fee is taken.
  7. Never complete the decision block on the fee earner's behalf, and never describe a subject as "cleared". Fill in the search; leave the decision.

Privacy

Screening is entirely local. refresh contacts the eight publishing authorities listed above and nothing else; check and batch open no socket at all, which is asserted by a test that replaces the socket layer with something that raises. The name of a client is never sent anywhere. Screening records are written only where you point them.

Tests

python3 tests/test_screen.py        # 130  matching, dates, the gate, parser output
python3 tests/integrity.py          # 186  field mapping, refresh, tampering, licence gate
python3 tests/adversarial.py        # 374  hostile input, cache damage, injection, privacy
python3 tests/release_gate.py       #      every published name retrieves its designation — run before a tag
python3 tests/benchmark.py          #     recall and precision against the lists
python3 tests/prefilter_safety.py   #     measures whether the speed filter costs recall
python3 tests/threshold_sweep.py    #     where the default threshold belongs

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Creates an Agent Authority Charter for enterprise or regulated AI agents before deployment. Use this Skill when a user needs to define what an AI agent is allowed to do, who delegated authority to it, what actions are permitted or prohibited, when human approval is required, what evidence must be preserved, and how the agent can be suspended, revoked, or escalated.

日本語の概要は準備中です。原文の説明を表示しています。

lawve-ai/awesome-legal-skills8632026年10月3日 更新

EU AI Act Knowledge Engine — authoritative regulatory Q&A grounded in 70 official EU source documents (including the 2026 Commission draft guidelines on Art. 6 high-risk classification — general principles, Annex I, Annex III). Answers any question about the AI Act with article-level citations from the full regulation text, Commission guidelines, EDPB/EDPS opinions, codes of practice, harmonised standards, FRIA guides, incident templates, and sector-specific guidance. This skill should be used when the user asks about the "EU AI Act", "AI Act regulation", "Regulation 2024/1689", "KI-Verordnung", asks to "explain an AI Act article", "what does Article X say", "AI Act requirements", "AI Act penalties", "AI Act timeline", "GPAI obligations", "high-risk AI", "prohibited AI practices", "AI Act and GDPR", "fundamental rights impact assessment", "AI Act standards", "AI Act national implementation", "AI literacy", "serious incident reporting", "Digital Omnibus", "AI regulatory sandbox", or any question about EU artificial intelligence regulation. Also triggers on German terms: "KI-Gesetz", "KI-Verordnung", "Hochrisiko-KI", "KI-Kompetenz", "Grundrechte-Folgenabschaetzung", "GPAI-Verhaltenskodex". For assessment workflows that produce a classification decision rather than a knowledge answer, offer to run a structured risk-tier classification in-session.

日本語の概要は準備中です。原文の説明を表示しています。

lawve-ai/awesome-legal-skills8632026年10月3日 更新

This skill builds a structured audit trail of an AI-assisted task: what the tool was asked to do, what materials it was given, what it produced, how the output was verified, and what was ultimately relied upon. It documents the workflow for supervision and later review without ruling on privilege or disclosure, so the record stays accurate rather than self-serving.

日本語の概要は準備中です。原文の説明を表示しています。

lawve-ai/awesome-legal-skills8632026年10月3日 更新

Use this skill when the user wants an AI governance, legal-risk, privacy, compliance, procurement, or vendor-risk review of an internal AI use case, an AI product feature, an LLM workflow, or a third-party AI vendor. The skill asks intake and clarifying questions first when facts or evidence are missing, identifies required documentation and missing evidence, maps the use case to AI governance frameworks and applicable legal domains, and produces a preliminary or final governance review with scorecards, findings, owners, remediation actions, and follow-up questions.

日本語の概要は準備中です。原文の説明を表示しています。

lawve-ai/awesome-legal-skills8632026年10月3日 更新

Turn an interpretive-ambiguity audit of a legal text — contract, statute, regulation, or judicial opinion — into a polished deliverable. Produces a multi-page website (default), a single-page interactive site, a Microsoft Word document, a PowerPoint deck, or a LaTeX/PDF. Use whenever a user has a stress-test result, ambiguity audit, or "where will this be litigated" scenarios and wants to publish, present, or share them. Triggers on "publish the audit," "make a report from this," "turn this into a website / deck / brief / Word doc," "make a Netlify site," "build slides of these ambiguities," "render the scenarios," "package this stress test," "produce a LaTeX version," and similar. Pairs with the ambiguity-stress-test skill (the underlying analysis) but works on any structured or semi-structured ambiguity analysis. Visual design is opinionated but the user can override colors, fonts, and brand label. Most formats need Python and a writable filesystem; single-file HTML works where the host has neither.

日本語の概要は準備中です。原文の説明を表示しています。

lawve-ai/awesome-legal-skills8632026年10月3日 更新

Adversarially stress-tests a legal text — a contract, statute, regulation, or judicial opinion — for interpretive ambiguity: it finds the seams where the people governed by it will later disagree about what it means and turns each into a concrete dispute scenario with both sides' arguments, the likely outcome, and a fix. Use it whenever someone wants to pressure-test, red-team, audit, or find weak spots, loopholes, gaps, ambiguities, or drafting problems in a legal document; whenever a drafter wants to tighten a contract, statute, regulation, or opinion before it issues; whenever a litigator wants to mine an opinion or contract for arguments; or whenever someone hands over a legal text and asks where it will be fought over or for issue-spotting. Trigger it for contract review, statutory-ambiguity analysis, judicial-opinion scope analysis, and drafting QA — even if the user never says "stress-test" or "ambiguity."

日本語の概要は準備中です。原文の説明を表示しています。

lawve-ai/awesome-legal-skills8632026年10月3日 更新

lawve-ai のスキルをすべて見る

このスキルの問題を報告する