Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

dev

/dev

Opisuje przepływy pracy deweloperskiej wtyczki WordPress ActivityPub: konfiguracja wp-env, polecenia testów, linting, budowanie zasobów i kontrola jakości kodu.

Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Opisuje przepływy pracy deweloperskiej wtyczki WordPress ActivityPub: konfiguracja wp-env, polecenia testów, linting, budowanie zasobów i kontrola jakości kodu.

Oryginalny opis (EN)

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.

Jak działa

  1. Quick Reference
  2. Comprehensive Documentation
  3. Pre-commit Hooks
  4. Common Development Workflows
  5. Key Files
Sekcje z nagłówków SKILL.md, w oryginale · 138 linii, 588 słów
Podgląd SKILL.md
---
name: dev
description: 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.
---

# ActivityPub Development Cycle

Quick reference for common development workflows in the WordPress ActivityPub plugin.

## Quick Reference

### Environment Management
```bash
npm run env-start    # Start WordPress at http://localhost:8888.
npm run env-stop     # Stop WordPress environment.
```

### Testing Commands
```bash
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.
```

### Code Quality
```bash
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).
```

### Building Assets
```bash
npm run build         # Build for production (formatted and minified).
npm run dev           # Start development watch mode.
```

### Code Coverage
```bash
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.
```

## Comprehensive Documentation

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.

## Pre-commit Hooks

The repository uses automated pre-commit hooks (`.githooks/pre-commit`) that run automatically on `git commit`:

1. **Sort PHP imports** - Automatically organizes use statements.
2. **Check unused imports** - Prevents unused use statements.
3. **Validate test patterns** - Blocks `remove_all_filters('pre_http_request')`.
4. **Run PHPCS auto-fix** - Applies coding standards automatically.
5. **Format JavaScript** - Runs wp-scripts formatter.

**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`).

## Common Development Workflows

### Initial Setup
```bash
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.
```

### Making Changes Workflow
```bash
# 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.
```

When the admin app imports from a `@wordpress/*` package that the build externalizes to a `wp.*` global, check the export against what the plugin's minimum WordPress version ships (`wp-includes/js/dist/<package>.js`, or `typeof wp.<package>.<name>` in the browser), not against `node_modules`. Newer npm versions export names the shipped global does not have.

### Before Creating PR
```bash
# Run full test suite.
npm run env-test

# Build assets.
npm run build

# Final lint check.
composer lint
npm run lint:js
```

### Debugging Failing Tests
```bash
# 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
```

### Fresh Environment
```bash
npm run env-stop
npm run env-start
# wp-env automatically sets up WordPress with debug mode and test users.
```

## Key Files

- `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.

Wersje

RepozytoriumWynikLicencja
Ta strona · automattic/wordpress-activitypub100MIT
yonatangross/orchestkit100MIT
yonatangross/orchestkit100MIT
slopus/happy100MIT
lucastamoios/skills100MIT
gpshead/cpython-skills100CC0-1.0
microsoft/Copilot-Managed-Runtime95MIT
microsoft/managed-apps95MIT
heliohq/ship95MIT

Migawka bazy z 13.11.2026 · wersja paczki b7a88771e6e8 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100code-style
    Opisuje standardy kodowania PHP i wzorce WordPressa dla wtyczki ActivityPub: pisanie kodu PHP, klasy, hooki WordPressa i struktura plików wtyczki.
  • 100wordpress-wp-env
    Konfiguruje i naprawia lokalne środowisko WordPress oparte na @wordpress/env i Dockerze.
  • 90woocommerce-dev-cycle
    Uruchamia testy, linting i kontrole jakości w rozwoju WooCommerce oraz pilnuje stylu kodu i przebiegu pracy.
  • 90woocommerce-dev-cycle
    Uruchamia testy, linting i kontrole jakości w rozwoju WooCommerce oraz pilnuje stylu kodu i przebiegu pracy.
  • 100wordpress
    Podpowiada wzorce i dobre praktyki przy projektach WordPress: motywy, wtyczki, REST API, bloki i bezpieczeństwo.
  • 100leanspec-development
    Opisuje prace deweloperskie nad LeanSpec: polecenia budowania, testów i lintowania, strukturę monorepo, wydania i publikację w npm, wersjonowanie, changelog oraz zasady wkładu w projekt.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.