/arcads:spy-competitor-adsfrom arcads
Finds and downloads competitor ads from the Meta Ad Library in video, image, or both formats. Useful for competitive ad research and creative analysis.
Ships in arcads. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Your only job: find competitor ads and download them. Nothing else. Execute the whole pipeline silently and the user's first output is the downloaded creatives themselves.
Media type — pick exactly ONE of three modes. NO default.
| Mode | Explicit trigger phrases | media_type param | Extractor | Downloads |
|---|---|---|---|---|
| VIDEO | "video ads", "competitor videos", "video creatives", "their videos" | video | <video> only | .mp4 |
| IMAGE | "static ads", "image ads", "photo ads", "still creatives", "posters", "image creatives" | image | <img> only (min 200px) | .jpg / .png |
| BOTH | "both", "video and image", "videos and statics", "all formats", "everything", "any media", "full swipe file" | all | <video> + <img> in one pass | .mp4 + .jpg / .png |
If — and only if — the user's request does not contain an explicit trigger for one of the three modes, ask with AskUserQuestion before doing anything else (see Step 1b). Do NOT silently default to video. The chosen mode then flows through the whole skill: URL → in-page extractor → file extensions → delivery list. Pick once and stick with it for every competitor in the run.
AskUserQuestion. Beyond these three, no other questions, confirmations, or "proceed?" check-ins. Between forms, go fully autonomous.You run up to three short setup interactions here, in this exact order, and only the ones whose answer isn't already in the request. Once these are settled, go autonomous.
Read the user's request. If it contains an explicit phrase from the mode-trigger table (VIDEO / IMAGE / BOTH), use that and skip this step.
If the request is silent on media type, ask with AskUserQuestion:
Question: "Which kind of competitor ads should I grab?" Header: "Media type" Options:
- Video ads — "Playable video creatives only (.mp4)"
- Static / image ads — "Static image creatives only (.jpg / .png)"
- Both video and image — "Everything they're running, in one pass (Recommended)"
Wait for the answer before doing anything else. Do not default to video. Do not scrape without an explicit choice.
Competitors named by the user? → use them as-is. Skip this confirmation entirely.
Not named? → find 3–5 direct competitors yourself with a quick WebSearch/WebFetch (brands selling a similar product to a similar audience that plausibly run paid social). Then confirm with AskUserQuestion:
Question: "Found these competitors for [user's brand]. Pick the ones to spy on — keep the relevant ones, drop the rest." Header: "Competitors" Multiple:
trueOptions: one per discovered competitor, with a one-line label like "BrandX — meal kits", "BrandY — recipe app", etc. Eachdescriptionexplains why it was matched.
The form's custom option lets the user type any competitor you missed. Run the scrape against the final selection (kept + added). If the user selects zero, ask once for a manual list, then stop.
Never silently scrape against an auto-found list the user never saw.
Default count: top 5 ads pooled across the final competitor selection. If the user specified a number ("2 ads", "one each"), honor it exactly.
Confirm a browser automation MCP is connected (e.g. mcp__Claude_in_Chrome__*, Playwright, Chrome DevTools, Puppeteer). Verify with list_connected_browsers or equivalent.
"I need a browser automation plugin (like the Claude-in-Chrome extension or Playwright) connected to read the Meta Ad Library. Connect one and I'll grab the ads."
Do not try to work around this with WebFetch.
Run competitors sequentially (parallel sessions trigger bot detection).
For each competitor, build the URL — pick media_type based on the chosen mode:
VIDEO mode (default):
https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=ALL&is_targeted_country=false&media_type=video&search_type=keyword_unordered&sort_data[direction]=desc&sort_data[mode]=total_impressions&q=<COMPETITOR_URL_ENCODED>
IMAGE mode:
https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=ALL&is_targeted_country=false&media_type=image_and_meme&search_type=keyword_unordered&sort_data[direction]=desc&sort_data[mode]=total_impressions&q=<COMPETITOR_URL_ENCODED>
BOTH mode (image + video):
https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=ALL&is_targeted_country=false&media_type=all&search_type=keyword_unordered&sort_data[direction]=desc&sort_data[mode]=total_impressions&q=<COMPETITOR_URL_ENCODED>
Use the user's primary market for country= if they mentioned one, else ALL.
Then, for speed, do everything in as few calls as possible — navigate, wait briefly, then one JavaScript call that scrolls, extracts, filters, and downloads:
src is never returned to you and a shell HTTP client has no valid URL. Save the media in-page instead: read the <video>/<img> source as a blob and trigger a browser "save as" via a temporary <a download> link. This only writes the ad's image/video file to the browser's Downloads folder — nothing is executed or opened. You never need to see the URL.<video> + .mp4. IMAGE mode uses the card's main <img> + .jpg/.png. BOTH mode collects <video> and <img> in the same pass (with the same min-size filter for images). In every mode, filter out tiny avatars/icons (≤ ~200px on either side) so you only keep real ad creatives.(async () => {
// 1. trigger lazy-load
window.scrollTo(0, document.body.scrollHeight);
await new Promise(r => setTimeout(r, 2500));
window.scrollTo(0, document.body.scrollHeight);
await new Promise(r => setTimeout(r, 2000));
// 2. collect videos + their card text
const vids = Array.from(document.querySelectorAll('video'))
.filter(v => (v.src || v.currentSrc || '').startsWith('http'));
const cardText = (v) => {
let el = v;
for (let i = 0; i < 12 && el; i++) {
el = el.parentElement;
if (el && el.innerText && el.innerText.length > 100 && el.innerText.length < 2000) return el.innerText;
}
return '';
};
// 3. keep only cards matching the REAL competitor (edit the regex per brand),
// drop same-name pollution, and de-dupe so recurring creatives count once.
const BRAND = /creatify\.?ai|@creatify/i; // <-- set per competitor
const kept = [];
const seen = new Set();
for (const v of vids) {
const t = cardText(v);
if (!BRAND.test(t)) continue;
const key = t.slice(0, 80);
kept.push({ v, t, dup: seen.has(key) });
seen.add(key);
}
// 4. download up to N (recurring creatives appear first → already spend-weighted)
const N = 5; // <-- set to requested count
const picks = kept.slice(0, N);
const results = [];
for (let i = 0; i < picks.length; i++) {
const url = picks[i].v.src || picks[i].v.currentSrc;
try {
const b = await (await fetch(url)).blob();
const a = document.createElement('a');
a.href = URL.createObjectURL(b);
a.download = `spy-ad-${i + 1}-COMPETITOR.mp4`; // <-- set competitor slug
document.body.appendChild(a); a.click(); a.remove();
results.push({ i: i + 1, bytes: b.size });
} catch (e) { results.push({ i: i + 1, error: String(e) }); }
}
return results;
})()
(async () => {
// 1. trigger lazy-load
window.scrollTo(0, document.body.scrollHeight);
await new Promise(r => setTimeout(r, 2500));
window.scrollTo(0, document.body.scrollHeight);
await new Promise(r => setTimeout(r, 2000));
// 2. collect images + their card text. Drop avatars/icons by minimum size.
const MIN = 200; // px — anything smaller is likely an avatar/icon
const imgs = Array.from(document.querySelectorAll('img'))
.filter(i => (i.currentSrc || i.src || '').startsWith('http'))
.filter(i => (i.naturalWidth || i.width) >= MIN && (i.naturalHeight || i.height) >= MIN);
const cardText = (n) => {
let el = n;
for (let i = 0; i < 12 && el; i++) {
el = el.parentElement;
if (el && el.innerText && el.innerText.length > 100 && el.innerText.length < 2000) return el.innerText;
}
return '';
};
// 3. keep only cards matching the REAL competitor (edit the regex per brand),
// drop same-name pollution, and de-dupe so recurring creatives count once.
const BRAND = /creatify\.?ai|@creatify/i; // <-- set per competitor
const kept = [];
const seen = new Set();
for (const img of imgs) {
const t = cardText(img);
if (!BRAND.test(t)) continue;
const key = t.slice(0, 80);
if (seen.has(key)) continue; // de-dupe identical creatives
kept.push({ img, t });
seen.add(key);
}
// 4. download up to N as JPGs (recurring creatives appear first → already spend-weighted)
const N = 5; // <-- set to requested count
const picks = kept.slice(0, N);
const results = [];
for (let i = 0; i < picks.length; i++) {
const url = picks[i].img.currentSrc || picks[i].img.src;
try {
const b = await (await fetch(url)).blob();
const ext = (b.type && b.type.includes('png')) ? 'png' : 'jpg';
const a = document.createElement('a');
a.href = URL.createObjectURL(b);
a.download = `spy-ad-${i + 1}-COMPETITOR.${ext}`; // <-- set competitor slug
document.body.appendChild(a); a.click(); a.remove();
results.push({ i: i + 1, bytes: b.size, ext });
} catch (e) { results.push({ i: i + 1, error: String(e) }); }
}
return results;
})()
Collects videos and images in a single pass off the same media_type=all page. Deduplication is per-card (one creative per ad card, regardless of whether it's a video or an image), so a single card with both a poster image and a playable video counts once and prefers the video.
(async () => {
// 1. trigger lazy-load
window.scrollTo(0, document.body.scrollHeight);
await new Promise(r => setTimeout(r, 2500));
window.scrollTo(0, document.body.scrollHeight);
await new Promise(r => setTimeout(r, 2000));
const MIN = 200; // px — minimum image size to count as a real creative
// 2. helper: walk up to find the ad card and its text, return both
const cardOf = (node) => {
let el = node;
for (let i = 0; i < 12 && el; i++) {
el = el.parentElement;
if (el && el.innerText && el.innerText.length > 100 && el.innerText.length < 2000) {
return { card: el, text: el.innerText };
}
}
return { card: null, text: '' };
};
// 3. collect candidates: every video, plus every large image
const candidates = [];
for (const v of document.querySelectorAll('video')) {
const url = v.src || v.currentSrc || '';
if (!url.startsWith('http')) continue;
candidates.push({ kind: 'video', node: v, url });
}
for (const img of document.querySelectorAll('img')) {
const url = img.currentSrc || img.src || '';
if (!url.startsWith('http')) continue;
if ((img.naturalWidth || img.width) < MIN || (img.naturalHeight || img.height) < MIN) continue;
candidates.push({ kind: 'image', node: img, url });
}
// 4. attach card text + de-dupe per card (video wins over image when both exist on the same card)
const BRAND = /creatify\.?ai|@creatify/i; // <-- set per competitor
const byCard = new Map(); // card element → chosen candidate
for (const c of candidates) {
const { card, text } = cardOf(c.node);
if (!card) continue;
if (!BRAND.test(text)) continue;
const prev = byCard.get(card);
// prefer video over image when both exist on the same card
if (!prev || (prev.kind === 'image' && c.kind === 'video')) {
byCard.set(card, { ...c, text });
}
}
// 5. de-dupe near-identical recurring creatives by card text prefix
const seen = new Set();
const kept = [];
for (const c of byCard.values()) {
const key = c.text.slice(0, 80);
if (seen.has(key)) continue;
seen.add(key);
kept.push(c);
}
// 6. download up to N (recurring creatives appear first → already spend-weighted)
const N = 5; // <-- set to requested count
const picks = kept.slice(0, N);
const results = [];
for (let i = 0; i < picks.length; i++) {
const p = picks[i];
try {
const b = await (await fetch(p.url)).blob();
let ext;
if (p.kind === 'video') {
ext = 'mp4';
} else {
ext = (b.type && b.type.includes('png')) ? 'png' : 'jpg';
}
const a = document.createElement('a');
a.href = URL.createObjectURL(b);
a.download = `spy-ad-${i + 1}-COMPETITOR.${ext}`; // <-- set competitor slug
document.body.appendChild(a); a.click(); a.remove();
results.push({ i: i + 1, kind: p.kind, bytes: b.size, ext });
} catch (e) { results.push({ i: i + 1, error: String(e) }); }
}
return results;
})()
If a fetch fails (expired/geo-blocked), it's skipped automatically — just move to the next card. No mention to the user.
After downloading, move the files out of the browser's Downloads folder to /tmp/ with the Bash tool, in one command. Pick the glob that matches the mode you ran:
VIDEO mode:
cd ~/Downloads && mv -f spy-ad-*.mp4 /tmp/ && ls -la /tmp/spy-ad-*.mp4
IMAGE mode:
cd ~/Downloads && mv -f spy-ad-*.jpg spy-ad-*.png /tmp/ 2>/dev/null; ls -la /tmp/spy-ad-*.{jpg,png} 2>/dev/null
BOTH mode (image + video):
cd ~/Downloads && mv -f spy-ad-*.mp4 spy-ad-*.jpg spy-ad-*.png /tmp/ 2>/dev/null; ls -la /tmp/spy-ad-*.{mp4,jpg,png} 2>/dev/null
Then deliver — only the files, no analysis, no commentary, no brief. Present each creative inline if a preview tool is available; otherwise list them as clickable file links:
…in IMAGE mode:
…in BOTH mode (videos and images interleaved by rank):
Do not append observations, patterns, recommendations, or written analysis. The only thing that may follow this delivery is the Step 5 "clone which?" form — and only when this skill ran standalone.
This step only fires when arcads:spy-competitor-ads was invoked directly by the user as the end goal, not when it was triggered as a sub-step by another skill. Detect the situation before running it:
Skip Step 5 (do NOT show the form) when any of these is true:
arcads:clone-hook (Step 1B auto-source) or arcads:clone-static-ad (Step 1B auto-source). Those skills will consume the downloaded files themselves; offering to clone again would loop.Run Step 5 (show the form) otherwise, including when the user's request was ambiguous-but-actionable like "spy on competitors and let me work from there", "find competitor ads I can use as inspiration", or a bare "find competitor ads from [brand]". When in doubt, run it — declining is one click for the user.
Surface every delivered creative as a separate option in a single AskUserQuestion call, one pick per run:
Question: "Want me to clone one of these for your brand? Pick the one to recreate." Header: "Clone which?" Multiple:
falseOptions: one per delivered file, in the same order they were listed in Step 4. Each option'slabelis the short filename without the leading slug (e.g. "Ad #1 — BrandX (video)" or "Ad #3 — BrandY (image)"). Each option'sdescriptionis one short cue from the card text if you have it (e.g. "Talking-head selfie, 22s"), or just the file type if you don't.
The custom default option ("Type your own answer") lets the user say "none — I'm done" or add a custom note.
Route the chosen file:
.mp4) → load and run the arcads:clone-hook skill, passing the local /tmp/spy-ad-*.mp4 path as the source video (skipping its Step 1B auto-source, since you already have a video). arcads:clone-hook will analyze the hook, then clone it for the user's brand..jpg / .png) → load and run the arcads:clone-static-ad skill, passing the local /tmp/spy-ad-*.{jpg,png} path as the reference static ad (skipping its Step 1B auto-source, since you already have an image). arcads:clone-static-ad will analyze the layout and clone it for the user's brand.Clone the ad the user picks. When they pick several, clone each with the same defaults and show all opening frames in one approval. If the user answers "none", stop cleanly — no chaining, no further commentary.
The downstream skills (arcads:clone-hook, arcads:clone-static-ad) will ask for the user's brand, product, and assets. If the user already gave that information during Step 1a or in the original request, pass it forward to pre-fill those answers.
arcads:clone-hook for video, arcads:clone-static-ad for image).arcads:clone-hook auto-source) → skip Step 5 entirely. The calling skill owns the next step.| Tool | Where |
|---|---|
AskUserQuestion | Step 1b — pick media mode (when not explicit). Step 1c — multi-select competitor shortlist (when auto-discovered). Step 5 — single-select "clone which?" (standalone runs only). |
WebSearch / WebFetch | Step 1c — auto-find competitors (only if not named) |
Browser MCP (mcp__Claude_in_Chrome__* / Playwright) | Steps 2–3 — open Ad Library, run extract+download JS |
javascript_tool (in-page blob → save-as link) | Step 3 — the ONLY reliable way to save the media files; shell downloads do not work. Pick the extractor that matches the mode: <video> for VIDEO, <img> for IMAGE, combined for BOTH. |
Bash (mv) | Step 4 — move files from Downloads to /tmp/ (.mp4 for VIDEO, .jpg/.png for IMAGE, both for BOTH) |
arcads:clone-hook skill | Step 5 — chained for the selected video, passing the local /tmp/spy-ad-*.mp4 path |
arcads:clone-static-ad skill | Step 5 — chained for the selected image, passing the local /tmp/spy-ad-*.{jpg,png} path |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
competitor-research, ad-library, creative-download, meta-ads
npx claudepluginhub arcads-ai/skills --plugin arcads17 skills in this plugin
/adsArcads ads skill — understand the user's marketing goal, research their brand, and produce ad creatives through the Arcads MCP server: static image ads, AI video ads, actor-led UGC formats, app demos, unboxings, try-ons, plus post-production (subtitles, overlays, hook variants, translation). Use when the user says "make ads", "make a creative", "recreate this ad/post", "turn this into a video", references a viral format, mentions creative fatigue or rising CPMs, or wants existing creatives edited, localized, or re-hooked. Generation runs on the Arcads backend — the inline widget shows progress and final media; credits are billed server-side./amazon-listing-systemTurn one product URL + one product photo into a full Amazon listing image set: research buyer angles, then generate Hero/Benefits/Ingredients/Lifestyle/Reviews images via Arcads./animated-adConverts a product, offer, or raw ad script into a production-ready Vox-style paper-collage animated ad for Arcads Seedance 2.0 (arcads_generate_video_seedance_20, max 15s per clip): a voice-over script with per-clip timestamps plus copy-paste-ready prompts, one self-contained prompt per clip with internal timeframes. Use whenever the user wants an "arcads animated ad", "arcads anime ad", a "Vox-style" ad, "paper texture animation", "explainer ad", "motion graphics ad", "Vox explainer", a Seedance Vox video, or pastes a product/offer and says "make me an animated ad" or "animate this script Vox-style". Also triggers on an uploaded product image or a request for the timestamped VO timeline. Voice-over is recorded separately (ElevenLabs, arcads_text_to_speech, or a real read) and layered in post, NOT Seedance native audio. Defaults to 9-figure DTC direct-response writing: emotion-first, benefit-driven. Outputs SIMPLE (short prompt per clip) and COMPLEX (full motion-graphics direction) workflows./cinematic-adsTurn product photos plus a brief into a cinematic, photorealistic e-commerce short film (30s to 10 min) made with Seedance 2.5 on the Arcads MCP connector: a real story in movie language where the product is the turning point, never UGC. Asks genre (9 genres, from heist and trailer to rom-com, horror and wildlife doc), format and length one question at a time, then gets client approval on the script, GPT Image 2 character sheets and location images before generating clips in order, each referencing the last ~10s of the previous one, then stitches and offers extras. Trigger when the user wants a cinematic ad, a movie-style or film-look product ad, a short film for their product, a heist/trailer/detective/rom-com/horror/documentary-style ad, or says "make my product the hero of a film". Do NOT use for UGC or talking-head ads (ads), Pixar-style 3D (pixar-ad), Vox paper-collage (animated-ad), cloning a reference video (viral-clone) or restyling footage (omniflash-restyle)./clone-hookIdentify a video ad's hook and clone it for the user's brand: one frame to approve, then one 720p take, with text and captions added at the edit. Invoke with /arcads:clone-hook or via another skill./clone-static-adClone a static (image) ad for the user's brand. Invoke with /arcads:clone-static-ad or via another skill.Other plugins' skills for the same job