Scaffold a new AWS service wrapper in pkg/aws/<servicename>/ following the established cloudformationservice pattern
Install
mkdir -p .claude/skills/new-aws-service && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16486" && unzip -o skill.zip -d .claude/skills/new-aws-service && rm skill.zipInstalls to .claude/skills/new-aws-service
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Scaffold a new AWS service wrapper in pkg/aws/<servicename>/ following the established cloudformationservice patternAbout this skill
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.