{"id":50998975,"url":"https://github.com/hebertcisco/php-testing-skill","last_synced_at":"2026-06-20T12:34:15.430Z","repository":{"id":345883243,"uuid":"1180060277","full_name":"hebertcisco/php-testing-skill","owner":"hebertcisco","description":"PHP Testing Skill","archived":false,"fork":false,"pushed_at":"2026-04-09T00:02:28.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-09T02:14:43.117Z","etag":null,"topics":["ai","ai-agent","ai-agents","ai-skill","ai-skills","ai-tools","pest","pestphp","php","php-testing-skill","php8","phpunit","skill","skills","testing","testing-ai","testing-automation","testing-tool","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hebertcisco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-12T16:55:18.000Z","updated_at":"2026-04-09T00:02:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hebertcisco/php-testing-skill","commit_stats":null,"previous_names":["hebertcisco/php-testing-skill"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hebertcisco/php-testing-skill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fphp-testing-skill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fphp-testing-skill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fphp-testing-skill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fphp-testing-skill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hebertcisco","download_url":"https://codeload.github.com/hebertcisco/php-testing-skill/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hebertcisco%2Fphp-testing-skill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34570538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agent","ai-agents","ai-skill","ai-skills","ai-tools","pest","pestphp","php","php-testing-skill","php8","phpunit","skill","skills","testing","testing-ai","testing-automation","testing-tool","testing-tools"],"created_at":"2026-06-20T12:34:14.832Z","updated_at":"2026-06-20T12:34:15.424Z","avatar_url":"https://github.com/hebertcisco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Testing Skill\n\nAn agent skill that detects a PHP project's test stack and safely adds, repairs, or optimizes tests and CI workflows. Works with PHPUnit, PestPHP, Laravel, Symfony, and plain PHP projects.\n\n## Features\n\n- **Stack detection** -- identifies PHPUnit (8-13) and Pest (v2-v4) versions, mixed setups, and framework before touching code\n- **Version-aware authoring** -- uses attributes vs annotations, correct mock APIs, and version-appropriate patterns based on the detected PHPUnit major version\n- **App analysis** -- inspects `app/`, `src/`, `config/`, and CI files to understand project structure\n- **Test authoring** -- adds unit, feature, integration, and E2E tests matching existing conventions\n- **Pest v4 browser testing** -- supports Playwright-based browser tests, smoke testing, visual regression, and test sharding\n- **PHPUnit tuning** -- optimizes `phpunit.xml` defaults, execution speed, and configuration migration\n- **CI workflows** -- creates or refines GitHub Actions pipelines including sharded test matrix strategies\n- **Project survey** -- Python script that summarizes an unfamiliar repo's testing setup as JSON, including detected versions\n\n## Quick Start\n\n### Claude Code\n\nThis skill is published to the Claude Code skill registry. Install it with:\n\n```\n/install-skill php-testing-skill\n```\n\nOr add it manually as a project skill by placing this folder inside your project and referencing `SKILL.md` in your project instructions.\n\n### Other Agents\n\n1. Place this folder where your agent reads local skills (e.g. `~/.codex/skills/php-testing-skill`).\n2. Point your agent at `SKILL.md` -- that file contains all operating instructions.\n3. Ensure the agent can run shell commands and read repository files.\n\n## How It Works\n\nThe agent follows this workflow:\n\n1. **Detect** the project's test runner and framework from `composer.json`, `phpunit.xml`, `tests/Pest.php`, and directory structure.\n2. **Analyze** the domain code under `app/` or `src/` and the config under `config/` and `.env.example`.\n3. **Match** the closest existing test layer and style (PHPUnit classes vs. Pest syntax).\n4. **Create or repair** the smallest useful test set, then verify with the narrowest command.\n5. **Load references** from `references/` only when the task requires deeper guidance.\n\n## Repository Layout\n\n```\nphp-testing-skill/\n  SKILL.md                            # Main agent instructions (source of truth)\n  README.md                           # This file\n  agents/\n    openai.yaml                       # OpenAI/Codex skill registry metadata\n  references/\n    framework-detection.md            # PHPUnit vs Pest vs mixed detection rules\n    test-authoring.md                 # Patterns for unit, feature, and E2E tests\n    phpunit-optimization.md           # Fast phpunit.xml and execution strategies\n    github-actions.md                 # CI templates for Laravel, Symfony, plain PHP\n  scripts/\n    survey_php_project.py             # Project survey helper\n```\n\n## Survey Script\n\nThe included survey script produces a JSON summary of any PHP project's testing setup:\n\n```bash\npython3 ./scripts/survey_php_project.py /path/to/php-project\n```\n\nOutput includes:\n- Detected frameworks and test runner (PHPUnit, Pest, mixed)\n- Installed PHPUnit and Pest versions (from `composer.lock`)\n- Whether the project requires attributes-only (PHPUnit 12+)\n- Browser E2E tools detected (`pest-plugin-browser`, Dusk, Panther)\n- App structure breakdown (`app/` or `src/` directory classification)\n- Test file inventory by suite (Unit, Feature, etc.)\n- Config files and CI workflow paths\n- Key file presence (composer.json, phpunit.xml, artisan, etc.)\n\nUseful for large or unfamiliar codebases where manual inspection would be slow.\n\n## Supported Versions\n\n| PHPUnit | PHP | Status | Notes |\n|---------|-----|--------|-------|\n| **13** | \u003e= 8.4.1 | Current stable | Sealed mocks, new array assertions, `withParameterSetsInOrder()` |\n| **12** | \u003e= 8.3 | Active | Annotations removed -- attributes only. Mock API cleanup |\n| **11** | \u003e= 8.2 | Bugfix ended | Annotations deprecated. Transitional version |\n| **10** | \u003e= 8.1 | Bugfix ended | Event system. `withConsecutive()` removed |\n| **9** | \u003e= 7.3 | EOL | Legacy support only |\n\n| Pest | PHPUnit Base | PHP | Key Additions |\n|------|-------------|-----|---------------|\n| **v4** | 12 | \u003e= 8.3 | Browser testing (Playwright), smoke testing, visual regression, test sharding |\n| **v3** | 11 | \u003e= 8.2 | Arch testing, type coverage, mutation testing |\n| **v2** | 10 | \u003e= 8.1 | Arch presets, parallel testing |\n\nThe skill detects installed versions from `composer.lock` and adapts its guidance (annotation vs attribute syntax, available mock APIs, sharding support, etc.).\n\n## Agent Compatibility\n\nThis skill is plain Markdown and YAML -- no model-specific binaries. It works with any agent that can read local files and run shell commands.\n\n| Agent | Integration |\n|-------|------------|\n| **Claude Code** | Install as a skill or load `SKILL.md` as project instructions |\n| **Codex** | Auto-discovers from skills directory; `agents/openai.yaml` included |\n| **ChatGPT / OpenAI agents** | Load `SKILL.md` into the session with repo access |\n| **Other LLM agents** | Load `SKILL.md` + enable file reading and shell execution |\n| **Chat-only (no tools)** | Use `SKILL.md` as a manual reference guide (limited) |\n\n### Runtime Requirements\n\n- `python3` for the survey script\n- Shell access for test verification commands\n- Repository read access\n- Permission to run `./vendor/bin/pest`, `./vendor/bin/phpunit`, or `php artisan test`\n\nThe skill still works without execution access, but becomes documentation-only.\n\n## Prompt Examples\n\n```\nUse $php-testing-skill to add regression tests for this Laravel bug.\n```\n\n```\nUse $php-testing-skill to detect whether this repo uses Pest or PHPUnit.\n```\n\n```\nUse $php-testing-skill to optimize phpunit.xml and the GitHub Actions test workflow.\n```\n\nFor agents without named skill support:\n\n```\nFollow the instructions in php-testing-skill/SKILL.md. Analyze the PHP project's\ntesting stack first, then add or repair the smallest useful set of tests and verify\nthem with the narrowest command.\n```\n\n## Maintenance\n\n- `SKILL.md` is the source of truth for the agent workflow.\n- Update `references/` only when guidance meaningfully changes.\n- Keep `agents/openai.yaml` aligned with the skill's public description.\n- Document new helper scripts in this README.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhebertcisco%2Fphp-testing-skill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhebertcisco%2Fphp-testing-skill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhebertcisco%2Fphp-testing-skill/lists"}