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.
npx agentmods add skills/xonack/wp-php-architecture-claude-skill/wp-php-architecturenpx skills add xonack/wp-php-architecture-claude-skill --skill wp-php-architecturegit clone --depth 1 https://github.com/xonack/wp-php-architecture-claude-skillWrote 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.
[](https://agentmods.dev/skills/xonack/wp-php-architecture-claude-skill/wp-php-architecture)<a href="https://agentmods.dev/skills/xonack/wp-php-architecture-claude-skill/wp-php-architecture"><img src="https://agentmods.dev/badge/skills/xonack/wp-php-architecture-claude-skill/wp-php-architecture.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.05850 |
| Opus 5 | $0.00023 | $0.02925 |
| Sonnet 5 | $0.00009 | $0.01170 |
| Haiku 4.5 | $0.00005 | $0.00585 |
Grade A, and why
wp-php-architecture 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 808 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WordPress PHP Architecture Patterns
This skill encodes battle-tested architecture patterns for WordPress PHP development. Every pattern is adapted to WordPress realities: global state, hook-driven execution, no native DI container, and the functions.php bootstrap model. Use these patterns to write WordPress code that is testable, maintainable, and scalable.
1. Repository Pattern for WordPress
Wrap all data access behind repository classes. Never scatter $wpdb calls or raw WP_Query usage across business logic.
Base Repository Interface
interface PostRepositoryInterface {
public function find_by_id( int $id ): ?object;
public function find_all( array $criteria = [] ): array;
public function save( object $entity ): int;
public function delete( int $id ): bool;
}
WP_Query Repository Implementation
class ProductRepository implements PostRepositoryInterface {
private string $post_type = 'product';
public function find_by_id( int $id ): ?Product {
$post = get_post( $id );
if ( ! $post || $post->post_type !== $this->post_type ) {
return null;
}
return $this->hydrate( $post );
}
public function find_all( array $criteria = [] ): array {
$defaults = [
'post_type' => $this->post_type,
'posts_per_page' => 20,
'post_status' => 'publish',
];
$query = new WP_Query( array_merge( $defaults, $criteria ) );
return array_map( [ $this, 'hydrate' ], $query->posts );
}
public function save( object $entity ): int {
$args = [
'post_type' => $this->post_type,
'post_title' => $entity->get_name(),
'post_content' => $entity->get_description(),
'post_status' => 'publish',
];
if ( $entity->get_id() ) {
$args['ID'] = $entity->get_id();
wp_update_post( $args );
$id = $entity->get_id();
} else {
$id = wp_insert_post( $args );
}
update_post_meta( $id, '_product_price', $entity->get_price()->amount() );
update_post_meta( $id, '_product_sku', $entity->get_sku() );
return $id;
}
public function delete( int $id ): bool {
return (bool) wp_delete_post( $id, true );
}
private function hydrate( WP_Post $post ): Product {
return new Product(
id: $post->ID,
name: $post->post_title,
description: $post->post_content,
price: new Money( (float) get_post_meta( $post->ID, '_product_price', true ) ),
sku: (string) get_post_meta( $post->ID, '_product_sku', true ),
);
}
}
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.
- 5d ago First seen · 808 lines · 45 tokens per session scan A dc49380447d0
wp-php-architecture is a skill published in the GitHub repository xonack/wp-php-architecture-claude-skill (3 stars, last pushed 7mo ago), licensed MIT. It adds 45 tokens to every session and 5,850 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.
Other skills, from other repositories
wp-ux-design
WordPress UX and design enforcement — Core Web Vitals, mobile-first layout, typography, color systems, navigation, page builder patterns, image optimization, form UX, loading and error states, admin UX, and performance checklists with concrete CSS/HTML/PHP examples.
craftcms
Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…
craft-php-guidelines
Craft CMS 5 PHP coding standards and conventions. ALWAYS load when writing, editing, reviewing, or discussing any PHP in a Craft plugin or module — even small edits. Also when running ECS, PHPStan, or scaffolding with ddev craft make. Covers: PHPDoc blocks (@author, @since, @throws chains), section headers…
craft-pest
Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…
codex-agent-collaboration
Delegate coding tasks to Codex AI for implementation, analysis, and alternative solutions. Use when you need a second AI perspective, want to explore different approaches, or need specialized Codex capabilities for complex coding tasks.
laravel-13-expert
Comprehensive Laravel 13.x expert skill covering the entire framework — installation, configuration, routing, controllers, middleware, Blade views, Eloquent ORM, migrations, queues, jobs, events, mail, notifications, caching, Redis, scheduling, service container, service providers, authentication, authorization, AI…