wp-port

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

A command for writing a measured page section in the style and code structure of a target web project. It is part of a workflow for rebuilding pages from an existing site.

In plain words
What is it for?
Use it to build a named page in Laravel Blade, Next.js, Astro, plain HTML, or another supported stack. It measures the relevant sections, checks existing components, and writes the needed code.
Why use it?
It reduces visual mismatches and duplicate code by checking the page measurements and looking for reusable components first. It also accounts for framework-specific implementation issues before code is written.

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 build a named page in Laravel Blade, Next.js, Astro, plain HTML, or another supported stack. It measures the relevant sections, checks existing components, and writes the needed code.

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-port

README.md
[![agentmods](https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-port/github.svg)](https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-port)
Your own site
<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-port"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-port/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-port

Your own site · 80×15
<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-port"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-port.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 609 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.00018 $0.00609
Opus 5.5 $0.00007 $0.00244
Sonnet 5.5 $0.00004 $0.00122
Haiku 4.5 $0.00002 $0.00061

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

Security

Grade A, and why

wp-port 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-port.md · 38 lines

How it starts

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

Port the page the user named: $ARGUMENTS.

Read the porting-gotchas skill first. It lists the failures that pass a height check, and reading it after writing the markup is worth much less than reading it before.

Then read the adapter for the stack in target.stack: ${CLAUDE_PLUGIN_ROOT}/adapters/<stack>.md. Only laravel-blade, next-app, astro and plain-html have one. For any other stack read ${CLAUDE_PLUGIN_ROOT}/adapters/_generic.md, which tells you what to work out from the project itself.

Order

  1. See the page. /wp-measure <page> --mode sections. This tells you how many sections there are and which of them you have already built for another page.

  2. Check for reuse before writing anything new. Look at what already exists in target.componentDir. On the source project, reuse ran high after the first two pages: services needed 1 new section of 5, events 1 of 7, about-us 2 of 8, team 0 of 4. If a section is the same block with different content, it is a prop, not a new component.

  3. Measure the one section you are about to write. /wp-measure <page> --mode tree, then query the dump for that section's subtree. Do not read the whole file into the conversation.

  4. Get the content separately. --mode content, or the REST API if source.restApi is true. Mixing content and geometry in one pass produces output too large to read.

  5. Write it. Measured numbers as arbitrary values. No rounding to the spacing scale.

  6. /wp-diff <page>. Fix the first section with a delta, run again. Two to four rounds is normal.

Component shape

Props are flat and string-keyed, matching what a CMS repeater returns, so wiring the CMS later is passing data through rather than reshaping it.

Variation between pages is a prop: padding, container width, row height. Pass literal class strings. Never build a class name by interpolation, in any stack, for any reason: the Tailwind scanner reads source text and an interpolated name produces no CSS and no error.

Read the full file on GitHub · 38 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 · 38 lines · 18 tokens per session scan A 543e22d77697

Subscribe to this mod's changes

wp-port is a command published in the GitHub repository Abdulkader-Safi/wp-to-code (4 stars, last pushed 3mo ago), licensed MIT. It adds 18 tokens to every session and 609 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-port compared with commands from other repositories

wp-port next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
wp-portAbdulkader-Safi/wp-to-codeCommand43mo agoMITA18Claude Code
brandManavarya09/design-extractCommand5.2k5d agoMITA62Claude Code
pairManavarya09/design-extractCommand5.2k5d agoMITA60Claude Code
theme-swapManavarya09/design-extractCommand5.2k5d agoMITA59Claude Code
dnaManavarya09/design-extractCommand5.2k5d agoMITA19Claude Code
extractManavarya09/design-extractCommand5.2k5d agoMITA27Claude Code
fidelityManavarya09/design-extractCommand5.2k5d agoMITA40Claude Code