wp-polylang

wp-polylang is a command for Claude Code from yojahny55/claude-wp-builder. It costs 14 tokens per session (1,459 once invoked), scanned A, original, MIT.

A command that adds a second language to an existing WordPress site using Polylang, a plugin that connects translated versions of pages and other content.

In plain words
What is it for?
Use it to configure source and target languages and translate an existing site one target language at a time.
Why use it?
It avoids manually creating and linking translations or configuring the language setup by hand.

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

Good fit Use it to configure source and target languages and translate an existing site one target language at a time.

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 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, 30 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-polylang

README.md
[![agentmods](https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-polylang.svg)](https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-polylang)
Your own site
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-polylang"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-polylang.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,459 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.00014 $0.01459
Opus 5 $0.00007 $0.00730
Sonnet 5 $0.00003 $0.00292
Haiku 4.5 $0.00001 $0.00146

Measured 8d ago against content hash 0eb8eed11805, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

wp-polylang 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 8d 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-polylang.md · 157 lines

How it starts

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

/wp-polylang

Translate an existing site into a second language through Polylang. Run from the WordPress root.

Required skill: read skills/wp-polylang/SKILL.md before doing anything. It documents the data model and the API contract, and the failure mode this command exists to avoid.

Step 1: Parse arguments

$ARGUMENTS is <source_lang> <target_lang>, e.g. es en. Both are required; error and exit if either is missing:

Error: source and target language are required.
Usage: /wp-polylang <source_lang> <target_lang>

One target language per run. For a third language, run the command again.

Confirm the working directory is a WordPress root — wp-config.php must be present. If it is not, stop and say so.

Set SCRIPTS="${CLAUDE_PLUGIN_ROOT}/skills/wp-polylang/scripts".

Step 2: Ensure Polylang is installed

# Three states, not two: active, installed-but-deactivated, absent. `install` on an
# already-installed plugin is not a reliable activator, so try activation first.
wp plugin is-active polylang \
  || wp plugin activate polylang \
  || wp plugin install polylang --activate

Step 3: Configure languages

wp eval-file "$SCRIPTS/pll-setup.php" <source_lang> <target_lang>

Creates whichever of the two languages Polylang does not already have configured, using a sane predefined locale (enen_US, eses_ES, not Polylang's own first-match, which is en_AU / es_AR). Succeeds silently — and prints "Configured languages: …" either way — when both languages already exist, so it is always safe to run.

Stop if it exits non-zero — it prints exactly what is wrong (Polylang not active, an unrecognised language code, or source and target being the same language).

Step 4: Export what needs translating

MANIFEST="$(mktemp -t pll-manifest-XXXXXX.json)"
wp eval-file "$SCRIPTS/pll-export.php" <source_lang> <target_lang> "$MANIFEST"

Walks every translatable post type and taxonomy — posts, terms, registered strings, and per-language menus — and writes only what is missing or stale into $MANIFEST. Prints Exported <n> item(s), skipped <n> already current. Read the reported item count and the unassigned-language warning, if any.

Read the full file on GitHub · 157 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. 8d ago First seen · 157 lines · 14 tokens per session scan A 0eb8eed11805

Subscribe to this mod's changes

wp-polylang is a command published in the GitHub repository yojahny55/claude-wp-builder (6 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 1,459 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.