wp-header

wp-header is a command for Claude Code from yojahny55/claude-wp-builder. It costs 19 tokens per session (3,803 once invoked), scanned A, original, MIT.

A command for building a responsive WordPress header, including navigation, a logo, a language switcher, and WordPress's menu system. Responsive means the header adapts to different screen sizes.

In plain words
What is it for?
Use it to inspect a demo header, reproduce its layout and mobile behavior, connect menus and site settings, and generate the theme header.
Why use it?
It turns the header from a visual demo into a working part of the theme and checks the project's existing settings before building it.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

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 claude-wp-builder plugin — 15 skills, 28 commands, 15 agents shipped together

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 yojahny55/claude-wp-builder
Claude Code
/plugin install claude-wp-builder

Made for: Claude Code.

Or install claude-wp-builder, the plugin that ships this one along with the rest of its 15 skills, 28 commands, 15 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-header.svg)](https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-header)
Your own site
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-header"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-header.svg" alt="Measured on agentmods" 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 3,803 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.03803
Opus 5 $0.00010 $0.01902
Sonnet 5 $0.00004 $0.00761
Haiku 4.5 $0.00002 $0.00380

Measured 3d ago against content hash 8181750011d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

wp-header 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 3d 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.

commands/wp-header.md · 320 lines

How it starts

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

WP Header — WordPress Header Builder

Generate a fully functional WordPress header with responsive navigation, logo from settings, language switcher, and WP menu system integration.

Step 1: Read Project Context

Read .claude/CLAUDE.md to extract:

  • Function prefix (e.g., kairo_)
  • Theme slug
  • Languages (primary + secondary)
  • Theme directory path

If .claude/CLAUDE.md does not exist, tell the user to run /wp-init first.

Step 2: Read Demo Header

Read demo/index.html and extract the header/nav section (between <!-- ============ SECTION: Header ============ --> delimiters, or the <header> element).

Analyze:

  • Navigation structure (single-level or dropdowns)
  • Logo placement (left, center, etc.)
  • Language switcher position
  • Whether the header is sticky/fixed
  • CTA button in nav (if any)
  • Mobile menu behavior

Step 3: Screenshot Reference (Optional)

If $ARGUMENTS provides a screenshot path, read the screenshot file for additional visual reference. Use it to inform layout decisions that might not be captured in the HTML demo.

Step 4: Dispatch wp-template Agent

Dispatch the wp-template agent with these instructions:

Generate the following files in the theme directory:

header.php

  • Start with <!DOCTYPE html>, <html <?php language_attributes(); ?>>, <head>, <meta charset>, <meta viewport>, <?php wp_head(); ?>, </head>
  • <body <?php body_class(); ?>>
  • Site header with:
    • Logo from settings: prefix_get_field('site_logo', 'option') with fallback to get_bloginfo('name')
    • wp_nav_menu() call using the location the project's i18n strategy registers: under suffix, the per-language location ('primary_' . prefix_get_current_lang()); under polylang, the bare location (primary) — Step 7 registers one location per name there
    • Use the custom nav walker class
    • Language switcher per the project's i18n strategy: under suffix, render all configured languages (from SUPPORTED_LANGS) with active state, linking through prefix_get_lang_url(); under polylang, render it with pll_the_languages() — Step 7 says why (it marks the current language and hides languages with no counterpart)
    • Mobile hamburger toggle button with aria attributes
    • Skip-to-content link for accessibility

inc/nav-walker.php

  • Custom Walker_Nav_Menu extension named Prefix_Nav_Walker (using actual prefix)
  • Support for dropdown/submenu items if the demo has them
  • Proper escaping on all output

Class naming — include the line matching the project's Template:, drop the other

Both files above are yours on both paths; only the class system changes.

  • basic → BEM class naming on output elements
  • tailwind → keep the Tailwind utility classes already on the demo header you were handed, element for element. Never replace them with BEM names and never invent new class names: wp-tailwind runs after you and renames only the groups its promotion ladder promotes. See "File ownership" under "CSS agent routing" below.

Make sure to match the visual layout from the demo as closely as possible.

Read the full file on GitHub · 320 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. 3d ago Changed · +13 lines 8181750011d5
  2. 6d ago First seen · 307 lines · 19 tokens per session scan A fb80b553efb4

Subscribe to this mod's changes

wp-header is a command published in the GitHub repository yojahny55/claude-wp-builder (6 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 3,803 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.

Related

Other commands, from other repositories