wp-measure

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

A command that records a web page’s layout, sections, content, or interactive elements in a file. A layout tree describes the page’s nested elements and their sizes and positions.

In plain words
What is it for?
Use it to inspect sections, text, images, links, forms, menus, sliders, accordions, and other page elements.
Why use it?
It gives you measurable page details when recreating or checking a web page, instead of relying on visual guesses.

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 inspect sections, text, images, links, forms, menus, sliders, accordions, and other page elements.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/abdulkader-safi/wp-to-code/wp-measure"><img src="https://agentmods.dev/badge/commands/abdulkader-safi/wp-to-code/wp-measure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 578 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.00019 $0.00578
Opus 5.5 $0.00008 $0.00231
Sonnet 5.5 $0.00004 $0.00116
Haiku 4.5 $0.00002 $0.00058

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

Security

Grade A, and why

wp-measure 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-measure.md · 49 lines

How it starts

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

Measure the page the user named: $ARGUMENTS.

NODE_PATH="${CLAUDE_PLUGIN_DATA}/node_modules" \
  node "${CLAUDE_PLUGIN_ROOT}/scripts/measure.mjs" \
  --page <slug> --side original --mode tree [--viewport 1440]

Modes

Mode Use it for
sections First look at a page. Top-level blocks with height, top, padding, background.
tree Writing a section. Every element with text or an image, with rect, font, margin, padding.
content Text, image URLs, hrefs, alt text. Nothing about geometry.
interactive Inventory of sliders, menus, accordions, forms and video that need behaviour reimplemented.

Run sections first. Only run tree for the section you are about to write.

Context discipline

The dump goes to a file under .wp-to-code/measure/. The command prints a summary; that summary is usually all you need.

Never read a whole tree dump into the conversation. A 3000px section is tens of thousands of tokens and it will stall the session. Query the file instead:

# every element inside one section, height and font only
jq '.nodes[] | select(.path | startswith("section:nth-child(4)"))
    | {path, text, h: .rect.height, size: .font.size, lh: .font.lineHeight}' \
  .wp-to-code/measure/home-original-1440-tree.json

# what line-heights are actually in use
jq -r '.nodes[].font | "\(.size)/\(.lineHeight)"' <file> | sort -u

Print only what you are about to act on.

Reading geometry

Take line-height from the measurement, never from a named token. A lineHeight: "normal" in the dump resolves to roughly 1.5x the font size, and designs rarely want that. Every normal in the summary is a value you need to check against the original rather than inherit.

Read the full file on GitHub · 49 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 · 49 lines · 19 tokens per session scan A d0a9f4ee8ef3

Subscribe to this mod's changes

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

wp-measure next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
wp-measureAbdulkader-Safi/wp-to-codeCommand43mo agoMITA19Claude 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