Skip to main content
ClaudeWave
Skill237 repo starsupdated 1mo ago

activitypub-testing

This skill provides testing patterns and commands for the WordPress ActivityPub plugin, covering PHPUnit for PHP tests, Playwright for end-to-end testing, and JavaScript unit tests. Use it when writing new tests, debugging test failures, setting up test coverage, or implementing test patterns for ActivityPub features in the plugin.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/Microck/ordinary-claude-skills /tmp/activitypub-testing && cp -r /tmp/activitypub-testing/skills_all/activitypub-testing ~/.claude/skills/activitypub-testing
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# ActivityPub Testing

This skill provides guidance on writing and running tests for the WordPress ActivityPub plugin.

## Quick Reference

For complete testing commands and environment setup, see [Testing Reference](../../../tests/README.md).

### Key Commands
- **PHP:** `npm run env-test`
- **E2E:** `npm run test:e2e`
- **JavaScript:** `npm run test:unit`

## PHPUnit Testing

### Test Structure

```php
<?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
    }
}
```

### Common Test Patterns

For transformer and handler testing patterns, see [Testing Reference - Writing Effective Tests](../../../tests/README.md#writing-effective-tests).

For mocking HTTP requests and other utilities, see [Testing Reference - Test Utilities](../../../tests/README.md#test-utilities).

### Test Groups

Use `@group` annotations:
```php
/**
 * @group activitypub
 * @group federation
 */
public function test_federation_feature() {
    // Test code
}
```

## E2E Testing with Playwright

### Basic E2E Test

```javascript
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');
});
```

### Testing Federation

```javascript
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');
});
```

## Test Data Factories

For creating test data (users, posts, comments), see [Testing Reference - Test Utilities](../../../tests/README.md#test-utilities).

## Coverage Reports

See [Testing Reference](../../../tests/README.md) for detailed coverage generation instructions.

## Debugging Tests

### Debug Output

```php
// In tests
var_dump( $data );
error_log( print_r( $result, true ) );

// Run with verbose
npm run env-test -- --verbose --debug
```

### Isolating Tests

```bash
# Run single test method
npm run env-test -- --filter=test_specific_method

# Stop on first failure
npm run env-test -- --stop-on-failure
```
adaptyvSkill

Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.

add-uint-supportSkill

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

Agent DevelopmentSkill

This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.

AgentDB Advanced FeaturesSkill

Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.

AgentDB Learning PluginsSkill

Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.

AgentDB Memory PatternsSkill

Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.

AgentDB Performance OptimizationSkill

Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.

AgentDB Vector SearchSkill

Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.