重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
dev by automattic/wordpress-activitypub
npx skills add https://github.com/automattic/wordpress-activitypub --skill devWordPress ActivityPub 插件常见开发工作流程速查参考。
npm run env-start # 在 http://localhost:8888 启动 WordPress。
npm run env-stop # 停止 WordPress 环境。
npm run env-test # 运行所有 PHP 测试。
npm run env-test -- --filter=pattern # 运行匹配模式的测试。
npm run env-test -- path/to/test.php # 运行特定的测试文件。
npm run env-test -- --group=name # 运行带有 @group 注解的测试。
npm run test:e2e # 运行 Playwright E2E 测试。
npm run test:e2e:debug # 调试 E2E 测试。
composer lint # 检查 PHP 编码规范。
composer lint:fix # 自动修复 PHP 问题。
npm run lint:js # 检查 JavaScript。
npm run lint:css # 检查 CSS 样式。
npm run format # 格式化所有代码 (wp-scripts)。
npm run build # 为生产环境构建(格式化并压缩)。
npm run dev # 启动开发监视模式。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
npm run env-start -- --xdebug=coverage # 启动并支持覆盖率分析。
npm run env-test -- --coverage-text # 生成文本覆盖率报告。
npm run env-test -- --coverage-html ./coverage # 生成 HTML 报告。
详细设置说明请参阅 docs/development-environment.md。
完整的测试指南请参阅 tests/README.md。
代码检查配置和标准请参阅 docs/code-linting.md。
仓库使用自动化的预提交钩子 (.githooks/pre-commit),在 git commit 时自动运行:
remove_all_filters('pre_http_request')。重要提示: 钩子会自动修改暂存的文件。提交前请务必检查更改。如果钩子进行了修改,你需要重新暂存它们并再次提交。
设置: 钩子通过 npm run prepare 安装(在 npm install 后自动运行)。
git clone git@github.com:Automattic/wordpress-activitypub.git
cd wordpress-activitypub
npm install # 同时运行 'npm run prepare' 以安装钩子。
composer install
npm run env-start # WordPress 运行在 http://localhost:8888。
# 1. 进行代码更改。
# 2. 运行相关测试。
npm run env-test -- --filter=FeatureName
# 3. 检查代码质量(可选 - 预提交钩子会执行此操作)。
composer lint
npm run lint:js
# 4. 提交(预提交钩子自动运行)。
git add .
git commit -m "描述"
# 钩子可能会修改文件 - 如有需要,请检查并重新暂存。
# 运行完整的测试套件。
npm run env-test
# 构建资源。
npm run build
# 最终代码检查。
composer lint
npm run lint:js
# 使用详细输出运行。
npm run env-test -- --verbose --filter=test_name
# 运行单个测试文件以隔离问题。
npm run env-test -- tests/phpunit/tests/path/to/test.php
# 检查测试分组。
npm run env-test -- --list-groups
npm run env-test -- --group=specific_group
npm run env-stop
npm run env-start
# wp-env 会自动设置带有调试模式和测试用户的 WordPress。
package.json - npm 脚本和依赖项。composer.json - PHP 依赖项和代码检查脚本。.wp-env.json - wp-env 配置。phpcs.xml - PHP 编码规范(自定义 WordPress 规则)。.githooks/pre-commit - 预提交自动化。每周安装数
49
仓库
GitHub 星标数
564
首次出现
2026 年 1 月 23 日
安全审计
安装于
claude-code43
codex43
gemini-cli43
opencode42
antigravity40
github-copilot40
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 git@github.com: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.Weekly Installs
49
Repository
GitHub Stars
564
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code43
codex43
gemini-cli43
opencode42
antigravity40
github-copilot40
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
125,600 周安装
YouTube视频智能剪辑工具 - 基于AI自动分析字幕生成精细章节,支持多格式导出和字幕烧录
2,400 周安装
SQL Pro 高级查询与性能优化指南 - CTE、窗口函数、执行计划分析
2,400 周安装
WebSocket工程师指南:构建可扩展实时通信系统的完整工作流程与架构设计
2,400 周安装
OpenClaw 运维配置手册:AI助手网关诊断、修复与健康检查指南
2,400 周安装
Angular SSR 服务端渲染指南:v20+ 配置、水合与预渲染实战
2,400 周安装
TanStack Query v5 完全指南:React 数据管理、乐观更新、离线支持
2,500 周安装