Development workflows for WordPress ActivityPub plugin including wp-env setup, testing commands, linting, and build processes. Use when setting up development environment, running tests, checking code quality, building assets, or working with wp-env.
npx skills add https://github.com/Automattic/wordpress-activitypub --skill dev
Quick reference for common development workflows in the WordPress ActivityPub plugin.
npm run env-start # Start WordPress at http://localhost:8888.
npm run env-stop # Stop WordPress environment.
npm run env-test # Run all PHP tests.
npm run env-test -- --filter=pattern # Run tests matching pattern.
npm run env-test -- path/to/test.php # Run specific test file.
npm run env-test -- --group=name # Run tests with @group annotation.
npm run test:e2e # Run Playwright E2E tests.
npm run test:e2e:debug # Debug E2E tests.
composer lint # Check PHP coding standards.
composer lint:fix # Auto-fix PHP issues.
npm run lint:js # Check JavaScript.
npm run lint:css # Check CSS styles.
npm run format # Format all code (wp-scripts).
npm run build # Build for production (formatted and minified).
npm run dev # Start development watch mode.
npm run env-start -- --xdebug=coverage # Start with coverage support.
npm run env-test -- --coverage-text # Generate text coverage report.
npm run env-test -- --coverage-html ./coverage # Generate HTML report.
See docs/development-environment.md for detailed setup instructions.
See tests/README.md for comprehensive testing guidance.
See docs/code-linting.md for linting configuration and standards.
The repository uses automated pre-commit hooks (.githooks/pre-commit) that run automatically on git commit:
remove_all_filters('pre_http_request').IMPORTANT: Hooks modify staged files automatically. Always review changes before committing. If hooks make changes, you'll need to stage them and commit again.
Setup: Hooks are installed by npm run prepare (runs automatically after npm install).
git clone [email protected]:Automattic/wordpress-activitypub.git
cd wordpress-activitypub
npm install # Also runs 'npm run prepare' to install hooks.
composer install
npm run env-start # WordPress at http://localhost:8888.
# 1. Make code changes.
# 2. Run relevant tests.
npm run env-test -- --filter=FeatureName
# 3. Check code quality (optional - pre-commit hook does this).
composer lint
npm run lint:js
# 4. Commit (pre-commit hook runs automatically).
git add .
git commit -m "Description"
# Hook may modify files - review and stage again if needed.
# Run full test suite.
npm run env-test
# Build assets.
npm run build
# Final lint check.
composer lint
npm run lint:js
# Run with verbose output.
npm run env-test -- --verbose --filter=test_name
# Run single test file to isolate issue.
npm run env-test -- tests/phpunit/tests/path/to/test.php
# Check test groups.
npm run env-test -- --list-groups
npm run env-test -- --group=specific_group
npm run env-stop
npm run env-start
# wp-env automatically sets up WordPress with debug mode and test users.
package.json - npm scripts and dependencies.composer.json - PHP dependencies and lint scripts..wp-env.json - wp-env configuration.phpcs.xml - PHP coding standards (custom WordPress rules)..githooks/pre-commit - Pre-commit automation.You are an expert AI-powered code review specialist combining automated static analysis, intelligent pattern recognition, and modern DevOps practices. Leverage AI tools (GitHub Copilot, Qodo, GPT-5, C
Write idiomatic Ruby code with metaprogramming, Rails patterns, and performance optimization. Specializes in Ruby on Rails, gem development, and testing frameworks. Use PROACTIVELY for Ruby refactoring, optimization, or complex Ruby features.
Use when working with tdd workflows tdd refactor
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with truth-score verification.
Prepares codebases for security review using Trail of Bits' checklist. Helps set review goals, runs static analysis tools, increases test coverage, removes dead code, ensures accessibility, and generates documentation (flowcharts, user stories, inline comments).
Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component --json` shows complexity > 50 or lineCount > 300, when the user asks for code splitting, hook extraction, or complexity reduction, or when `pnpm analyze-component` warns to refactor before testing; avoid for simple/well-structured components, third-party wrappers, or when the user explicitly wants testing without refactoring.
Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.
Take automattic/dev 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.
The instructions reference npm.
Without those the skill loads but fails at the first command.