malicious-url-screening
A Claude Skill: literal URL-shape risk screening. No dependencies beyond
Python 3's standard library, no network call.
Provenance
Ported from packages/engine/src/rules/malicious_url.rs — same four
pattern families:
| Pattern id |
Catches |
url_shortener |
bit.ly, tinyurl.com, t.co, and 7 other common shorteners |
ip_literal_url |
http://93.184.x.x/... instead of a domain name |
punycode_domain |
xn-- domains (can render as a homoglyph of a trusted brand) |
high_risk_tld |
A small set of free TLDs with a published, disproportionate abuse rate (.zip, .mov, .top, .gq, .tk, .xyz, .click) |
What didn't carry over, deliberately: the source ships each pattern twice
(Scope::ToolInput and Scope::ToolOutput, for a live hook pipeline that
sees both) — a standalone scanner has no such distinction.
Honest scope
A literal-shape check, not a live reputation lookup — no network call, no
third-party package (local-first, standard-library Python only). A malicious link hosted on an
otherwise-unremarkable domain with a normal TLD won't match anything here.
A legitimate use of a shortener, an IP-literal URL, or one of the flagged
TLDs will flag too — an accepted false-positive cost, not a bug. Report a
match as "this shape carries elevated risk," never as "this URL is
malicious" — this tool has no way to know that.
Verification
tests/test_scan_urls.py covers each pattern's positive case, a
same-shape negative (a normal https:// URL on an ordinary domain and
TLD), and directory-walk/CLI/JSON behavior. Run:
cd community-skills/malicious-url-screening
python3 -m pytest tests/ --cov=scan_urls --cov-report=term-missing
License
See LICENSE (included alongside this skill in its download).