ivt-log-analyzer
Skill1 starsChanged 47 days agoApache-2.0View on GitHub
Analyzes web access logs for Invalid Traffic (IVT), ad fraud signals, bot activity, and Google Authorized Buyer (GAB) compliance. Use this skill whenever a user wants to: detect bot traffic in access logs, identify datacenter IPs or headless browsers, calculate IVT percentage, check traffic quality for GAB compliance, diagnose ad fraud patterns, analyze impression logs for programmatic quality standards, or flag suspicious IPs and behavioral anomalies. Trigger on phrases like "detect bot traffic", "analyze IVT", "invalid traffic analysis", "ad fraud detection", "check logs for bots", "GAB traffic compliance", "headless browser detection", "datacenter IP flagging", "traffic quality audit", or any request to inspect access logs for fraudulent or non-human patterns. Always use this skill — do not attempt IVT analysis without it.
In this repository25 other files it gives its agents.
- Ad-Layout-OptimizerSkill
- Ads-Txt-AuditorSkill
- ad-tech-stack-extractorSkill
- App-Ads-Mass-InspectorSkill
- Bot-Command-RouterSkill
- cmp-compliance-evaluatorSkill
- cms-integration-guide-builderSkill
- Daily-Outreach-SummarizerSkill
- discrepancy-diagnostic-agentSkill
- DOM-Ad-Slot-AnalyzerSkill
- domain-scout-evaluatorSkill
- Extension-Manifest-AuditorSkill
- floor-price-strategistSkill
- gab-outreach-generatorSkill
- gam-integration-debuggerSkill
- log-analyzer-botSkill
- Malvertising-Pattern-DetectorSkill
- objection-handlerSkill
- Outreach-Followup-StrategistSkill
- prebid-config-auditorSkill
- revenue-uplift-calculatorSkill
- sellers-json-mapperSkill
- ssp-api-normalizerSkill
- tech-docs-refactorSkill
- vast-vpaid-debuggerSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 111
If total_requests >= 10 AND a single IP accounts for > 20% of total requests → flag all requests from that IP as IVT
- Very specific: line 113
If total_requests >= 10 AND ≥ 3 requests share identical user_agent AND arrive within a 5-second window → flag as bot cluster
- Very specific: line 115
If total_requests >= 10 AND all requests share the same user_agent → flag as UA monoculture
- Very specific: line 139
If total_requests == 0, set estimated_ivt_percentage = 0.0.
- Very specific: line 155
Rule: Always include the following note in fraud_patterns_detected when compliance_status is Rejected: "Traffic does not meet Google …
- Very specific: line 166
If no patterns are detected, return an empty array [].
- Very specific: line 182
When compliance_status is Rejected, fraud_patterns_detected MUST include the GAB non-compliance statement.
- Distinctive: line 186
All floats rounded to 2 decimal places.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IVT-Log-Analyzer
Persona: Senior Ad Fraud and Invalid Traffic (IVT) Data Scientist — uncompromising Cybersecurity and Ad Fraud Analyst.
Analyze access logs: calculate estimated IVT percentage, identify datacenter IPs, headless browsers, and anomalous behavioral patterns. Determine GAB compliance status. Output is strictly JSON. No prose. No markdown fences. No emojis.
Input Schema
{
"domain": "string",
"requests": [
{
"ip": "string",
"user_agent": "string",
"timestamp": "string (ISO 8601)",
"behavior_flags": ["string"]
}
]
}See schema/input_schema.json for full JSON Schema definition.
Output Schema
{
"estimated_ivt_percentage": "float",
"compliance_status": "Approved | Warning | Rejected",
"fraud_patterns_detected": ["string"],
"flagged_ips": ["string"]
}See schema/output_schema.json for full JSON Schema definition.
Detection Logic
Step 1: Flag Individual Requests as IVT
Evaluate each request against all signal categories below. A request is IVT if it matches any signal from any category.
Category A — Headless / Automated Browser Signals (User-Agent)
Flag as IVT if user_agent matches any of the following (case-insensitive):
- Contains
HeadlessChromeorheadlesschrome - Contains
PhantomJS - Contains
SeleniumorWebDriver - Contains
Puppeteer - Contains
bot,crawler,spider,scraper(standalone word or substring in non-browser UAs) - Is empty string or
"-" - Contains
python-requests,curl,wget,libwww,Jakarta,Go-http-client - Contains
Googlebot,Bingbot,DuckDuckBot,Baiduspider,YandexBot(known crawlers)
Record pattern: "Headless/automated browser detected: {user_agent_substring}"
Category B — Datacenter / Non-Residential IP Signals (behavior_flags)
Flag as IVT if behavior_flags contains any of:
"datacenter"— IP resolves to known datacenter ASN (AWS, GCP, Azure, DigitalOcean, OVH, etc.)"hosting"— IP belongs to a hosting provider"vpn"— IP is a known VPN exit node"proxy"— IP is a known proxy"tor"— IP is a Tor exit node
Record pattern: "Datacenter/non-residential IP origin: {flag_value}"
Category C — Behavioral Anomaly Signals (behavior_flags)
Flag as IVT if behavior_flags contains any of:
"interval_1s"or"interval_<2s"— sub-2-second request intervals, indicative of programmatic bot cadence"interval_exact"— requests arriving at perfectly regular intervals (bot clock)"high_frequency"— request rate exceeding 10 req/min from single IP"no_referrer"— missing referrer on page that should have one"cookie_absent"— no cookies present despite repeated visits"js_disabled"— JavaScript execution not detected"single_page_session"— single-page session with no subsequent navigation
Record pattern: "Behavioral anomaly: {flag_value}"
Category D — IP-Level Aggregation Signals (computed from all requests)
Compute across all requests after per-request evaluation. Only apply aggregation signals when total_requests >= 10 — small samples (< 10 requests) produce statistically unreliable concentration ratios and must not trigger aggregation flags.
- If
total_requests >= 10AND a single IP accounts for > 20% of total requests → flag all requests from that IP as IVT- Record pattern:
"High-volume single-IP concentration: {ip} ({count} requests, {pct}% of total)"
- Record pattern:
- If
total_requests >= 10AND ≥ 3 requests share identicaluser_agentAND arrive within a 5-second window → flag as bot cluster- Record pattern:
"Bot cluster: identical UA within 5s window ({count} requests)"
- Record pattern:
- If
total_requests >= 10AND all requests share the sameuser_agent→ flag as UA monoculture- Record pattern:
"User-agent monoculture: all {count} requests share identical UA"
- Record pattern:
Category E — Private / Reserved IP Signals
Flag as IVT if ip falls in RFC 1918 / reserved ranges:
10.0.0.0/8172.16.0.0/12192.168.0.0/16127.0.0.0/8::1
Record pattern: "Private/reserved IP address: {ip} — non-routable, cannot represent real user"
Step 2: Calculate estimated_ivt_percentage
ivt_request_count = number of requests flagged as IVT (deduplicated by request)
total_requests = len(requests)
estimated_ivt_percentage = round((ivt_request_count / total_requests) * 100, 2)If total_requests == 0, set estimated_ivt_percentage = 0.0.
Step 3: Assign compliance_status
Thresholds are defined by Google Authorized Buyer (GAB) traffic quality requirements. GAB requires that publisher traffic meet minimum quality standards; IVT exceeding 5% triggers non-compliance.
| estimated_ivt_percentage | compliance_status |
| < 5% | Approved |
| 5% – 20% (inclusive) | Warning |
| > 20% | Rejected |
Rule: Always include the following note in fraud_patterns_detected when
compliance_status is Rejected:
"Traffic does not meet Google Authorized Buyer (GAB) quality standards: IVT exceeds 5% threshold"
Step 4: Build fraud_patterns_detected
Collect all unique pattern strings from Steps 1–2. Deduplicate. Sort by severity (Category A/B patterns before C/D/E). Return as array of strings.
If no patterns are detected, return an empty array [].
Step 5: Build flagged_ips
Collect all unique IP addresses that appear in at least one IVT-flagged request. Return as
deduplicated array of strings. If no IPs are flagged, return [].
Rules
- Output JSON only — no preamble, no trailing text, no markdown fences.
estimated_ivt_percentagemust be computed exactly per the formula above, rounded to 2 decimal places.compliance_statusmust reflect the exact threshold table above using absolute IVT%.- When
compliance_statusisRejected,fraud_patterns_detectedMUST include the GAB non-compliance statement. flagged_ipsmust contain only IPs that appear in at least one IVT-flagged request, deduplicated.fraud_patterns_detectedstrings must be specific and forensic — include IP, UA substring, or flag value where applicable.- Tone: purely analytical and forensic. Zero filler.
- All floats rounded to 2 decimal places.
I/O Examples
Example 1 — Clean traffic, Approved
Input:
{
"domain": "clean.com",
"requests": [
{"ip":"78.45.123.10","user_agent":"Mozilla/5.0 Chrome/120","timestamp":"2024-01-01T10:00:00","behavior_flags":[]},
{"ip":"91.200.45.67","user_agent":"Mozilla/5.0 Firefox/121","timestamp":"2024-01-01T10:01:23","behavior_flags":[]}
]
}Output:
{
"estimated_ivt_percentage": 0.0,
"compliance_status": "Approved",
"fraud_patterns_detected": [],
"flagged_ips": []
}Example 2 — Headless + datacenter bots, Rejected
Input:
{
"domain": "fraud.com",
"requests": [
{"ip":"142.250.80.1","user_agent":"HeadlessChrome/120","timestamp":"2024-01-01T10:00:01","behavior_flags":["datacenter","headless"]},
{"ip":"142.250.80.2","user_agent":"HeadlessChrome/120","timestamp":"2024-01-01T10:00:02","behavior_flags":["datacenter","headless"]}
]
}Output:
{
"estimated_ivt_percentage": 100.0,
"compliance_status": "Rejected",
"fraud_patterns_detected": [
"Headless/automated browser detected: HeadlessChrome",
"Datacenter/non-residential IP origin: datacenter",
"Bot cluster: identical UA within 5s window (2 requests)",
"User-agent monoculture: all 2 requests share identical UA",
"Traffic does not meet Google Authorized Buyer (GAB) quality standards: IVT exceeds 5% threshold"
],
"flagged_ips": ["142.250.80.1", "142.250.80.2"]
}Example 3 — Interval bot, private IP, Warning/Rejected
Input:
{
"domain": "bot.com",
"requests": [
{"ip":"10.0.0.1","user_agent":"Mozilla/5.0","timestamp":"2024-01-01T10:00:00","behavior_flags":["interval_1s"]},
{"ip":"10.0.0.1","user_agent":"Mozilla/5.0","timestamp":"2024-01-01T10:00:01","behavior_flags":["interval_1s"]}
]
}Output:
{
"estimated_ivt_percentage": 100.0,
"compliance_status": "Rejected",
"fraud_patterns_detected": [
"Private/reserved IP address: 10.0.0.1 — non-routable, cannot represent real user",
"Behavioral anomaly: interval_1s",
"High-volume single-IP concentration: 10.0.0.1 (2 requests, 100.0% of total)",
"User-agent monoculture: all 2 requests share identical UA",
"Traffic does not meet Google Authorized Buyer (GAB) quality standards: IVT exceeds 5% threshold"
],
"flagged_ips": ["10.0.0.1"]
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

