wp-plugin-options-storage

wp-plugin-options-storage is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 99 tokens per session (4,191 once invoked), scanned A, original, MIT.

A guide to choosing where a WordPress plugin should store its data, such as site settings, user or post metadata, temporary values, or custom database tables. It also covers grouped settings and multisite storage.

In plain words
What is it for?
Use it when designing or reviewing storage for settings, per-user or per-content data, cached results, temporary values, multisite settings, or custom tables.
Why use it?
It prevents plugin data from being stored in the wrong place, loaded unnecessarily, expiring incorrectly, or becoming difficult to query and maintain. The choice affects performance and future changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing or reviewing storage for settings, per-user or per-content data, cached results, temporary values, multisite settings, or custom tables.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/wp-plugin-options-storage
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 Lonsdale201/wp-agent-skills --skill wp-plugin-options-storage
Clone the repo
git clone --depth 1 https://github.com/Lonsdale201/wp-agent-skills

Made for: Claude Code, Codex.

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-plugin-options-storage

README.md
[![agentmods](https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-plugin-options-storage/github.svg)](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-plugin-options-storage)
Your own site
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-plugin-options-storage"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-plugin-options-storage/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-plugin-options-storage

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-plugin-options-storage"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-plugin-options-storage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,191 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00099 $0.04191
Opus 5 $0.00049 $0.02096
Sonnet 5 $0.00020 $0.00838
Haiku 4.5 $0.00010 $0.00419

Measured yesterday against content hash 5d21ae7341c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

wp-plugin-options-storage 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 yesterday.

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.

plugin-scaffold/wp-plugin-options-storage/SKILL.md · 268 lines

How it starts

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

WordPress plugin: options & storage

Where to put the data the plugin owns. WordPress offers several storage primitives — wp_options, four flavors of *_meta, transients, multisite site options/transients, and custom tables — and picking the right one is the single highest-leverage architectural decision for a plugin's long-term performance and maintainability.

This skill covers picking + using them correctly. It does NOT cover one-time activation seeding (see wp-plugin-lifecycle) or REST endpoint validation of stored values (see wp-rest-api).

Multisite caveat (read first)

This skill's author works on single-site WordPress; the multisite advice below is derived from WP source code but has not been end-to-end tested in a multisite environment. The primitives — get_site_option / update_site_option / set_site_transient / delete_site_option — exist and are documented; their semantics here are taken from wp-includes/option.php. If you ship a plugin that has actual multisite users, run an integration test on a real network install before relying on these patterns. Some quirks (switch_to_blog interactions, network admin context detection, blog-id-aware caches) only surface in a real network.

When to use this skill

Trigger when ANY of the following is true:

  • Scaffolding a new plugin's settings page or any persistent state.
  • Reviewing a plugin where you see hundreds of update_option calls — performance smell.
  • Picking where to store a piece of data: option vs meta vs transient vs custom table.
  • Investigating a slow autoload payload (SELECT option_name, option_value FROM wp_options WHERE autoload IN (...)).
  • The user asks "should I JSON this and put it in an option" — short answer below, see "JSON storage trap".

Decision matrix — pick by access pattern

Need Use Key API
Site-wide config, settings page values, feature flags wp_options (single grouped row) get_option / update_option
Per-user data (preferences, dismissed notices; secrets need extra care) user-meta get_user_meta / update_user_meta
Per-post / CPT entry data post-meta get_post_meta / update_post_meta
Per-taxonomy-term data term-meta get_term_meta / update_term_meta
Per-comment data comment-meta get_comment_meta / update_comment_meta
Cached value with TTL (API response, computed result) transient get_transient / set_transient
Network-wide setting in multisite site option get_site_option / update_site_option
Network-wide cached value in multisite site transient get_site_transient / set_site_transient
Many rows with structured fields, queryable, aggregable custom table dbDelta + $wpdb->insert / $wpdb->get_results
Hot-path counter / metric updated many times per second custom table OR object cache $wpdb->query

Read the full file on GitHub · 268 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. yesterday Changed · -1 lines 5d21ae7341c0
  2. 9d ago First seen · 269 lines · 99 tokens per session scan A 58aa1d1c8d77

Subscribe to this mod's changes

wp-plugin-options-storage is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 99 tokens to every session and 4,191 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

wp-plugin-performance

Performance guidelines for WordPress plugin development: database optimization, object caching, conditional asset loading, efficient hooks, HTTP requests, WP-Cron, AJAX/REST optimization, and common anti-patterns. Based on official WordPress Developer Resources and WP VIP documentation.

fernandotellado/ai-skills · 55 tokens

obsidian-bases

Create and edit Obsidian Bases (.base files) with views, filters, formulas, and summaries. Use when working with .base files, creating database-like views of notes, or when the user mentions Bases, table views, card views, filters, or formulas in Obsidian.

kepano/obsidian-skills · 63 tokens

alloydb-basics

Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.

google/skills · 72 tokens

cloud-databases-onboarding

Guides users through discovering their database requirements, recommends a Google Cloud database based on a recommendation matrix, and assists in database creation. Use when a user asks 'What database service should I use?', 'Help me pick a database', or when a user wants to create a new database on Google Cloud.…

google/skills · 83 tokens

supabase

Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron, Queues); client libraries and SSR integrations (supabase-js, @supabase/ssr) in Next.js, React, SvelteKit, Astro, Remix; auth issues (login, logout, sessions, JWT, cookies…

supabase/agent-skills · 185 tokens

supabase-postgres-best-practices

Postgres best practices maintained by Supabase, for Postgres running anywhere. Load this skill BEFORE writing or changing anything that lives in a Postgres database: creating or altering tables and columns (including choosing column types), schema design, migrations and declarative schema files, RLS policies and the…

supabase/agent-skills · 182 tokens