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 skills add Lonsdale201/wp-agent-skills --skill wp-ai-clientgit clone --depth 1 https://github.com/Lonsdale201/wp-agent-skillsWrote 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/lonsdale201/wp-agent-skills/wp-ai-client)<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-ai-client"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-ai-client/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.
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/wp-ai-client"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/wp-ai-client.svg" alt="Reviewed on agentmods" width="80" 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.00130 | $0.02514 |
| Opus 5 | $0.00065 | $0.01257 |
| Sonnet 5 | $0.00026 | $0.00503 |
| Haiku 4.5 | $0.00013 | $0.00251 |
Grade A, and why
wp-ai-client 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.
How it starts
The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.
WordPress AI Client
WordPress 7.0 added a provider-agnostic WP AI Client. Plugin code asks WordPress for a prompt builder, declares what it needs, and lets configured providers/models handle execution. WordPress 7.1 improves Ability schema interoperability, mixed function-call resolution, and cache isolation. Credentials are managed through Settings > Connectors and the Connectors API.
When to use this skill
Trigger when ANY of the following is true:
- Code calls
wp_ai_client_prompt(),wp_supports_ai(),using_model_preference(),generate_text(),generate_image(),as_json_response(), orusing_abilities(). - A plugin adds AI-assisted content generation, summarization, analysis, media generation, chat, or agent workflow features.
- The task mentions WP AI Client, AI providers, model preferences, AI Connectors,
WP_AI_Client_Prompt_Builder, or AI-generated output in WordPress. - Reviewing whether an AI feature degrades correctly when no provider is configured.
Availability
The WP AI Client is available in WordPress 7.0+. Guard code for older sites and feature-detect 7.1 helpers/hooks when supporting 7.0:
if ( ! function_exists( 'wp_ai_client_prompt' ) || ! wp_supports_ai() ) {
return new WP_Error( 'ai_unavailable', __( 'AI is not available on this site.', 'myplugin' ) );
}
wp_supports_ai() returns false when WP_AI_SUPPORT is defined as false, and can be filtered through wp_supports_ai. Treat it as a runtime feature flag, not a version check.
Basic workflow
- Gate the feature by capability, nonce/request intent, and
wp_supports_ai(). - Build a prompt with
wp_ai_client_prompt(). - Prefer model capabilities or
using_model_preference()instead of hard-coding one provider. - Call
is_supported_*()before showing UI or starting expensive work. - Call a
generate_*method and handleWP_Error. - Escape or sanitize AI output according to where it is used.
Text generation
$builder = wp_ai_client_prompt( 'Write a short product summary for: ' . $product_name )
->using_system_instruction( 'Return concise, factual marketing copy.' )
->using_temperature( 0.3 )
->using_model_preference(
'provider-a/model-id',
'provider-b/model-id'
);
if ( ! $builder->is_supported_for_text_generation() ) {
return new WP_Error( 'ai_text_unsupported', __( 'No configured AI model can generate text.', 'myplugin' ) );
}
$text = $builder->generate_text();
if ( is_wp_error( $text ) ) {
return $text;
}
return sanitize_textarea_field( $text );
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.
- yesterday First seen · 240 lines · 130 tokens per session scan A 72ed2dc66572
wp-ai-client is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 2d ago), licensed MIT. It adds 130 tokens to every session and 2,514 once invoked, about $0.0006 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-11.
Other skills, from other repositories
agent-platform-tuning
Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).
agent-platform-prompt-management
Manages and orchestrates prompts in Agent Platform. Use when you need to create, list, retrieve, version, or delete managed prompts in Agent Platform. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform prompts.
agent-platform-rag-engine-management
Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…
agent-platform-endpoint-management
Manages Agent Platform serving endpoints. Use when you need to create, list, describe, update, or delete serving endpoints for model deployment on Agent Platform. Also use when troubleshooting endpoint permission, quota, or resource busy errors. Don't use for deploying models to endpoints or for running model…
gke-inference
Deploys and optimizes AI/ML inference workloads on GKE, using GPUs, TPUs, and model servers. Use when deploying GKE inference servers, configuring GKE GPU resources for inference, or deploying LLMs on GKE. Don't use for generic batch jobs or HPC task queues (use gke-batch-hpc instead).
agent-platform-model-registry
Agent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Agent Platform Model Registry. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform models.