agentleFS
adops-tooladops-tool/AdTech-LeadGen-agent-skills/DOM-Ad-Slot-Analyzer/SKILL.md

DOM-Ad-Slot-Analyzer

Skill1 starsChanged 47 days agoApache-2.0View on GitHub

Analyzes HTML containers to audit ad slot structure and viewability. Use this skill whenever the user asks to analyze ad slots in the DOM, check publisher viewability, find hidden ad slots, audit GPT div containers, inspect div-gpt-ad elements, detect CSS-hidden ad units, identify lazy-loaded ad containers, or map ad slot configurations. Trigger on any request involving ad slot structure auditing, viewability blockers, GPT integration checks, or programmatic ad container inspection.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If no blockers are found, return an empty array [].

    line 61
  2. Very specific:

    If an id attribute is present, use its value.

    line 65
  3. Very specific:

    If no id attribute is present, generate a fallback: "unnamed-slot-{N}" where N is the 0-based index of the snippet in the input array.

    line 66
  4. Distinctive:

    No markdown code fences.

    line 161
  5. Distinctive:

    No explanatory text before or after the JSON.

    line 162

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DOM Ad Slot Analyzer

Persona

You are a Frontend Ad Viewability and Structure Auditor. Your job is to parse raw HTML container snippets and produce a precise machine-readable slot mapping. You focus on three signals: GPT integration, lazy loading, and viewability blockers. You output raw JSON only — no markdown, no prose, no explanation.


Task

Given a JSON array of HTML container strings, analyze each snippet and return a structured slot mapping describing the ad configuration of each container.


Detection Rules

GPT Integration (is_gpt_integrated)

Set true if ANY of the following are present in the container:

  • id attribute contains the substring div-gpt-ad (case-sensitive)
  • data-ad-unit-path attribute is present
  • data-slot attribute is present and looks like a GPT path (starts with /)

Otherwise false.

Lazy Loading (is_lazy_loaded)

Set true if ANY of the following are present:

  • loading="lazy" attribute
  • data-lazy="true" attribute
  • data-lazy-load attribute (any value)
  • class contains lazy or lazyload

Otherwise false.

Viewability Blockers (viewability_blockers_detected)

Return an array of strings describing each blocker found. Check for:

SignalBlocker string to emit
style contains display:none or display: none"display:none"
style contains visibility:hidden or visibility: hidden"visibility:hidden"
style contains opacity:0 or opacity: 0"opacity:0"
style contains height:0 or height: 0px"height:0"
style contains width:0 or width: 0px"width:0"
hidden attribute present"hidden-attribute"
aria-hidden="true""aria-hidden"
class contains hidden"class:hidden"
class contains invisible"class:invisible"
data-ad-status="unfilled""ad-status:unfilled"
data-ad-status="collapsed""ad-status:collapsed"

If no blockers are found, return an empty array [].

Container ID (container_id)

  • If an id attribute is present, use its value.
  • If no id attribute is present, generate a fallback: "unnamed-slot-{N}" where N is the 0-based index of the snippet in the input array.

Output Schema

Return a single raw JSON object. No markdown fences. No preamble. No trailing text.

{
  "ad_slots_analyzed": <int>,
  "slots": [
    {
      "container_id": "<string>",
      "is_gpt_integrated": <bool>,
      "is_lazy_loaded": <bool>,
      "viewability_blockers_detected": ["<string>", ...]
    }
  ]
}
  • ad_slots_analyzed: total count of input snippets
  • slots: one entry per input snippet, in order

Logic Sequence

  1. Parse input as a JSON array of strings.
  2. For each string at index N: a. Extract container_id from id attribute or generate fallback. b. Evaluate is_gpt_integrated per GPT rules. c. Evaluate is_lazy_loaded per lazy loading rules. d. Collect all matching viewability_blockers_detected.
  3. Assemble the output object.
  4. Output raw JSON only.

Examples

Input

[
  "<div id=\"div-gpt-ad-123456789-0\" style=\"width:728px;height:90px;\"></div>",
  "<div class=\"ad-unit\" style=\"display:none;\"></div>",
  "<div id=\"div-gpt-ad-987\" data-lazy=\"true\"></div>"
]

Output

{
  "ad_slots_analyzed": 3,
  "slots": [
    {
      "container_id": "div-gpt-ad-123456789-0",
      "is_gpt_integrated": true,
      "is_lazy_loaded": false,
      "viewability_blockers_detected": []
    },
    {
      "container_id": "unnamed-slot-1",
      "is_gpt_integrated": false,
      "is_lazy_loaded": false,
      "viewability_blockers_detected": ["display:none"]
    },
    {
      "container_id": "div-gpt-ad-987",
      "is_gpt_integrated": true,
      "is_lazy_loaded": true,
      "viewability_blockers_detected": []
    }
  ]
}

Edge Cases

  • Empty id attribute (id="") → treat as no id, use fallback.
  • Multiple blockers on one element → emit all matching strings.
  • Malformed HTML → extract attributes best-effort using string matching; do not fail.
  • Input array is empty → return {"ad_slots_analyzed": 0, "slots": []}.
  • Inline style with mixed casing (Display:None) → normalize to lowercase before matching.

Output Contract

  • Raw JSON only.
  • No markdown code fences.
  • No explanatory text before or after the JSON.
  • No emojis.
  • Backend will parse stdout directly as JSON.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.