wp-multisite

wp-multisite is a skill for Claude Code from mralaminahamed/wp-dev-skills. It costs 283 tokens per session (2,614 once invoked), scanned A, original, MIT.

A guide for building WordPress plugins that work across a Multisite network, where one WordPress installation serves several separate sites.

In plain words
What is it for?
Adding network-wide settings, supporting network administrators, checking super-admin access, looping through sites, and fixing Multisite issues such as incorrect database table prefixes.
Why use it?
It addresses network activation, shared versus site-specific settings, permissions, and safe operations across multiple sites.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the wp-dev-skills plugin — 19 skills, 1 command shipped together

Good fit Adding network-wide settings, supporting network administrators, checking super-admin access, looping through sites, and fixing Multisite issues such as incorrect database table prefixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mralaminahamed/wp-dev-skills/wp-multisite
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mralaminahamed/wp-dev-skills --skill wp-multisite
Clone the repo
git clone --depth 1 https://github.com/mralaminahamed/wp-dev-skills

Made for: Claude Code.

Or install wp-dev-skills, the plugin that ships this one along with the rest of its 19 skills, 1 command.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-multisite.svg)](https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-multisite)
Your own site
<a href="https://agentmods.dev/skills/mralaminahamed/wp-dev-skills/wp-multisite"><img src="https://agentmods.dev/badge/skills/mralaminahamed/wp-dev-skills/wp-multisite.svg" alt="Measured on agentmods" height="20"></a>
Per session 283 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,614 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.00283 $0.02614
Opus 5 $0.00142 $0.01307
Sonnet 5 $0.00057 $0.00523
Haiku 4.5 $0.00028 $0.00261

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

Security

Grade A, and why

wp-multisite 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.

skills/wp-multisite/SKILL.md · 253 lines

How it starts

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

WordPress Multisite Plugin Development

Model note: Adapting an existing plugin for multisite involves scattered conditional changes — requires reading across many files to find all get_option/update_option and activation hooks. Use sonnet; haiku may miss indirect callers. New builds with multisite in mind from the start are straightforward and can use haiku.

Adapt and build plugins that work correctly on WordPress multisite networks. Covers activation scope, option storage, network admin UI, capability model, and safe site-switching patterns.

When to use

  • "Make my plugin multisite compatible", "support network activation".
  • "Add a network admin settings page", "store a network-wide option".
  • "Loop over all sites and do X", "run a task on every blog".
  • "Why does my plugin break on multisite?", "fix table prefix issues".
  • "Check if a user is super admin", "restrict to network admin only".

Not for: WP-CLI multisite operations — use wp-wpcli-and-ops (official skill). General plugin architecture — use wp-plugin-development.

Method

1. Detection and guarding

// Is this a multisite network?
if ( is_multisite() ) { ... }

// Is the current screen the network admin?
if ( is_network_admin() ) { ... }

// Is the plugin network-activated?
if ( is_plugin_active_for_network( plugin_basename( __FILE__ ) ) ) { ... }

// Is the user a super admin?
if ( current_user_can( 'manage_network' ) ) { ... }  // preferred
if ( is_super_admin() ) { ... }                       // also fine

Never assume is_multisite() is false — always write code that handles both cases unless the plugin explicitly requires multisite.

2. Activation scope

A plugin can be:

  • Site-activated — active on one site, hooks run only on that site.
  • Network-activated — active on all sites, activation hook runs once on the network.
register_activation_hook( __FILE__, 'my_plugin_activate' );

function my_plugin_activate( $network_wide ) {
    if ( $network_wide && is_multisite() ) {
        // Run setup for every existing site
        $sites = get_sites( [ 'number' => 0, 'fields' => 'ids' ] );
        foreach ( $sites as $site_id ) {
            switch_to_blog( $site_id );
            my_plugin_setup_site();
            restore_current_blog();
        }
    } else {
        my_plugin_setup_site();
    }
}

// Also run setup when a new site is created (for network-activated plugins)
add_action( 'wp_initialize_site', function( WP_Site $new_site ) {
    if ( is_plugin_active_for_network( plugin_basename( __FILE__ ) ) ) {
        switch_to_blog( $new_site->blog_id );
        my_plugin_setup_site();
        restore_current_blog();
    }
} );

Read the full file on GitHub · 253 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 253 lines · 283 tokens per session scan A 5dbe778b6bd9

Subscribe to this mod's changes

wp-multisite is a skill published in the GitHub repository mralaminahamed/wp-dev-skills (27 stars, last pushed 1mo ago), licensed MIT. It adds 283 tokens to every session and 2,614 once invoked, about $0.0014 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-30.

Related

Other skills, from other repositories

woocommerce-plugin-development

Create custom WooCommerce plugins using action/filter hooks, the Settings API, and REST API extensions to add features without modifying core.

finsilabs/awesome-ecommerce-skills · 28 tokens

wp-performance-review

WordPress performance code review and optimization analysis. Use when reviewing WordPress PHP code for performance issues, auditing themes/plugins for scalability, optimizing WPQuery, analyzing caching strategies, checking code before launch, or detecting anti-patterns, or when user mentions "performance review"…

elvismdev/claude-wordpress-skills · 122 tokens

add-matrix

Add Matrix channel integration via Chat SDK. Works with any Matrix homeserver.

nanocoai/nanoclaw · 19 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

sns

AWS SNS notification service for pub/sub messaging. Use when creating topics, managing subscriptions, configuring message filtering, sending notifications, or setting up mobile push.

itsmostafa/aws-agent-skills · 32 tokens

cognito

AWS Cognito user authentication and authorization service. Use when setting up user pools, configuring identity pools, implementing OAuth flows, managing user attributes, or integrating with social identity providers.

itsmostafa/aws-agent-skills · 38 tokens