Affiliate disclosure check: find affiliate links and ad labels near the top of each article
Scan article folders (HTML/Markdown) or URLs for affiliate links (Amazon, Rakuten, A8.net, ValueCommerce and more) and report per page whether a clear ad disclosure appears near the top.
What it does
Checks in bulk whether articles make their advertising nature clear, following Japan's stealth-marketing rule that took effect in October 2023.
- Detects affiliate links: Amazon Associates (tagged links, amzn.to), Rakuten, A8.net, ValueCommerce, Moshimo, afb, AccessTrade, JANet, felmat, Rentracks, CJ, Awin, Impact,
rel="sponsored"and more - Checks whether disclosure wording (ad, PR, promotion, affiliate, sponsored, in Japanese and English) appears near the top of the article (first 300 visible characters by default, configurable)
- Classifies each page: no disclosure, only ambiguous wording (e.g. "product provided"), disclosure not near the top, disclosed near the top, or no affiliate links
- Flags contradictory wording ("personal opinion", "not sponsored") next to an ad label, disclosures only at the end, and links found only in site header or footer
- Outputs a table, JSON and CSV
How to use
python scripts/affiliate_disclosure_check.py ./content --json report.json --csv report.csv
python scripts/affiliate_disclosure_check.py --url-list urls.txt --top-chars 400
URLs are fetched with one GET each, with a delay between requests (1 second by default). Add custom short-link domains with --extra-domain.
Requirements
- Python 3 (standard library only)
- Network access when checking URLs
Caveats
- Not legal advice. It checks wording and position only; font size, color, text inside images and JavaScript-inserted labels are not detected, so the agent reviews flagged pages by hand.
- The rule regulates the advertiser (the business supplying the product); the report never calls a blogger's page illegal.
- "Near the top" is a practical convention, not a character count set by law.
How to install
- Unzip the downloaded file (it contains a
affiliate-disclosure-check/folder withSKILL.md). - Copy the whole folder into your agent's skills folder.
- Claude:
~/.claude/skills/(per project:.claude/skills/) - Hermes Agent:
~/.hermes/skills/ - Codex:
~/.agents/skills// Cursor:~/.cursor/skills/ - Claude app (claude.ai): upload the ZIP in Customize → Skills
- Claude:
- Restart the agent and check that the skill appears in its skill list.
Seller
AI Skill Market (official)
44 published skills