wordpress-quality

wordpress-quality is a skill for Claude Code from morodomi/tdd-skills. It costs 34 tokens per session (663 once invoked), scanned A, original, MIT.

A quality-checking workflow for WordPress and Bedrock projects, using PHPStan, coding-standard checks, and PHPUnit tests. PHPUnit is a tool for automatically testing PHP code.

In plain words
What is it for?
Use it to run static analysis, check WordPress coding standards, run tests, and organize unit tests separately from integration tests that need a WordPress environment.
Why use it?
It provides separate checks for code errors, WordPress coding rules, and behavior that works only inside WordPress.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the tdd-wordpress plugin — 1 skill shipped together

Good fit Use it to run static analysis, check WordPress coding standards, run tests, and organize unit tests separately from integration tests that need a WordPress environment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/morodomi/tdd-skills/wordpress-quality
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 morodomi/tdd-skills --skill wordpress-quality
Clone the repo
git clone --depth 1 https://github.com/morodomi/tdd-skills

Made for: Claude Code.

Or install tdd-wordpress, the plugin that ships this one along with the rest of its 1 skill.

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 wordpress-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/morodomi/tdd-skills/wordpress-quality.svg)](https://agentmods.dev/skills/morodomi/tdd-skills/wordpress-quality)
Your own site
<a href="https://agentmods.dev/skills/morodomi/tdd-skills/wordpress-quality"><img src="https://agentmods.dev/badge/skills/morodomi/tdd-skills/wordpress-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 663 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.00034 $0.00663
Opus 5 $0.00017 $0.00331
Sonnet 5 $0.00007 $0.00133
Haiku 4.5 $0.00003 $0.00066

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

Security

Grade A, and why

wordpress-quality 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.

plugins/tdd-wordpress/skills/wordpress-quality/SKILL.md · 92 lines

What it actually says

WordPress Quality Check

WordPress/Bedrock プロジェクト固有の品質チェックツール。

汎用PHPツールは tdd-php 参照。

Commands

ツール コマンド 用途
PHPStan ./vendor/bin/phpstan analyse 静的解析(phpstan-wordpress)
WPCS ./vendor/bin/phpcs --standard=WordPress コーディング規約
PHPUnit ./vendor/bin/phpunit テスト実行

WP_UnitTestCase Helpers

ヘルパー 用途
$this->factory()->user->create() ユーザー作成
$this->factory()->post->create() 投稿作成
$this->go_to($url) URL遷移シミュレート
wp_set_current_user($id) 現在ユーザー設定

Test Categories

Unit vs Integration

カテゴリ 対象
Unit 単一クラス、フック不使用 Helper, Utility
Integration WordPress環境依存 Hook, REST API, CPT

テスト配置

tests/
├── unit/           # 単体テスト(WP不要)
│   └── HelperTest.php
└── integration/    # 統合テスト(WP必要)
    ├── HookTest.php
    └── RestApiTest.php

Hook Tests

class HookTest extends WP_UnitTestCase
{
    public function test_filter_modifies_content(): void
    {
        add_filter('the_content', 'my_content_filter');
        $result = apply_filters('the_content', 'Hello');
        $this->assertStringContainsString('Modified', $result);
    }
}

REST API Tests

class RestApiTest extends WP_UnitTestCase
{
    public function test_get_items(): void
    {
        $admin = $this->factory()->user->create(['role' => 'administrator']);
        wp_set_current_user($admin);
        $request = new WP_REST_Request('GET', '/wp/v2/posts');
        $response = rest_do_request($request);
        $this->assertEquals(200, $response->get_status());
    }
}

Quality Standards

項目 目標
PHPStan Level 6+(phpstan-wordpress)
カバレッジ 90%+
WPCS エラー0

Reference

Files

What ships with it

1 file 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 · 92 lines · 34 tokens per session scan A 5c26fda7cb02

Subscribe to this mod's changes

wordpress-quality is a skill published in the GitHub repository morodomi/tdd-skills (8 stars, last pushed 6mo ago), licensed MIT. It adds 34 tokens to every session and 663 once invoked, about $0.0002 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.