~/codigoagente
Open source tools

REM (Reverse Engineer Marketing): reverse engineer any competitor's marketing from Claude Code

REM (Reverse Engineer Marketing) is an open source tool that takes one link and rebuilds how a company gets customers: which ads it runs on Meta, Google or LinkedIn and which ones have been live for months, which tracking pixels it has installed, how its SEO is built, whether it lets AI crawlers in, who its founders are and how its messaging has changed over the years. It runs as a CLI, as a local web app and as an MCP server for Claude Code, Codex or Cursor, and it is MIT licensed.

We read the full source of version 0.1.0 (commit 5b78198, October 18, 2026, about 4,300 lines of TypeScript) to explain what it really does, what is free and what isn't, how to install it today (the README command doesn't work yet) and how to use it to study your competitors or your agency's clients.

How REM works: it collects public evidence first, then AI interprets it and a validator checks the citations · codigoagente

What REM is and who builds it

  • Repository: github.com/dansugc/reverse-engineer-marketing
  • Version reviewed: 0.1.0 (a single public commit, October 18, 2026).
  • License: MIT, copyright Daniel Hangan (DansUGC). You can use it, modify it and ship it inside a commercial product.
  • Requirements: Node.js 22 or later.
  • Who builds it: DansUGC, a marketplace for UGC videos (real creators filming reactions for ads). The tool is free; the business model is that once you see your competitor winning with UGC, you buy it from them. You'll see that in the README and in a message at the end of every CLI run.

The idea comes from an observation in the README: hardly anyone shares what works in their marketing anymore, but most of it is public if you know where to look. Ad libraries show which ads have run for months (the winners), pixels reveal which platforms a company buys traffic on, sitemaps expose programmatic SEO and the Wayback Machine keeps every repositioning. REM gathers all of it into a report with a step-by-step playbook to copy the strategy, citing the evidence behind every claim.

It is inspired by REA (Reverse Engineer Anything), which reverse engineers binaries, applied to marketing instead.

What it finds out about a company

REM splits the research into eight areas (website, seo, history, apps, paid, social, founders, community). This is what each one returns and whether it needs a paid key:

AreaWhat it getsFree?
Website and funnelPositioning, CTAs, pricing model, free trial, affiliate program, social proofYes
Pixels and stackMeta, Google, TikTok, LinkedIn, Reddit, X, Pinterest and Snap pixels with their IDs, **including inside Google Tag Manager containers**; attribution SDKs (AppsFlyer, Adjust, Branch); CRM, email, affiliate and A/B testing toolsYes
SEOSitemap size, folders, **programmatic page families** (`/integrations/{app}`, `/{a}-vs-{b}`), comparison and alternatives pages, publishing cadenceYes
AI search (GEO)Whether it has `llms.txt` and which of these 10 crawlers it blocks: GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, Claude-SearchBot, PerplexityBot, Google-Extended, CCBot, Applebot-Extended and BytespiderYes
HistoryHomepage title, H1 and CTAs over time, from the Wayback MachineYes
AppsApp Store ratings, Google Play installs, update cadence and Apple Search Ads (EU only)Yes
AdsMeta ad library (active and paused, creatives, run length, variants, UTMs), Google and LinkedIn; advertisers bidding on the brandScrape Creators
SocialTikTok, Instagram, YouTube, X and LinkedIn: followers, posts per week, median reach, top postsScrape Creators
FoundersNames from Wikidata, JSON-LD and the about page (free); LinkedIn and X audience and posts (paid)Mixed
CommunityHacker News (free); Reddit and Product Hunt (paid)Mixed

The most valuable data point for anyone running ads is the list of longest-running active ads. The logic is simple: nobody pays for six months straight for an ad that doesn't sell. In the sample report shipped with the repository (the Cal AI app), REM finds 692 active Meta ads and two that had been running for 185 days with 12 variants each, and quotes their hooks word for word.

How it works under the hood

The design carefully separates what is observed from what is interpreted, and that is what sets it apart from asking a chatbot to "analyze X's marketing":

  1. Evidence collection. Each collector in src/sources/ adds numbered items (E1, E2…). Each one is an *observation* (seen at a URL or API) or a *derivation* (computed, e.g. posts per week). Anything that couldn't be checked is stored as an unknown, with a link to check it by hand.
  2. Deterministic channel scorecard. src/analyze/scorecard.ts scores each channel 0 to 3 (active, likely, dormant, none, unknown) without AI, using rules only. For example, 30 or more active Meta ads means strength 3.
  3. AI report. A model (Claude by default) writes the analysis from a fixed template and a versioned instruction bundle in harness/: analyst role, evidence rules and one playbook per channel (Meta, paid search, B2B, short-form video, founders, SEO and GEO, Reddit, funnel, apps).
  4. Validation. src/report/validate.ts checks that every [E#] citation exists, that all sections are present and that no dollar spend is invented.

The rules in harness/guardrails.md are strict and worth knowing to read the reports correctly: a pixel means intent or past use, not current spend; "unknown" never means "they don't do it"; and spend figures are never invented, only proxies such as the number of active ads or their age.

What REM costs

The software is free. You optionally pay for two things: social and ad data, and the model that writes the report.

ItemOptionCost
Free sources (web, pixels, SEO, AI, Wayback, apps, HN)No key$0
Ads, social, founders, Reddit[Scrape Creators](https://scrapecreators.com), 25-50 credits per full run100 free credits on signup; then $47 for 25,000 credits that don't expire
Written reportYour Claude Code or ChatGPT (Codex) subscriptionIncluded in your plan
Written reportAnthropic API (`ANTHROPIC_API_KEY`)Per token
Written reportVia MCP: your own agent writes itIncluded in your plan
Evidence only`--no-ai`$0

With Scrape Creators' Freelance pack, a full run costs between $0.05 and $0.09 in data. The 100 free credits cover two to four full runs, enough to try it on your top three competitors. Responses are cached for 24 hours in ~/.cache/reverse-engineer-marketing, so re-running the same day costs no credits, and the default cap is 50 credits per run (change it with --max-credits or REM_MAX_CREDITS).

For comparison, commercial ad spy and competitive intelligence tools charge monthly subscriptions of tens or hundreds of dollars. If you only need to study a few competitors a month, REM is far cheaper.

How to install REM today

The README says npx reverse-engineer-marketing, but as of November 13, 2026 the package is not published on npm: npm view reverse-engineer-marketing returns a 404. Until it is, install it from source:

terminalsh
git clone https://github.com/dansugc/reverse-engineer-marketing
cd reverse-engineer-marketing
npm install
npm run build
node dist/cli.js doctor

doctor tells you which sources your keys unlock. To use the paid ones, copy .env.example to .env in the folder you run the command from and fill in the keys you want (all optional):

.envsh
SCRAPECREATORS_API_KEY=your_key
ANTHROPIC_API_KEY=your_key
# REM_MODEL=claude-opus-5
# REM_MAX_CREDITS=50

To run straight from TypeScript without building, the README suggests npm run dev -- notion.so --no-ai.

First run from the terminal

terminalsh
node dist/cli.js yourcompetitor.com --no-ai

With --no-ai it only collects evidence and writes a report without interpretation. Output goes to ./rem-reports/<domain>-<date>/: a report.md and an evidence.json with all the raw evidence. The most useful options:

  • --only paid,social,seo: limits the areas (and the credit spend).
  • --handle tiktok=name: forces an account the site doesn't link.
  • --json: prints the evidence bundle to stdout, handy for scripts.
  • diff <domain>: compares with the previous run of the same domain and shows new or killed ads, follower growth, sitemap growth and homepage changes.

It also accepts App Store and Google Play links instead of a domain.

The local web app

terminalsh
node dist/cli.js web

It opens http://localhost:4321. Paste a link, pick who writes the report (Claude Code, Codex, the Anthropic API or nobody) and watch the evidence come in live. The Posts & ads tab is a library of everything collected: Meta ads with their videos, Google and LinkedIn ads, TikTok and Instagram videos and founder posts, filterable by platform and age.

If you have no keys and just want to see a full report, node dist/cli.js demo opens the recorded Cal AI teardown at no cost.

When you pick Claude Code or Codex as the writer, REM runs the CLI you already have installed with ANTHROPIC_API_KEY and OPENAI_API_KEY removed from the environment, so your subscription is used rather than a pay-per-use key.

Using REM from Claude Code via MCP

This is the most interesting part: with MCP you don't even need an Anthropic key, because your own agent interprets the evidence and writes the report. Since the package isn't on npm, register the server pointing at your built copy (change the path to yours):

terminalsh
claude mcp add reverse-engineer-marketing -e SCRAPECREATORS_API_KEY=your_key -- node /path/to/reverse-engineer-marketing/dist/cli.js mcp

The project's setup command does this automatically, but it registers npx -y reverse-engineer-marketing mcp, which fails today with the same 404. Also copy the skill in skills/reverse-engineer-marketing/ to ~/.claude/skills/ so the agent follows the right workflow: collect, read the scorecard, pull the channel playbooks, cite evidence and validate.

The server exposes seven tools:

ToolWhat it does
`reverse_engineer_marketing`Collects everything for a URL and returns a compact scorecard, the evidence index and the unknowns
`get_evidence`Full data for specific evidence items
`get_playbook`Analyst role, rules, template and per-channel playbooks
`get_content`The actual ads, videos and posts
`compare_runs`What changed between two runs
`validate_report`Checks the agent's report: citations, sections, nothing invented
`write_report`Server-side report (needs the Anthropic key)

Plus five guided workflows (MCP prompts): investigate_company, compare_competitors, what_changed, steal_the_playbook and audit_unknowns. These three requests work well in Claude Code once it is connected:

snippettext
Reverse engineer the marketing of yourcompetitor.com. Lead with their longest-running active ads and quote the hooks exactly.

Compare competitor1.com, competitor2.com and competitor3.com: which channel does each one win, and what is the one play I should copy from each?

Analyze yourcompetitor.com and build a 30-day plan for my product (mysite.com) with 10 ad hooks adapted from their winners and a posting calendar.

Use cases for a small business or an agency

  • Before launching or spending on ads: analyze three competitors and see which channel is their engine. If none of them advertise on LinkedIn but all three have Meta ads older than 60 days, you know where the proven demand is.
  • To prepare a client proposal: a competitor analysis with cited evidence is more convincing than a generic deck, and evidence.json works as an appendix.
  • To audit your own site: run it on your domain with --no-ai. You'll see which pixels you really have (including the ones loaded through GTM that nobody remembers), whether you block an AI crawler by accident and whether your sitemap has page families worth expanding.
  • To watch a competitor: run it weekly and use diff to see which ads they launched or killed and whether their messaging changed.
  • For a SaaS: your competitors' programmatic page families (/integrations/x, /x-vs-y, /alternatives-to-x) are a ready-made list of SEO pages you are missing. To act on it, OpenSEO gives you real search volumes.

Security and responsible use

SECURITY.md is more thorough than usual for such a young project:

  • Keys are only sent to api.scrapecreators.com and the official Anthropic SDK, and are never written to reports, cache or logs. If you save them from the web app, they go to ~/.config/reverse-engineer-marketing/config.json with mode 600.
  • The local web app listens on 127.0.0.1 only and rejects other Host headers and cross-origin requests.
  • The report is written by a model over scraped content, so it is treated as untrusted: it is cleaned with DOMPurify and images, forms and styles are stripped so a malicious site can't smuggle anything in.
  • Claude Code writes with no tools (--tools ""), no MCP servers or hooks, in an empty temporary folder. Codex runs in a read-only sandbox, but the document itself warns it can still read files, so use Claude Code if that matters to you.

On usage: REM only reads public information (websites, ad transparency libraries, public profiles) and never logs in to anything. The project's own rule is clean-room engineering: study the strategy, ship your own. Copying another company's ads, footage, copy or brand infringes their intellectual property. Also check each site's terms of use and your local laws.

Limitations

  • Not published on npm (as of this article): install from source.
  • Very young project: version 0.1.0, a single public commit. Expect changes.
  • Apple Search Ads are only visible in the EU. TikTok and X have no global public ad library: REM detects the pixel and gives you the link to check by hand. Reddit's ad library no longer exists.
  • Partial samples: ad counts come from the first pages of each library, and the report says so.
  • Search-based matches: founders, TikTok accounts and Product Hunt can be matched wrongly; weak matches are flagged.
  • Server-side tracking and email tools aren't visible from the browser and show up as unknowns.
  • Built for ad-heavy markets: for a local business with no ads or active social accounts, the report will be mostly unknowns. The free sources are the most useful part there.

Common errors

  • npm error 404 'reverse-engineer-marketing@*' is not in this registry: the package isn't on npm yet. Install from source as shown above.
  • The MCP server won't start after setup: setup registers npx -y reverse-engineer-marketing mcp. Remove it with claude mcp remove reverse-engineer-marketing and add it again with the path to dist/cli.js.
  • It fails to start or build: the project requires Node.js 22 or later (node -v).
  • Almost everything comes back unknown: you don't have SCRAPECREATORS_API_KEY. Check with doctor, and remember .env is read from the folder you run the command in.
  • It can't find the competitor's TikTok: pass it with --handle tiktok=name.

FAQ

Is it legal to use REM? It reads public data: web pages, ad transparency libraries and public profiles. What isn't allowed is copying another company's creatives or copy. Check each site's terms and your local laws.

Do I need to pay anything to try it? No. Without keys you get website, pixels, SEO, AI crawlers, history and apps, and demo shows a full recorded report. Scrape Creators gives 100 credits on signup.

Does it work with non-English sites? Yes: collection doesn't depend on language. Keep in mind Apple Search Ads are only visible in the EU.

Can I use it in a commercial product? Yes, the MIT license allows it as long as you keep the copyright notice.

How is it different from asking ChatGPT about a company's strategy? The model only interprets evidence collected on the spot, and every claim cites its source. Anything that wasn't checked comes back as unknown instead of being made up.

Conclusion

REM turns hours of digging through ad libraries, page source and sitemaps into an evidence-backed report, and its MCP server fits naturally into Claude Code: your agent collects, interprets and validates without an extra API key. Start with the free sources on your own site and your main competitor's, and add Scrape Creators when you need to see their ads. To automate more of your marketing with Claude, continue with Claude skills for social media or how to build a landing page with Claude Code and four skills.

// source code

Repository in this article
The code this article covers is public: browse it, star it or clone it from here.

Help us grow

codigoagente is free, with no paywalls. If this article helped you, any of these keeps the blog going.

// newsletter

One email a week with the repos worth your time

The week's new articles, tested against real code. No spam; unsubscribe in one click.

ArtCraft is an open source app for AI images and video where you build the 2D or 3D scene first. Features, real costs and how to use it with your fal key.
  • Free alternatives to paid apps
  • Design, image and video
read article
PeakCut cuts long videos and YouTube, Twitch or Kick streams into 9:16 clips with word-by-word captions. Install guide, real costs and a Spanish-language test.
  • Free alternatives to paid apps
  • Run it on your server
read article
Slopus is a GPL-3.0 desktop app that plans, generates and edits images, video and music on your GPU. Agent, local generators and timeline, no FFmpeg bundled.
  • Claude Code
  • Free alternatives to paid apps
read article