Third-party WordPress plugin integration patterns. Use when adding new integrations, debugging compatibility with other plugins, or working with existing integrations.
npx skills add https://github.com/Automattic/wordpress-activitypub --skill integrations
This skill provides guidance on integrating the ActivityPub plugin with other WordPress plugins.
All integrations live in the integration/ directory.
File naming: class-{plugin-name}.php (following PHP conventions in AGENTS.md)
Namespace: Activitypub\Integration
Integrations are wired up in integration/load.php inside plugin_init(). Each one is guarded by a detection check and then calls its class's static init():
// integration/load.php
if ( \defined( 'JETPACK__VERSION' ) ) {
Jetpack::init();
}
The real integrations shipped today (see integration/):
akismet, buddypress, classic-editor, enable-mastodon-apps, jetpack,
litespeed-cache, multisite-language-switcher, nodeinfo, opengraph,
podlove-podcast-publisher, seriously-simple-podcasting, surge, webfinger,
wpml, yoast-seo.
A few examples:
fediverse:creator and related metadata via the OpenGraph plugin.For complete directory structure and naming conventions, see docs/php-class-structure.md.
<?php
namespace Activitypub\Integration;
class Plugin_Name {
/**
* Initialize the class, registering WordPress hooks.
*/
public static function init() {
// Enable federation for the plugin's post type.
\add_post_type_support( 'plugin_post_type', 'activitypub' );
// Provide a custom transformer if the default Post transformer is not enough.
\add_filter( 'activitypub_transformer', array( self::class, 'transformer' ), 10, 3 );
}
/**
* Return a custom transformer for the plugin's objects.
*
* @param mixed $transformer The transformer to use. Default null.
* @param mixed $data The object to transform.
* @param string $object_class The class of the object to transform.
* @return mixed
*/
public static function transformer( $transformer, $data, $object_class ) {
if ( 'WP_Post' === $object_class && 'plugin_post_type' === $data->post_type ) {
require_once __DIR__ . '/class-custom-transformer.php';
return new Custom_Transformer( $data );
}
return $transformer;
}
}
Then register it in integration/load.php:
if ( \defined( 'PLUGIN_VERSION' ) ) {
Plugin_Name::init();
}
Post-type support drives which content federates. Use add_post_type_support() — there is no activitypub_post_types filter:
\add_post_type_support( 'event', 'activitypub' );
\add_post_type_support( 'product', 'activitypub' );
The enabled post types are stored in the activitypub_support_post_types option (read with \get_option( 'activitypub_support_post_types', array( 'post' ) )).
The activitypub_transformer filter takes three arguments — ( $transformer, $data, $object_class ) — and is registered with priority 10, 3:
\add_filter( 'activitypub_transformer', function ( $transformer, $data, $object_class ) {
if ( 'WP_Post' === $object_class && 'event' === $data->post_type ) {
return new Event_Transformer( $data );
}
return $transformer;
}, 10, 3 );
To tweak the final ActivityStreams array, hook activitypub_activity_object_array — ( $array, $class, $id, $object ):
\add_filter( 'activitypub_activity_object_array', function ( $array, $class, $id, $object ) {
if ( isset( $array['type'] ) && 'Note' === $array['type'] ) {
// Adjust the outgoing object array here.
}
return $array;
}, 10, 4 );
// Check if integration is active.
if ( \class_exists( '\Activitypub\Integration\Plugin_Name' ) ) {
// Integration loaded.
}
// Multiple detection methods (match how integration/load.php guards each one).
if ( \defined( 'PLUGIN_VERSION' ) ) { }
if ( \function_exists( 'plugin_function' ) ) { }
if ( \class_exists( 'Plugin_Class' ) ) { }
// Use appropriate priority.
\add_filter( 'hook', 'callback', 20 ); // After plugin's filter.
// Use fully qualified names.
$object = new \Plugin\Namespace\Class();
integration/load.php before calling init().Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take automattic/integrations from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.