wordpress-claude-stack: Cursor rule for Cursor

.cursorrules

cursorrules is a cursor rule for Cursor from mvtandas/wordpress-claude-stack. It costs 706 tokens per session, scanned A, original, MIT.

A set of rules for developing WordPress sites and extensions with PHP, Gutenberg, WooCommerce, and related WordPress tools.

In plain words
What is it for?
Use it when building or reviewing WordPress themes, plugins, templates, forms, database queries, and reusable components.
Why use it?
It makes code safer and more consistent by requiring practices such as input sanitising, output escaping, permission checks, and prepared database queries.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is mvtandas/wordpress-claude-stack's own configuration. It tells Cursor how to work on wordpress-claude-stack itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wordpress-claude-stack configures →

Reuse

Borrowing it

Nothing to install: this file belongs to mvtandas/wordpress-claude-stack. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mvtandas/wordpress-claude-stack/main/.cursorrules
Clone the repo
git clone --depth 1 https://github.com/mvtandas/wordpress-claude-stack

Made for: Cursor.

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 cursorrules

README.md
[![agentmods](https://agentmods.dev/badge/rules/mvtandas/wordpress-claude-stack/cursorrules/github.svg)](https://agentmods.dev/rules/mvtandas/wordpress-claude-stack/cursorrules)
Your own site
<a href="https://agentmods.dev/rules/mvtandas/wordpress-claude-stack/cursorrules"><img src="https://agentmods.dev/badge/rules/mvtandas/wordpress-claude-stack/cursorrules/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 cursorrules

Your own site · 80×15
<a href="https://agentmods.dev/rules/mvtandas/wordpress-claude-stack/cursorrules"><img src="https://agentmods.dev/badge/rules/mvtandas/wordpress-claude-stack/cursorrules.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 706 This file is loaded in full into every session.
When invoked 706 The same file — it is already loaded in full.
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.00706 $0.00706
Opus 5.5 $0.00282 $0.00282
Sonnet 5.5 $0.00141 $0.00141
Haiku 4.5 $0.00071 $0.00071

Measured 1mo ago against content hash b97459725b9a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cursorrules 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 1mo 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.

.cursorrules · 74 lines

How it starts

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

You are an expert WordPress developer with deep knowledge of PHP, Gutenberg, WooCommerce, ACF, and the WordPress ecosystem.

Core Principles

  • Follow WordPress Coding Standards (WPCS) strictly
  • Always use declare(strict_types=1) in PHP files
  • Escape ALL output, sanitize ALL input, prepare ALL queries
  • Use WordPress APIs — never reinvent what WordPress provides
  • Prefix everything with project namespace to avoid conflicts

PHP Rules

  • Type hints on all parameters and return types
  • Use WP_Query or get_posts() — never query_posts()
  • Use $wpdb->prepare() for ALL database queries
  • Use wp_verify_nonce() on ALL form submissions
  • Use current_user_can() for ALL permission checks
  • Use esc_html(), esc_attr(), esc_url(), wp_kses_post() for output
  • Use sanitize_text_field(), absint(), wp_unslash() for input

Theme Development

  • Use add_theme_support() for WordPress features
  • Enqueue scripts/styles with wp_enqueue_script() / wp_enqueue_style()
  • Use template hierarchy: single-{post_type}.php, archive-{post_type}.php
  • Use get_template_part() for reusable components
  • Keep logic in functions.php / inc/, templates should only render

Plugin Development

  • Main plugin class pattern with singleton or DI
  • Activation/deactivation hooks with register_activation_hook()
  • uninstall.php for cleanup on uninstall
  • Use WordPress Settings API for admin pages
  • Use register_rest_route() for REST endpoints

Gutenberg Blocks

  • Use block.json for metadata
  • Use @wordpress/scripts for build tooling
  • Use useBlockProps() and InnerBlocks in React/JSX
  • Register with register_block_type() in PHP
  • Dynamic blocks: use render_callback or render.php

WooCommerce

  • Override templates via theme/woocommerce/ directory
  • Use WooCommerce hooks, never modify core
  • Use wc_get_product(), WC()->cart, WC()->session
  • Use HPOS-compatible code (no direct postmeta for orders)

Advanced Custom Fields

  • Register field groups in PHP for version control
  • Use get_field(), the_field(), have_rows()
  • Use ACF blocks for Gutenberg integration
  • Always provide fallback values

Read the full file on GitHub · 74 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. 1mo ago First seen · 74 lines · 706 tokens per session scan A b97459725b9a

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository mvtandas/wordpress-claude-stack (3 stars, last pushed 6mo ago), licensed MIT. It adds 706 tokens to every session, about $0.0028 per session on Opus 5.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.