backend-api-integration
Generate production-ready Saloon-based API integrations for Laravel projects including connector classes, request classes, readonly DTOs, service layer methods with comprehensive error handling, and complete Pest test suites. Use this skill when integrating external APIs using Saloon, creating API request/response handlers, adding new API endpoints to existing services, building API client wrappers for third-party services, or setting up API communication with proper error handling and testing. This skill applies when working on files in app/Services/Api/, app/DataTransferObjects/Api/, creating Saloon connectors and requests, implementing API service methods, or writing API integration tests.
When & Why to Use This Skill
This Claude skill streamlines Laravel backend development by automating the generation of production-ready API integrations using the Saloon library. It handles the heavy lifting of creating connectors, request classes, readonly DTOs, and comprehensive Pest test suites, ensuring that all external API communications follow architectural best practices and include robust error handling.
Use Cases
- Third-Party Service Integration: Rapidly build API client wrappers for external services such as payment gateways, shipping providers, or CRM systems using Saloon connectors.
- Data Transfer Object (DTO) Generation: Automatically create readonly DTOs in the app/DataTransferObjects/Api/ directory to ensure type-safe and structured handling of API request and response data.
- Automated API Testing: Generate complete Pest test suites with built-in mocking to verify API integrations and error handling without making actual network requests.
- Service Layer Implementation: Develop clean service layer methods that encapsulate complex API logic, keeping Laravel controllers thin and maintaining a clear separation of concerns.
- Legacy Code Modernization: Refactor existing manual cURL or Guzzle implementations into standardized Saloon-based request and connector classes for better maintainability.
| name | Backend API Integration |
|---|---|
| description | Generate production-ready Saloon-based API integrations for Laravel projects including connector classes, request classes, readonly DTOs, service layer methods with comprehensive error handling, and complete Pest test suites. Use this skill when integrating external APIs using Saloon, creating API request/response handlers, adding new API endpoints to existing services, building API client wrappers for third-party services, or setting up API communication with proper error handling and testing. This skill applies when working on files in app/Services/Api/, app/DataTransferObjects/Api/, creating Saloon connectors and requests, implementing API service methods, or writing API integration tests. |
Backend API Integration
When to use this skill
- When integrating a new external API endpoint using Saloon in your Laravel project
- When adding new requests to an existing Saloon connector
- When creating API client wrappers for third-party services (payment gateways, shipping providers, etc.)
- When building DTOs for API request/response data structures
- When implementing service layer methods that call external APIs
- When writing comprehensive Pest tests for API integrations with mocking
- When working on files in app/Services/Api/ directory
- When creating or editing Saloon connector classes (e.g., ExampleApiConnector.php)
- When creating or editing Saloon request classes (e.g., GetUserRequest.php)
- When creating DTOs in app/DataTransferObjects/Api/ directory
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend API integration.
Instructions
For details, refer to the information provided in this file: backend API integration