vanman2024/ai-dev-marketplace/testing-patterns
Claude Code and agent skill by vanman2024/ai-dev-marketplace
- community
Checking that the SKILL.md file is still in the repository.
Testing patterns for Vercel AI SDK including mock providers, streaming tests, tool calling tests, snapshot testing, and test coverage strategies. Use when implementing tests, creating test suites, mocking AI providers, or when user mentions testing, mocks, test coverage, AI testing, streaming tests, or tool testing.
Install
npx vskill@latest install vanman2024/ai-dev-marketplace/testing-patternsSKILL.md
The same SKILL.md was published earlier as vanman2024/ai-dev-marketplace/testing-patterns.
Testing Patterns for Vercel AI SDK
Purpose: Provide comprehensive testing templates, mock providers, and testing strategies for Vercel AI SDK applications.
Activation Triggers:
- Writing tests for AI features
- Creating mock AI providers
- Testing streaming responses
- Testing tool calling functionality
- Implementing test coverage
- Snapshot testing for AI outputs
Key Resources:
templates/mock-provider.ts- Mock language model implementationtemplates/streaming-test.ts- Test streaming responsestemplates/tool-calling-test.ts- Test tool executiontemplates/snapshot-test.ts- Snapshot testing for outputsscripts/generate-test-suite.sh- Generate test scaffoldsscripts/run-coverage.sh- Run tests with coverageexamples/- Complete test suites for different features
Mock Provider Pattern
Template: templates/mock-provider.ts
Testing Strategies
1. Unit Tests (Mock Providers)
Test AI functions without real API calls
2. Integration Tests (Real Providers)
Test with real providers in CI (with rate limits)
3. Snapshot Tests
Ensure consistent outputs over time
4. E2E Tests
Test complete user flows with mocks
Test Coverage Goals
- Core Functions: >90%
- Error Handling: >80%
- Tool Calling: 100%
- Streaming: >85%
Resources
Templates:
mock-provider.ts- Complete mock implementationstreaming-test.ts- Streaming test patternstool-calling-test.ts- Tool execution testssnapshot-test.ts- Snapshot testing setup
Scripts:
generate-test-suite.sh- Scaffold testsrun-coverage.sh- Run with coverage
Examples:
complete-test-suite.test.ts- Full test suite example
Testing Frameworks: Vitest, Jest, Node Test Runner SDK Version: Vercel AI SDK 5+ Coverage Tool: c8, nyc, or built-in coverage
Best Practice: Use mock providers for fast, reliable tests
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/vercel-ai-sdk/skills/testing-patterns/SKILL.md
Popularity
- Repository stars
- 10
- Repository forks
- 3
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vanman2024/ai-dev-marketplace/testing-patterns)