unit-testing
Unit Testing Skill
Framework-agnostic unit testing best practices. Apply these patterns regardless of language or test runner.
Core Principles
- Test behavior, not implementation — tests should survive internal refactoring
- One behavior per test — not one method per test
- AAA structure — Arrange / Act / Assert, always
- Prefer fakes and spies over mocks — less coupling to mocking frameworks
- Name tests as readable sentences — a non-developer should understand the scenario
Workflow
Writing New Tests
- Identify the unit of behavior (a business scenario, not a method)
- Name the test using
Subject_Scenario_ExpectedBehaviorpattern - Structure with AAA — keep each section minimal
More from masterfermin02/agent-skills
laravel-money
Use the cknow/laravel-money package for Laravel projects that need to model, persist, cast, format, compare, or calculate money safely. Trigger when working on Laravel apps that handle currency, prices, totals, invoices, billing, checkout, discounts, taxes, balances, monetary casts, or any request mentioning money handling, currency formatting, integer minor units, Money value objects, or 'laravel-money'. Prefer this over raw floats for monetary values in Laravel.
2pr-review
Code review GitHub Pull Requests. Use whenever asked to review a PR, check a pull request, audit a diff, or give feedback on a GitHub PR. Triggers on: 'review this PR', 'code review', 'check this PR', 'review pull request', GitHub PR URLs (github.com/.../pull/NNN), or any request to audit code changes. Supports private repos via GitHub token. Delegates to language-specific skills (laravel-best-practices, csharp-best-practices, php-the-right-way) when applicable.
1php-update-with-rector
>
1ai-era-architecture
Define pragmatic software architecture for the AI era using rules like making important logic easy to find, keeping changes local, reducing coupling where it matters, protecting critical business rules, making debugging less painful, supporting safe iteration, and avoiding unnecessary ceremony. Use when designing project structure, evaluating whether clean architecture is worth it, or setting architecture principles for modern teams.
1php-the-right-way
PHP best practices skill based on phptherightway.com. Use whenever writing, reviewing, or refactoring PHP code to ensure it follows modern PHP standards and idioms. Triggers on: writing PHP code, reviewing PHP files, asking about PHP best practices, PHP code style (PSR-1/PSR-12/PSR-4), PHP OOP patterns, namespaces, Composer, dependency management, security (XSS, CSRF, SQL injection, password hashing), error handling, testing (PHPUnit/Pest), templating, databases, design patterns (Factory, Singleton, MVC, Strategy), functional PHP, or any question about 'the right way' to do something in PHP.
1frontend-pragmatic-architecture
Apply pragmatic AI-era architecture rules to frontend projects such as React, Next.js, or similar frameworks. Use when organizing pages, features, components, hooks, UI state, and frontend API calls so important logic stays easy to find and changes stay local.
1