CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

testing-patterns

Jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle.

Quality

80%

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

Fix and improve this skill with Tessl

tessl review fix ./plugins/AI-Agents-Safe-Coding-Skills-claude/skills/testing-patterns/SKILL.md

The canonical home for this skill is testing-patterns in administrakt0r/AI-Agents-Safe-Coding-Skills

SKILL.md
Quality
Evals
Security

Quality

Content

68%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.

A highly actionable pattern catalog with copy-paste-ready TypeScript/Jest examples covering factories, mocking, and interaction testing. Its weaknesses are padding — a philosophy section and best-practices list that restate concepts Claude already knows, plus a boilerplate When to Use sentence — and an TDD workflow whose verify-at-each-step checkpoints are only implicit.

Suggestions

Cut or compress the 'Testing Philosophy' and 'Best Practices' sections to only project-specific conventions; Claude already knows TDD red-green-refactor and 'test behavior, not implementation', so these ~30 lines are pure token cost.

Delete the filler 'When to Use' sentence ('This skill is applicable to execute the workflow or actions described in the overview.') — it adds no information.

Make the TDD cycle's checkpoints explicit, e.g., '1. Write the failing test, run `npm test <file>` to confirm red; 2. Implement minimal code, re-run to confirm green; 3. Refactor, re-run before committing.'

DimensionReasoningScore

Conciseness

The code sections are lean, but the body spends lines on concepts Claude already knows: the TDD bullets ('Write failing test FIRST / Implement minimal code to pass / Refactor after green'), 'Test behavior, not implementation', and 'Keep tests DRY', then duplicates them in a six-item 'Best Practices' list, plus a pure filler sentence in 'When to Use' ('This skill is applicable to execute the workflow or actions described in the overview.'). This fits anchor 3 ('mostly efficient but includes some unnecessary explanation or could be tightened') rather than anchor 2, because the padding is confined to a few sections while the majority of the document is tight, executable code — but it is more than 'minor instances', excluding anchor 4.

3 / 5

Actionability

Nearly every section is copy-paste ready executable code: the custom render helper, getMockX factories with typed overrides, jest.mock with factory functions and requireMock access, GraphQL hook mocking with mockReturnValue, fireEvent/waitFor interaction patterns, and concrete npm commands. This matches anchor 5 ('fully executable; copy-paste ready code or commands; specific examples cover the common cases'); the empty it() bodies in the Test Structure section are an intentional skeleton template, not a gap.

5 / 5

Workflow Clarity

The primary workflow (TDD red-green-refactor) is listed as a clear sequence, but the checkpoints are implicit — it never says to run the tests to confirm red before implementing or green before refactoring ('npm test' appears only in a standalone commands section). This fits anchor 3 ('steps listed but validation gaps; sequence present but checkpoints missing or implicit') rather than anchor 4, whose sequence embeds the verification step at each stage. No destructive/batch operations, so no cap applies.

3 / 5

Progressive Disclosure

The body is well organized with clear section headers (Utilities, Factories, Mocking, Structure, Query/Interaction Patterns, Anti-Patterns) and no nested references. It fits anchor 4 ('good structure; most content is appropriately placed; minor organization gaps') — the ~265-line catalog could offload advanced material (e.g., GraphQL mocking patterns) into reference files to keep SKILL.md as a leaner overview, and the 'Integration with Other Skills' section points at other skills by name without paths. Not anchor 5 because there is no clear overview-to-detail split, and not anchor 3 because the structure that exists is genuinely well signaled and navigable.

4 / 5

Total

15

/

20

Passed

Description

83%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 description that clearly states what the skill covers and when to use it, with natural trigger phrases users would actually say. The Jest-specific framing keeps conflict risk low; the main gap is that capabilities are stated as topic areas rather than concrete actions, and a few natural synonyms (specs, coverage) are missing.

DimensionReasoningScore

Specificity

The description names the domain ('Jest') and lists several concrete capability areas ('factory functions, mocking strategies, and TDD workflow'), matching anchor 4's 'lists several specific actions; minor gaps in coverage'. It falls short of anchor 5 because these are topic areas rather than specific actions (compare 'Extract text and tables from PDF files, fill forms, merge documents') and 'testing patterns' is somewhat generic.

4 / 5

Completeness

It explicitly answers both 'what' ('Jest testing patterns, factory functions, mocking strategies, and TDD workflow') and 'when' with concrete trigger phrases ('Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle'), mirroring the anchor 5 example structure. Not anchor 4 because the 'when' clause is not weak or generic — it enumerates three specific triggering activities.

5 / 5

Trigger Term Quality

Natural phrases like 'writing unit tests', 'creating test factories', and 'following TDD red-green-refactor cycle' are things users would actually say, plus the 'Jest' keyword. It misses common variations such as 'specs', 'test coverage', 'mocking modules', or file extensions (.test.tsx), so it fits anchor 4 ('good keyword coverage; a few natural terms missing') rather than anchor 5's comprehensive synonym/extension coverage.

4 / 5

Distinctiveness Conflict Risk

The Jest/TDD/factory niche is mostly distinct with specific triggers, matching anchor 4 ('mostly distinct; minor overlap risk with closely related skills'). It could collide with other test-related skills (e.g., a general testing-library or react-ui-patterns skill covering UI state testing), keeping it below anchor 5's 'clear niche with distinct triggers; minimal conflict risk'.

4 / 5

Total

17

/

20

Passed

Validation

93%

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

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

frontmatter_unknown_keys

Unknown frontmatter key(s) found; consider removing or moving to metadata

Warning

Total

15

/

16

Passed

Repository

administrakt0r/AI-Agents-Safe-Coding-Skills

Path

plugins/AI-Agents-Safe-Coding-Skills-claude/skills/testing-patterns/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.