wp-mirror

wp-mirror is a command for Claude Code from Abdulkader-Safi/wp-to-code. It costs 22 tokens per session (571 once invoked), scanned A, original, MIT.

A website mirroring command that downloads the files needed to serve a copy of a site locally and identifies the root element containing each page’s main section.

In plain words
What is it for?
Use it to mirror a website for local development, inspect its page structure, and locate the main content section inside pages built with tools such as Elementor.
Why use it?
It helps create a working local copy without leaving downloaded links pointed at the live site. It also handles sites whose content is rendered in the browser after the initial page loads.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the wp-to-code plugin — 1 skill, 8 commands, 1 hook shipped together

Good fit Use it to mirror a website for local development, inspect its page structure, and locate the main content section inside pages built with tools such as Elementor.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Abdulkader-Safi/wp-to-code
Claude Code
/plugin install wp-to-code

Made for: Claude Code.

Or install wp-to-code, the plugin that ships this one along with the rest of its 1 skill, 8 commands, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-mirror

README.md
[![agentmods](https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-mirror/github.svg)](https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-mirror)
Your own site
<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-mirror"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-mirror/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-mirror

Your own site · 80×15
<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-mirror"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-mirror.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 571 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00571
Opus 5.5 $0.00009 $0.00228
Sonnet 5.5 $0.00004 $0.00114
Haiku 4.5 $0.00002 $0.00057

Measured 3mo ago against content hash cda276f70e5f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

wp-mirror scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/wp-to-code/commands/wp-mirror.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mirror the source site: $ARGUMENTS.

node "${CLAUDE_PLUGIN_ROOT}/scripts/mirror.mjs" [--page <slug>] [--render] [--no-sweep]

What it does: downloads CSS, JS and fonts preserving path structure, follows stylesheets into their own dependencies, scans downloaded JS for bundles loaded lazily at runtime, then loads each page in a browser and picks up anything the mirror could not serve. Images and video stay remote on purpose; they are most of the bytes and the CMS owns them later.

Only paths actually downloaded get rewritten, in all four encodings the same URL appears in, so nothing quietly keeps pointing at the live site. If the original goes away, the mirror still works.

Use --render if the mirrored page comes back nearly empty. That means the site renders its content client-side and the raw HTML is a shell.

After mirroring: find the section root

The diff compares the direct children of one selector on each side. For a builder that scopes CSS per post, a page contains several roots (header, footer, content) and you want the content one.

grep -oE 'elementor-[0-9]+' .wp-to-code/mirror/home.html | sort | uniq -c | sort -rn

Then check each candidate:

node "${CLAUDE_PLUGIN_ROOT}/scripts/serve.mjs" &
NODE_PATH="${CLAUDE_PLUGIN_DATA}/node_modules" \
  node "${CLAUDE_PLUGIN_ROOT}/scripts/measure.mjs" --page home --mode sections --root ".elementor-42"

The right root is the one with the page's real sections, not two. Write it into pages[].originalRoot in the config.

Other builders: #et-boc .et_builder_inner_content (Divi), .fl-builder-content (Beaver Builder), .brx-content (Bricks), .wp-site-blocks (Gutenberg), .entry-content or main for a hand-coded theme.

Repeat per page. Roots differ between pages.

Serving it

The mirror is a plain directory on a fixed port with no framework in front of it. That is deliberate: it means the thing you are building can be any stack, on any other port, with no shared origin and no CORS problem.

Read the full file on GitHub · 46 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 46 lines · 22 tokens per session scan A cda276f70e5f

Subscribe to this mod's changes

wp-mirror is a command published in the GitHub repository Abdulkader-Safi/wp-to-code (4 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 571 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

wp-mirror compared with commands from other repositories

wp-mirror next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
wp-mirrorAbdulkader-Safi/wp-to-codeCommand43mo agoMITA22Claude Code
brandManavarya09/design-extractCommand5.2k5d agoMITA62Claude Code
dnaManavarya09/design-extractCommand5.2k5d agoMITA19Claude Code
packManavarya09/design-extractCommand5.2k5d agoMITA43Claude Code
gradeManavarya09/design-extractCommand5.2k5d agoMITA35Claude Code
verifyManavarya09/design-extractCommand5.2k5d agoMITA31Claude Code
battleManavarya09/design-extractCommand5.2k5d agoMITA20Claude Code