用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ForceInjection/domain-driven-design-skills --skill pest-testing-setup命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Conduct deep academic research for philosophy, neuroscience, cognitive science, and theoretical computer science (computability, complexity, AI theory, logic). Use when user asks to: research academic topics, find scholarly papers, conduct literature reviews, analyze citations, synthesize research findings, explore philosophical arguments, investigate consciousness/cognition, study computability/decidability/Turing machines, or analyze academic debates. Triggers on: 'research papers', 'literature review', 'academic sources', 'scholarly articles', 'philosophy of mind', 'computability theory', 'neuroscience studies', 'find papers on', 'what does the research say'.
Create clear action plans with steps, success criteria, and risk awareness. Use before implementing features, making changes, starting projects, or anytime you need a roadmap to success. Triggers on "plan this", "how should we approach", "what's the strategy", "steps to complete", or when facing complex multi-step work.
Add keyboard navigation to a feature using CommandRegistryService. Use when implementing keyboard shortcuts, vim-style navigation, or hotkeys for a page or component.
基于 SOC 职业分类
正在显示 SKILL.md
| name | pest-testing-setup |
| description | Set up Pest testing with Orchestra Testbench for Laravel packages |
| allowed-tools | Bash(python3:*), Bash(composer:*), Write, Read, Glob |
Adds complete PestPHP testing infrastructure to an existing Laravel package.
When the user wants to add testing to an existing package:
python3 ${SKILL_DIR}/scripts/setup_pest_testing.py <vendor/package-name> [options]
--filament - Include Filament/Livewire testing utilities--with-coverage - Add code coverage configuration--with-ci - Add GitHub Actions CI workflowpython3 ${SKILL_DIR}/scripts/setup_pest_testing.py mwguerra/my-package
python3 ${SKILL_DIR}/scripts/setup_pest_testing.py mwguerra/filament-blog --filament
python3 ${SKILL_DIR}/scripts/setup_pest_testing.py mwguerra/my-package --with-coverage --with-ci
phpunit.xml - PHPUnit configuration
src/ directorytests/Pest.php - PestPHP configuration
tests/TestCase.php - Orchestra TestCase
tests/Unit/ExampleTest.php - Sample unit test
tests/Feature/.gitkeep - Feature tests directory
.github/workflows/tests.yml (if --with-ci)
{
"require-dev": {
"orchestra/testbench": "^10.0",
"pestphp/pest": "^3.8",
"pestphp/pest-plugin-laravel": "^3.1"
},
"autoload-dev": {
"psr-4": {
"Vendor\\PackageName\\Tests\\": "tests/"
}
},
"scripts": {
"test": "pest",
"test-coverage": "pest --coverage"
}
}
Note: Uses latest versions for Laravel 11/12 compatibility:
After setup:
# Navigate to package
cd packages/vendor/package-name
# Install dependencies (including dev)
composer install
# Run all tests
./vendor/bin/pest
# Run with coverage
./vendor/bin/pest --coverage
# Run specific test file
./vendor/bin/pest tests/Unit/ExampleTest.php
# Run filtered tests
./vendor/bin/pest --filter="service provider"
# Run in parallel
./vendor/bin/pest --parallel
test('it does something', function () {
// Arrange
$data = ['key' => 'value'];
// Act
$result = processData($data);
// Assert
expect($result)->toBeTrue();
});
test('service is registered', function () {
expect($this->app->bound('my-service'))->toBeTrue();
});
test('command runs successfully', function () {
$this->artisan('my-package:command')
->expectsOutput('Success!')
->assertSuccessful();
});
uses(RefreshDatabase::class);
test('it creates model', function () {
$model = MyModel::create(['name' => 'Test']);
expect($model)->toBeInstanceOf(MyModel::class);
$this->assertDatabaseHas('my_models', ['name' => 'Test']);
});
use Livewire\Livewire;
test('component renders', function () {
Livewire::test(MyComponent::class)
->assertSee('Expected text')
->assertStatus(200);
});
When --filament is enabled, tests should follow Filament’s guidance:
livewire() / Livewire::test().