wp-ai-client

Official

Safely integrate WordPress AI tools

Authorvikingokft
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provides a provider-agnostic, WordPress-native way to add AI-powered text and media generation while safely gating execution, handling missing providers, and returning structured results.

Core Features & Use Cases

  • Feature gating with safe runtime checks: Use wp_supports_ai() and is_supported_*() to avoid breaking older or unconfigured sites.
  • Prompt building and execution via WordPress contracts: Generate outputs using wp_ai_client_prompt() with model preferences, system instructions, and temperature settings.
  • Structured and tool-enabled AI outputs: Produce validated JSON via as_json_response() and enable narrow, allowlisted tool/function calls using Abilities with using_abilities() and WP_AI_Client_Ability_Function_Resolver.

Quick Start

Ask your agent to review and wire your plugin’s AI generation flow to WordPress 7.0’s WP AI Client by gating with wp_supports_ai(), building a prompt with wp_ai_client_prompt(), selecting supported model capabilities with is_supported_*(), then calling generate_*_result() and correctly handling any WP_Error.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: wp-ai-client
Download link: https://github.com/vikingokft/wp-agent-skills/archive/main.zip#wp-ai-client

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.