name: new-aws-service description: Scaffold a new AWS service wrapper in pkg/aws/<servicename>/ following the established cloudformationservice pattern disable-model-invocation: false
When the user asks to add a new AWS service wrapper (or invokes /new-aws-service <servicename>), create the full package at pkg/aws/<servicename>/ following the pkg/aws/cloudformationservice/ pattern.
Steps
-
Determine the service name from
$ARGUMENTSor ask the user. -
Read the canonical example to understand the pattern:
pkg/aws/cloudformationservice/service.go— interface + implementationpkg/aws/cloudformationservice/mock_client_test.go— mock of the AWS client interfacepkg/aws/cloudformationservice/service_test.go— unit tests using mockspkg/aws/cloudformationservice/service_integration_test.go— LocalStack integration tests
-
Create
pkg/aws/<servicename>/service.go:- Define an interface for the AWS SDK client methods you need (keeps the dependency mockable)
- Define a
<ServiceName>Servicestruct that wraps the client - Implement the public methods the rest of the app will call
- Return structured errors using
fmt.Errorf("context: %w", err)wrapping
-
Create
pkg/aws/<servicename>/mock_client_test.go:- Hand-write a mock struct that implements the client interface
- Include configurable return values for each method
-
Create
pkg/aws/<servicename>/service_test.go:- Use the mock client to test each method in isolation
- Cover happy path and key error cases
-
Create
pkg/aws/<servicename>/service_integration_test.go:- Gate with
//go:build integration - Use
testhelpers.StartLocalStack()to spin up a container - Test the critical end-to-end path against real LocalStack
- Gate with
-
Wire it up in
internal/dependencies/dependencies.goalongside existing clients. -
After scaffolding, run
go test ./pkg/aws/<servicename>/...to confirm unit tests pass, and remind the user to run integration tests with-tags integrationonce Docker is available.
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.