classic-theme-security-standards

classic-theme-security-standards is a skill for Claude Code, Codex from Lonsdale201/wp-agent-skills. It costs 161 tokens per session (2,263 once invoked), scanned A, original, MIT.

A guide to writing secure PHP code in classic WordPress themes, especially code that prints dynamic values or handles forms and requests.

In plain words
What is it for?
Use it to review escaping, input sanitising, validation, nonces, permission checks, template inclusion, and dynamic HTML, URLs, classes, and scripts.
Why use it?
It helps prevent unsafe content from appearing in pages and reduces risks from untrusted input, theme forms, AJAX handlers, and direct database queries.

Skill for Claude CodeCodex

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

Good fit Use it to review escaping, input sanitising, validation, nonces, permission checks, template inclusion, and dynamic HTML, URLs, classes, and scripts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lonsdale201/wp-agent-skills/classic-theme-security-standards
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 classic-theme-security-standards
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 classic-theme-security-standards

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/classic-theme-security-standards"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/classic-theme-security-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,263 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.00161 $0.02263
Opus 5 $0.00081 $0.01131
Sonnet 5 $0.00032 $0.00453
Haiku 4.5 $0.00016 $0.00226

Measured 9d ago against content hash fc6e64781c94, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

classic-theme-security-standards 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 9d 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.

theme-development/classic-theme-security-standards/SKILL.md · 246 lines

How it starts

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

Classic Theme Security Standards

Use this when writing or reviewing PHP in a classic theme. Themes output most of the HTML on a site, so their main security failure mode is unsafe dynamic output.

This skill complements wp-security-audit; it is theme-specific and focused on templates, functions.php, template parts, and theme forms.

When to Use This Skill

  • Reviewing header.php, footer.php, index.php, page.php, single.php, archive.php, 404.php, comments.php, or template-parts/*.php.
  • Reviewing functions.php or inc/*.php in a theme.
  • Theme code reads $_GET, $_POST, $_REQUEST, $_COOKIE, or custom query vars.
  • Theme code prints custom fields, options, term/user meta, search values, image URLs, classes, or inline JS.
  • Theme code has a custom form, AJAX handler, template_include override, or direct SQL.

Escape on Output

Escape at the last possible moment, based on context.

Output context Use
Text node esc_html( $value )
HTML attribute esc_attr( $value )
URL esc_url( $url )
Textarea esc_textarea( $value )
CSS class fragment sanitize_html_class( $class ), then esc_attr() if composing attributes
Limited trusted HTML wp_kses_post( $html ) or wp_kses( $html, $allowed_html )
JavaScript data wp_json_encode( $data ) inside wp_add_inline_script()
Translation in text esc_html__( 'Text', 'mytheme' ) or esc_html_e()
Translation in attribute esc_attr__( 'Text', 'mytheme' ) or esc_attr_e()
<a class="card-link" href="<?php echo esc_url( get_permalink() ); ?>">
    <?php echo esc_html( get_the_title() ); ?>
</a>

Do not escape full editor content with esc_html(). For normal post content, use the_content() and let WordPress content filters run. For custom HTML fields, use wp_kses_post() or a narrower allowlist.

Sanitize Input, Validate Meaning

Request data is slashed. Unslash first, then sanitize, then validate.

$raw_layout = isset( $_GET['layout'] )
    ? wp_unslash( $_GET['layout'] )
    : 'grid';

$layout = sanitize_key( $raw_layout );

if ( ! in_array( $layout, array( 'grid', 'list' ), true ) ) {
    $layout = 'grid';
}

Read the full file on GitHub · 246 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. 9d ago First seen · 246 lines · 161 tokens per session scan A fc6e64781c94

Subscribe to this mod's changes

classic-theme-security-standards is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 161 tokens to every session and 2,263 once invoked, about $0.0008 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

astro-seo

Audits and improves SEO for Astro sites. Use when the user asks to audit, set up, or improve SEO on an Astro site, or mentions head metadata, structured data, JSON-LD, sitemaps, IndexNow, Open Graph images, schema endpoints, NLWeb, hreflang, or search engine indexing in an Astro project. Produces drop-in code routed…

jdevalk/skills · 105 tokens

static-seo

Audits and improves SEO for static HTML sites. Use when the user asks to audit, set up, or improve SEO on a static site (Hugo, Jekyll, 11ty, Gatsby, Next.js static export, hand-rolled HTML, or wp-static-clone output), or mentions head metadata, structured data, JSON-LD, sitemaps, IndexNow, Open Graph images, schema…

jdevalk/skills · 143 tokens

readability-check

Runs a readability audit on a blog post draft or other multi-paragraph prose, calibrated for readers who read English as a second language. Checks ten categories — overall structure and topic order, paragraph structure, opening paragraph strength, tiered sentence length, passive voice, difficult words, filler and…

jdevalk/skills · 179 tokens

content-seo

Audits a blog post draft or page copy for content-level SEO: search intent fit, focus keyphrase placement, E-E-A-T signals (experience, expertise, authoritativeness, trustworthiness), helpfulness and originality, content freshness, and internal linking. Use when the user asks "will this rank", "SEO check this post"…

jdevalk/skills · 155 tokens

wp-static-clone

Clones a live WordPress (or other CMS-driven) site into a static HTML site deployable on any static host (Cloudflare Pages, Netlify, Vercel, S3+CloudFront, plain Apache/nginx). Use when the user wants to "scrape", "freeze", "archive", "static-ify", or "move to [host]" a WordPress site, or asks to turn a sitemap into…

jdevalk/skills · 137 tokens

metadata-check

Reviews short high-value strings — page titles, meta descriptions, schema description fields, FAQ answers, GitHub repo taglines, profile bios, social-card copy, and other metadata where Flesch and paragraph-level readability checks don't apply. Checks front-loading, concreteness, filler, active voice…

jdevalk/skills · 157 tokens