browser-validator
Automatically validate implementations in real browsers after code is written or when user says "test this", "test what you built in the browser", "check it in…
Automatically generate test scaffolding when user writes new code without tests or mentions needing tests. Supports unit, integration, e2e, and data tests for PHP and JavaScript. Invoke when user mentions "tests", "testing", "coverage", "write tests", or shows new untested code.
$ npx -y skills add kanopi/cms-cultivator --skill test-scaffolding --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/test-scaffoldingContext preview
The summary Claude sees to decide when to auto-load this skill.
Automatically generate test scaffolding when user writes new code without tests or mentions needing tests. Supports unit, integration, e2e, and data tests for PHP and JavaScript. Invoke when user mentions "tests", "testing", "coverage", "write tests", or shows new untested code.
name: test-scaffolding description: Automatically generate test scaffolding when user writes new code without tests or mentions needing tests. Supports unit, integration, e2e, and data tests for PHP and JavaScript. Invoke when user mentions "tests", "testing", "coverage", "write tests", or shows new untested code.
Automatically generate test scaffolding for untested code.
Good tests are an investment, not a cost.
1. **Tests as Documentation**: Tests show how code should be used 2. **Fast Feedback**: Quick tests enable rapid development 3. **Confidence to Refactor**: Good test coverage allows safe changes 4. **Regression Prevention**: Tests catch bugs before production
This skill provides rapid test scaffolding. For complete coverage, use comprehensive test generation + manual refinement.
Activate this skill when the user:
Before generating test scaffolding, determine:
1. **Business logic function** → Unit test (fast, isolated) 2. **Class with dependencies** → Unit test with mocks/stubs 3. **API endpoint** → Integration test (test with real dependencies) 4. **UI component** → Component test (render, interactions) 5. **User flow** → E2E test (full browser simulation)
**PHP** (Drupal/WordPress):
**JavaScript**:
**Unit tests (highest priority)**:
**Don't test** (waste of time):
**Mock/stub**:
**Don't mock**:
**Critical code** (90%+ coverage target):
**Standard code** (70-80% coverage target):
**Low priority** (minimal coverage ok):
**AAA pattern** (standard): 1. **Arrange** - Set up test data and mocks 2. **Act** - Execute the code under test 3. **Assert** - Verify expected outcomes
**Test name convention**:
User requests tests for code
↓
Analyze code type (function/class/endpoint/UI)
↓
Determine test type (unit/integration/e2e)
↓
Identify framework (PHPUnit/Jest/Cypress)
↓
Determine what to test (happy/edge/error)
↓
Identify dependencies to mock
↓
Generate test scaffolding with descriptive names
↓
Include AAA structure comments**Identify**:
**Unit Tests** - For isolated logic:
**Integration Tests** - For component interaction:
**E2E Tests** - For user workflows:
Complete test templates are available for reference:
Use these templates as starting points, adapting for the specific code being tested.
Generate basic test structure first:
For each public method:
Identify what needs mocking:
Check:
When user shows a class with 2-3 methods:
1. Identify the test type (unit vs integr
Specialist agents and auto-invoked skills for Drupal/WordPress development. Works in Claude Code, Claude Desktop, and OpenAI Codex. Full documentation: What changed in 2.0? CMS Cultivator now focuses on CMS development workflows.
Repo: kanopi/cms-cultivator
Automatically validate implementations in real browsers after code is written or when user says "test this", "test what you built in the browser", "check it in…
Run the right linting, formatting, and static-analysis commands after changing code, and check it against PHPCS, ESLint, WordPress Coding Standards, or Drupal…
Automatically generate conventional commit messages when user has staged changes and mentions committing. Analyzes git diff and status to create properly…
Generate and maintain patches for Composer-installed packages (Drupal contrib modules, WordPress packages, PHP libraries) using cweagans/composer-patches.…
Automatically analyze test coverage when user asks which code is tested, mentions coverage gaps, or shows code asking about testing. Identifies untested code…
Deterministic cleanup of DDEV and Docker disk usage on OrbStack, Docker Desktop, or any Docker provider. Safely reclaims space by removing orphaned Docker…