/marketing-skills:ad-spy [your website] [competitor, competitor, …]from marketing-skills
Deploys a hosted ad spy app that tracks Meta, Google, and LinkedIn competitor ads, analyzes creatives with Gemini, and maps positioning gaps against customer conversations from Reddit, YouTube, and review sites.
Ships in marketing-skills. 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.
Read when SKILL.md points to them.
A small web app the user deploys to their own Graphed project. Most ad spy tools only help you copy. This one also shows what nobody in the category is saying yet.
node cli.mjs sql "<select …>". Ask your agent in the sidebar copies that prompt with the
table list.The app sits behind the Graphed login, so the user's teammates on that account can open it. Every vendor call is a Graphed Tool or the Graphed OpenRouter proxy, billed to the project's Graphed credits. There are no vendor keys.
Use this skill's own directory. When the skill loads, that directory is the "Base directory
for this skill". Below, <skill-dir> means that path.
<skill-dir>/
app/ the deployable app (copied into the user's project folder on deploy)
packages/core schema, ad library adapters, pull, Gemini analysis, research, gaps, JSON API
packages/dashboard Next.js UI at / (React app in components/spy), /api and /m (media) routes
cli.mjs daily job, pull, research, gaps, sql (run with graphed exec)
smoke.mjs read-only smoke test inside the deployed image
graphed.yaml service, release migration, daily-pull cron (6am America/Denver)
scripts/deploy.sh copy app/ into a folder, install, test, graphed deploy
If graphed is not on PATH, stop and ask the user to install it (npm i -g @graphed-inc/cli)
and run graphed login. Node 20+ must be on PATH.
Ask which Graphed account to deploy to (graphed --format json accounts list). Ask for a
project slug. The default is ad-spy. Check that the slug is free with
graphed --format json projects list --account <account_id>.
Read the tool contracts once. Do not swap in other tools.
graphed tools catalog detail scrapecreators:v1/facebook/adLibrary/search/companies
graphed tools catalog detail scrapecreators:v1/facebook/adLibrary/company/ads
graphed tools catalog detail scrapecreators:v1/google/adLibrary/advertisers/search
graphed tools catalog detail scrapecreators:v1/google/company/ads
graphed tools catalog detail scrapecreators:v1/google/ad
graphed tools catalog detail scrapecreators:v1/linkedin/ads/search
graphed tools catalog detail scrapecreators:v1/reddit/search
graphed tools catalog detail scrapecreators:v1/reddit/post/comments
graphed tools catalog detail scrapecreators:v1/youtube/search
graphed tools catalog detail scrapecreators:v1/youtube/video/comments
graphed tools catalog detail scrapecreators:v1/linkedin/search/posts
graphed tools catalog detail scrapecreators:v1/threads/search
graphed tools catalog detail exa:search
graphed tools catalog detail serper:scrape
Tell the user what it costs (table below). Deploy only after they say yes.
bash <skill-dir>/scripts/deploy.sh --account <account_id> [--slug ad-spy] [--name "Ad Spy"] [--dir apps/<slug>]
The script copies app/ into apps/<slug>/ in the current directory, runs npm install and
npm test, and deploys. It prints the service URL. A --dry-run flag validates the manifest
without deploying. The cloud build runs npm run db:migrate before the Next server starts.
The page at / is the app. Health is GET /api/health.
<skill-dir>/app/. The folder's
.graphed.json and .git stay: graphed deploy pushes that repo. The cloud Postgres and
object storage keep every brand, ad, file and market.<skill-dir>/app/ and deploy again. Edits made only in
apps/<slug>/ are overwritten.public.paths to the manifest. The app has no auth of its own; the Graphed
gateway is its login.Prove the deploy before you hand it over:
graphed exec --project <slug> --account <account_id> -- node smoke.mjs
It exits 0 and ends with SMOKE ALL PASS. It starts a second copy of the server with the
worker off, calls the read endpoints (state, ads, a stored media file, gaps, agent prompt),
and writes nothing.
Do this from the terminal. The page is how the user looks at the results afterward.
Unless the user already gave them, ask two things: their website, and 2-4 competitors (names
or websites). Then run both steps. graphed exec runs inside the deployed app; each stdout
line is prefixed with [runtime …] .
E="graphed exec --project <slug> --account <account_id> --"
Look each competitor up in all three ad libraries (3 calls, ≈0.65 credits), pick the right Meta page, Google domain or advertiser id, and LinkedIn company id from the output, then add it with a small cap for the first pull:
$E node cli.mjs find "<name or domain>"
$E node cli.mjs add "<Name>" --fb <page_id> --google <domain> --linkedin <company_id> --max 20
$E node cli.mjs pull <brand id|name>
Leave out a platform the brand does not advertise on. --google-id <AR…> takes an advertiser
id instead of a domain. pull lists the ads, stores the media, and analyzes every new ad
before it returns. The web worker also analyzes anything still queued. Raise the cap
(max_ads, per platform per pull; default 150) only after the user agrees.
$E node cli.mjs research <their website>
$E node cli.mjs gaps
research runs 5 stages and resumes where it stopped: site (read the URL, plan queries,
name 4-8 competitors) → collect (≈60 tool calls, ≈3 minutes) → matrix (4-6 buyer personas
× 6-9 pains + 5-8 desired outcomes) → tag_voices → tag_ads. gaps prints the top openings:
persona × theme, how many customers say it, how many competitor ads do. The UI can start the
same run: the home page asks for the website when no market exists.
Reply with the app URL, the brands and ad counts, the matrix size, and the top 3 gaps with one customer quote each.
In the app:
From the terminal:
$E node cli.mjs status # brands, ad counts, analysis queue, credits, last pulls
$E node cli.mjs daily # what the cron runs: pull all, analyze, map into the matrix
$E node cli.mjs analyze # drain the analysis queue
$E node cli.mjs research --from matrix # rebuild the matrix from the same comments (also collect, tag_ads)
$E node cli.mjs sql "select hook, days_running from ads where is_active order by days_running desc limit 10"
$E node cli.mjs sql "<select …>" --key out/result.json
graphed storage download out/result.json . --project <slug> --account <account_id>
graphed jobs run daily-pull --project <slug> --account <account_id>
sql runs one read-only transaction and refuses anything but SELECT / WITH. The exec log
stream sometimes drops output: when a command prints nothing, add --key and download the
file.
Measured on a live run, Nov 2026.
| Step | Graphed tool | Credits |
|---|---|---|
| Ad library page (Meta 30 ads, Google 40, LinkedIn 10) | scrapecreators:v1/{facebook,google,linkedin}/… | 0.22 / call |
| Google ad detail (copy, YouTube link, impressions), new ads only | scrapecreators:v1/google/ad | 0.22 / ad |
| Gemini on an image or text ad | google/gemini-2.5-flash (OpenRouter proxy) | 0.15–0.4 / ad |
| Gemini on a video (inline MP4 or YouTube link) | google/gemini-2.5-flash | 0.5–1.4 / ad |
| Gaps research (site + ≈60 searches + matrix + tagging) | ScrapeCreators, Exa, Serper, Claude Sonnet, Gemini | ≈40 / run |
| Rebuild the matrix from the same comments | Claude Sonnet + Gemini | ≈8 |
| Map 50 new ads into the matrix | Gemini | ≈1 |
| One set of 3 ad concepts | Claude Sonnet | ≈3 |
A first pull of 20 ads per platform for one brand is about 25 credits. A quiet daily pull is about 1 credit per brand. Meta is listed in full every day (only ACTIVE ads are listed, so a missing ad means it stopped); Google and LinkedIn stop at the first page with nothing new.
Models: VISION_MODEL (default google/gemini-2.5-flash) and WRITER_MODEL (default
anthropic/claude-sonnet-5.5). To change one, add it under services.web.env (and
jobs.daily-pull.env) in <skill-dir>/app/graphed.yaml, run
graphed secrets set <NAME> --project <slug> --account <account_id>, and deploy again.
Per persona × theme cell: demand = Σ comment intensity (1-3), coverage = Σ ad strength (1-3),
both scaled 0-1 across the matrix. gap = demand × (1 − coverage). A cell with high coverage
and little demand is marked CROWDED. Openings need at least 2 customer comments. Personas must
be buyers: comments from non-buyers (workers worried about their jobs, vendors, students) are
skipped.
/m/<key>, which redirects to a fresh presigned URL each time.analysis.analysis_note
says so.snapshot.cards; {{product.name}} placeholders are
skipped. Meta lists 30 ads per page and ignores smaller page sizes.reddit/search and
reddit/post/comments; Exa is used for reviews, forums and blogs with excludeDomains.Reply with the app URL, the smoke test result, each brand with its ad count, and, after
research, the matrix size and the top gaps (persona × theme, customers vs competitor ads, one
quote). If a stage failed, say which one and show its error (status for pulls, the market
error in gaps output or the home page).
Graphed is a marketing cloud. It includes the infrastructure for an agent to do marketing: a data warehouse, data pipelines, a Postgres database, cron jobs, runtime servers, a tool catalog, custom domains, and internal app tooling.
app/AGENTS.md (opens in a new tab)app/Dockerfile (opens in a new tab)app/cli.mjs (opens in a new tab)app/docker-compose.yml (opens in a new tab)app/env.example (opens in a new tab)app/graphed.yaml (opens in a new tab)app/package-lock.json (opens in a new tab)app/package.json (opens in a new tab)app/packages/core/package.json (opens in a new tab)app/packages/core/src/ad-spy.test.ts (opens in a new tab)app/packages/core/src/analyze.ts (opens in a new tab)app/packages/core/src/api.ts (opens in a new tab)app/packages/core/src/cli.ts (opens in a new tab)app/packages/core/src/config.ts (opens in a new tab)app/packages/core/src/db/index.ts (opens in a new tab)app/packages/core/src/db/migrate.ts (opens in a new tab)app/packages/core/src/db/pglite.ts (opens in a new tab)app/packages/core/src/db/sql.ts (opens in a new tab)app/packages/core/src/db/types.ts (opens in a new tab)app/packages/core/src/gaps.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
20 skills in this plugin
/ai-marketing-agentWhen the user wants an AI teammate in Slack, or asks for a Slack bot that pulls their numbers, does research and makes files with their Graphed data and tools: an AI employee, '@graphed in Slack', an AI marketing agent. Deploys a Slack app (handle @graphed) that runs Claude Code with the full graphed CLI in a private sandbox, shows each step in plain English while it works, answers in the thread with text, files, tables, charts and next-step buttons, keeps a shared company memory, shows the credits each request used, and refuses guests and other workspaces by default. Also /graphed:ai-marketing-agent./ai-searchWhen the user wants to be named and cited in AI answers, or asks whether ChatGPT, Google AI Overviews, AI Mode, Gemini, Copilot, Perplexity or Claude recommend them, who AI names instead, or which pages AI cites: AI search visibility, GEO / AEO, AI share of voice, AI referral traffic, a Profound / Peec / Otterly alternative. Deploys a hosted AI Search app on Graphed (plus an MCP server) that runs real buyer prompts on every engine, reads each answer for mentions, position, sentiment, citations and wrong facts, joins GA4 and Search Console, checks the site and AI crawlers, and turns it into a ranked action plan with drafted fixes, outreach and a recheck. By default ask for the domain and competitors, deploy, say the cost, and run the first check. For classic keyword and backlink research, see ai-seo-tool. Also /graphed:ai-search.npx claudepluginhub graphed-inc/marketing-skills --plugin marketing-skillsOther plugins' skills for the same job