CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

testing-core-processors

This guide explains how to test error processors with `MockLanguageModelV2`, including simulating API errors, verifying retry behavior, and constructing complete stream events. It outlines happy-path, control, and selectivity tests, shows how to seed tool-call messages, and provides commands for running focused or broader test suites.

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Scored by GLM 5.3

Content

82%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body delivers fully executable, well-organized guidance for writing and running error-processor tests, with a valuable gotcha section on stream mock event sequences. Minor improvements are possible around trimming the dual mock block and adding a test-failure feedback loop.

Suggestions

Trim the doStream mock (or move the full reference mock to a reference file) instead of the '// Same error logic as doGenerate' placeholder, keeping SKILL.md leaner.

Add a short feedback loop for test failures, e.g. 'If tests fail with empty text output, check the stream event sequence (see Stream Mock Gotcha)' or guidance on re-running a single focused test after a fix.

Fold the 'Devin Secrets Needed' section into a one-line note (e.g. 'Mock-based tests need no secrets; live API tests need ANTHROPIC_API_KEY / OPENROUTER_API_KEY') to save tokens.

DimensionReasoningScore

Conciseness

The body is efficient and assumes competence (e.g., 'No build needed: Vitest resolves @mastra/core... from source' adds non-obvious value), but the combined doGenerate/doStream mock block with a '// Same error logic' placeholder comment and the partly extraneous 'Devin Secrets Needed' section could be trimmed. It is not 5 because a few tokens do not earn their place; not 3 because padding is minor.

4 / 5

Actionability

Fully executable, copy-paste-ready guidance: a complete MockLanguageModelV2 TypeScript mock, a concrete AI SDK message-format example, and exact commands ('npx vitest run packages/core/src/processors/my-processor.test.ts', 'pnpm test:core'). The examples cover the common cases of error simulation, retry verification, and tool-call history seeding.

5 / 5

Workflow Clarity

A clear sequence is present — mock pattern, then a numbered 3-part test structure with explicit assertions per test, then run commands — and the 'Stream Mock Gotcha' section addresses a real failure mode. It is not 5 because there is no explicit run→verify→fix feedback loop for test failures; not 3 because checkpoints (assertions) are explicit and the sequence is coherent.

4 / 5

Progressive Disclosure

No bundle files exist, and the body is organized into clear, well-sized sections with a pointer to 'prefill-error-recovery.test.ts' as the reference pattern. It is not 5 because at ~110 lines the large mock code block is inlined where a reference file could keep SKILL.md leaner, and the secrets section is slightly off-topic; not 3 because nothing that clearly belongs in a separate file is buried.

4 / 5

Total

17

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, highly specific description that explicitly covers both what the skill does and when to use it, anchored to a concrete repo path and mock pattern. Its only weakness is slightly limited synonym coverage in trigger terms.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions — 'writing or debugging integration tests', 'simulating API errors', 'verifying retry behavior', 'run focused vitest runs' — with comprehensive coverage of the skill's niche. It is not a 4 because there are no minor gaps: every capability the skill covers (mock pattern, retry verification, test execution) is named.

5 / 5

Completeness

Both 'what' and 'when' are explicitly answered: 'Use when writing or debugging integration tests for error processors in packages/core/src/processors/' gives a concrete trigger, and the 'what' is spelled out via the MockLanguageModelV2 pattern, retry verification, and focused vitest runs. Not a 4 because the 'when' clause is explicit and specific rather than merely present.

5 / 5

Trigger Term Quality

Good keyword coverage with natural phrases users would say: 'integration tests', 'error processors', 'retry behavior', 'vitest', 'debugging'. It is not 5 because common variations and synonyms such as 'failing tests', 'flaky tests', or 'test coverage' are missing.

4 / 5

Distinctiveness Conflict Risk

The description is anchored to a specific repo path ('packages/core/src/processors/') and a specific mock class ('MockLanguageModelV2'), giving it a clear niche with distinct triggers and minimal risk of firing for unrelated testing skills.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

mastra-ai/mastra

Path

.claude/skills/testing-core-processors/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.