Build confidence with comprehensive CLI testing. Unit tests catch logic bugs with fakes, integration tests verify API contracts, E2E tests validate workflows.
Implements a three-tier testing strategy for CLIs. Claude will use this when you need to add unit tests with fake clients, integration tests with envtest, or E2E workflow tests.
/plugin marketplace add adaptive-enforcement-lab/claude-skills/plugin install build@ael-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples.mdscripts/example-1.mermaidscripts/example-2.textscripts/example-3.makefileA well-tested CLI uses different testing strategies at different levels. This section covers:
See the full implementation guide in the source documentation.
| Practice | Description |
|---|---|
| Interface first | Design for testability with interfaces |
| Table-driven tests | Cover edge cases systematically |
| Parallel tests | Use t.Parallel() where safe |
| Build tags | Separate integration tests with //go:build integration |
| Clean up | Always clean up test resources |
Test at the right level. Unit tests catch logic bugs. Integration tests catch API issues. E2E tests catch workflow bugs.
A well-tested CLI uses different testing strategies at different levels. This section covers:
graph TB
E2E[E2E Tests<br/>Full workflow in real cluster]
Integration[Integration Tests<br/>Real API server with kind/envtest]
Unit[Unit Tests<br/>Fake clients and mock interfaces]
E2E --> Integration --> Unit
%% Ghostty Hardcore Theme
style E2E fill:#9e6ffe,color:#1b1d1e
style Integration fill:#65d9ef,color:#1b1d1e
style Unit fill:#a7e22e,color:#1b1d1e
myctl/
├── cmd/
│ ├── check.go
│ └── check_test.go # Command tests
├── pkg/
│ ├── k8s/
│ │ ├── client.go
│ │ ├── client_test.go # Unit tests with fakes
│ │ └── fake_client.go # Test doubles
│ └── selector/
│ ├── selector.go
│ └── selector_test.go
└── test/
├── e2e/ # E2E tests
└── fixtures/ # Test resources
.PHONY: test test-unit test-integration test-e2e
test: test-unit
test-unit:
go test -v -race ./...
test-integration:
go test -v -tags=integration ./pkg/...
test-e2e:
./test/e2e/run.sh
| Practice | Description |
|---|---|
| Interface first | Design for testability with interfaces |
| Table-driven tests | Cover edge cases systematically |
| Parallel tests | Use t.Parallel() where safe |
| Build tags | Separate integration tests with //go:build integration |
| Clean up | Always clean up test resources |
Test at the right level. Unit tests catch logic bugs. Integration tests catch API issues. E2E tests catch workflow bugs.
See examples.md for code examples.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.