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.
/plugin marketplace add Abdulkader-Safi/wp-to-code/plugin install wp-to-codeWrote 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.
[](https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-init)<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-init"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-init/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.
<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-init"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00026 | $0.00759 |
| Opus 5.5 | $0.00010 | $0.00304 |
| Sonnet 5.5 | $0.00005 | $0.00152 |
| Haiku 4.5 | $0.00003 | $0.00076 |
Grade A, and why
wp-init 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.
How it starts
The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Set up a port of the site the user named: $ARGUMENTS.
1. Detect
node "${CLAUDE_PLUGIN_ROOT}/scripts/detect.mjs" --url <url>
This reports the page builder, whether the REST API and a sitemap are available, the pages it found, and which stack the current directory already is. The JSON goes to stdout, the readable summary to stderr.
2. Ask only what detection could not answer
Detection covers the builder, the page list, the stack and the Tailwind version. What is left:
- Which pages to port. The sitemap usually returns everything including blog posts. Show the list and let the user pick. Ten pages is a normal scope; forty is not.
- Styling mode.
tailwindrebuilds the styles from measured values, which is slower and gives clean output.passthroughkeeps the original CSS, which is fast but, on Elementor, means keeping the original wrapper markup too, because the CSS is scoped per post ID. Say that trade-off plainly rather than listing the modes. - Dev server URL, if the guess is wrong.
Do not ask about the builder, the breakpoints or the token names. Those come from measurement later.
3. Write the config
{
"source": {
"url": "https://example.com",
"builder": "elementor",
"restApi": true,
"sitemap": "/wp-sitemap.xml",
"headers": {}
},
"pages": [
{ "slug": "home", "sourcePath": "/", "targetRoute": "/",
"originalRoot": null, "portRoot": "main" }
],
"target": { "stack": "next-app", "componentDir": "components/sections", "routeDir": "app" },
"css": { "mode": "tailwind", "tailwindVersion": 4, "tokenFile": "app/globals.css" },
"viewports": [1440, 1280, 1024, 768, 390],
"mirror": { "dir": ".wp-to-code/mirror", "port": 4321, "images": "remote" },
"port": { "devUrl": "http://localhost:3000" }
}
originalRoot is the selector whose direct children are the page's top-level sections. Leave it null now: you cannot know it until the page is mirrored. /wp-mirror is the next step, and after it you find the root by grepping the mirrored HTML for the builder's page-root class, then checking which candidate has the most sections with /wp-measure --mode sections.
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.
- 3mo ago First seen · 66 lines · 26 tokens per session scan A a59b7c82f9a1
wp-init is a command published in the GitHub repository Abdulkader-Safi/wp-to-code (4 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 759 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.
wp-init compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| wp-initAbdulkader-Safi/wp-to-code | Command | 4 | 3mo ago | MIT | A | 26 | Claude Code |
| brandManavarya09/design-extract | Command | 5.2k | 5d ago | MIT | A | 62 | Claude Code |
| pairManavarya09/design-extract | Command | 5.2k | 5d ago | MIT | A | 60 | Claude Code |
| theme-swapManavarya09/design-extract | Command | 5.2k | 5d ago | MIT | A | 59 | Claude Code |
| dnaManavarya09/design-extract | Command | 5.2k | 5d ago | MIT | A | 19 | Claude Code |
| extractManavarya09/design-extract | Command | 5.2k | 5d ago | MIT | A | 27 | Claude Code |
| fidelityManavarya09/design-extract | Command | 5.2k | 5d ago | MIT | A | 40 | Claude Code |