Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/abdulkader-safi/wp-to-code/wp-mirrorgit clone --depth 1 https://github.com/Abdulkader-Safi/wp-to-codeWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00022 | $0.00571 |
| Opus 5 | $0.00011 | $0.00285 |
| Sonnet 5 | $0.00004 | $0.00114 |
| Haiku 4.5 | $0.00002 | $0.00057 |
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 2d 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.
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.
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.
- 2d ago First seen · 46 lines · 22 tokens per session scan A cda276f70e5f
wp-mirror is a command published in the GitHub repository Abdulkader-Safi/wp-to-code (2 stars, last pushed 14d ago), licensed MIT. It adds 22 tokens to every session and 571 once invoked, about $0.0001 per session on Opus 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.
Other commands, from other repositories
auto-browse
Auto-browse — learn, optimize, and graduate browser operations or web data-mining workflows.
connect
Connect to OpenChrome and confirm the MCP server is reachable. Runs a quick health check, reports the Chrome CDP status, and prints the tool surface summary.
check-access
Check whether a user or group can access a specific URL via ZIA policies.
findmy
Look up Find My friend locations on macOS (name, location, staleness, distance) via Vision OCR of FindMy.app.
browser
Debug and fix browser issues by inspecting, diagnosing, and resolving visual or technical problems.
open
SoDam-Design-Kit open 대시보드 — 검증 이력·판정서·스크린샷을 브라우저로 열람 + 재검증.