skills_all/activitypub-testing/SKILL.md
Testing patterns for PHPUnit and Playwright E2E tests. Use when writing tests, debugging test failures, setting up test coverage, or implementing test patterns for ActivityPub features.
npx skillsauth add microck/ordinary-claude-skills activitypub-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides guidance on writing and running tests for the WordPress ActivityPub plugin.
For complete testing commands and environment setup, see Testing Reference.
npm run env-testnpm run test:e2enpm run test:unit<?php
namespace Activitypub\Tests;
use WP_UnitTestCase;
class Test_Feature extends WP_UnitTestCase {
public function set_up(): void {
parent::set_up();
// Setup
}
public function tear_down(): void {
// Cleanup
parent::tear_down();
}
public function test_functionality() {
// Test implementation
}
}
For transformer and handler testing patterns, see Testing Reference - Writing Effective Tests.
For mocking HTTP requests and other utilities, see Testing Reference - Test Utilities.
Use @group annotations:
/**
* @group activitypub
* @group federation
*/
public function test_federation_feature() {
// Test code
}
const { test, expect } = require('@playwright/test');
test('ActivityPub settings page loads', async ({ page }) => {
await page.goto('/wp-admin/options-general.php?page=activitypub');
await expect(page.locator('h1')).toContainText('ActivityPub');
});
test('WebFinger discovery works', async ({ page }) => {
const response = await page.request.get('/.well-known/webfinger', {
params: {
resource: 'acct:admin@localhost:8888'
}
});
expect(response.ok()).toBeTruthy();
const json = await response.json();
expect(json.subject).toBe('acct:admin@localhost:8888');
});
For creating test data (users, posts, comments), see Testing Reference - Test Utilities.
See Testing Reference for detailed coverage generation instructions.
// In tests
var_dump( $data );
error_log( print_r( $result, true ) );
// Run with verbose
npm run env-test -- --verbose --debug
# Run single test method
npm run env-test -- --filter=test_specific_method
# Stop on first failure
npm run env-test -- --stop-on-failure
development
Migrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5. Use when the user wants to update their codebase, prompts, or API calls to use Opus 4.5. Handles model string updates and prompt adjustments for known Opus 4.5 behavioral differences. Does NOT migrate Haiku 4.5.
development
Analyzes Claude Code usage patterns and provides comprehensive recommendations. Runs usage analysis, discovers GitHub community resources, suggests CLAUDE.md improvements, and fetches latest docs on-demand. Use when user wants to optimize their Claude Code workflow, create configurations (agents/skills/commands), or set up project documentation.
development
Quantum computing framework for building, simulating, optimizing, and executing quantum circuits. Use this skill when working with quantum algorithms, quantum circuit design, quantum simulation (noiseless or noisy), running on quantum hardware (Google, IonQ, AQT, Pasqal), circuit optimization and compilation, noise modeling and characterization, or quantum experiments and benchmarking (VQE, QAOA, QPE, randomized benchmarking).
tools
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.