CtrlK
BlogDocsLog inGet started
Tessl Logo

test-case

当用户需要编写一个单元测试时,触发该 skill,编写单元测试。

58

Quality

67%

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 ./.agents/skills/system/test-case/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

86%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 is highly actionable and well-structured, giving concrete path mappings, skip rules, commands, and a sequenced workflow with a retry loop. Its main weakness is an inconsistent coverage target (100% vs 90%) that slightly muddies the validation checkpoint.

Suggestions

Reconcile the coverage requirement: pick one authoritative threshold (rule 2's 100% or the verification step's 90%+) and state it consistently in both places.

Add one complete minimal .test.ts example (a small function plus its describe/it blocks) so the writing pattern is concrete rather than only described.

Tighten rule 7 and remove the duplicated trigger line in 'When to Use This Skill' to recover a few tokens and reach full conciseness.

DimensionReasoningScore

Conciseness

The body is lean and assumes competence: direct rules, executable commands, and short code snippets with no padding about what unit tests are. It is not a 5 because a few rules (e.g. rule 7 on global mocks) and the duplicate trigger line could be tightened, but it is well above the 3 anchor that tolerates unnecessary explanation.

4 / 5

Actionability

Guidance is copy-paste ready: explicit source-to-test path mappings, real import examples via '@fastgpt', concrete skip-lists (type.ts/constants.ts/schema.ts), and runnable 'pnpm test <file-path> <test-name>' commands. This matches 'Fully executable; copy-paste ready; specific examples cover the common cases.'

5 / 5

Workflow Clarity

A clear three-phase sequence (任务准备 → 测例编写 → 结果验证) with an explicit feedback loop ('如需二次修改,则回到二、测例编写') and a coverage checkpoint is present. It is not a 5 because the validation threshold is contradictory (rule 2 says 100% line/branch coverage while the verification step says 90%+), leaving a minor gap about which checkpoint is authoritative.

4 / 5

Progressive Disclosure

The single-file skill is well-organized into clear sections (位置/规则/流程/场景/命令) with one-level-deep references to real repo files (vitest.config.mts, test/mocks/index.ts) and no content that clearly belongs in a separate file. With no bundle to split and good navigation, this matches the well-organized single-file case.

5 / 5

Total

18

/

20

Passed

Description

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

The description provides an explicit trigger but a weak, generic statement of what the skill does, leaving its real capabilities (path mapping, coverage, mock guidance) unstated. It is distinct as a unit-testing niche yet under-specified in capability coverage.

Suggestions

Add 2-3 concrete capabilities to the description, e.g. 'Maps source files to test paths under packages/test or projects/app/test, enforces 90%+ coverage, and minimizes mocking of natively runnable code.'

Broaden trigger terms beyond a single phrase by adding synonyms such as '单测' and natural variants like '为某个文件补测试' or '提高测试覆盖率'.

Separate 'what' from 'when' so the action statement describes behavior rather than restating the trigger, e.g. 'Generates Vitest unit tests following FastGPT path and coverage conventions. Use when the user asks to write or add unit tests for a source file.'

DimensionReasoningScore

Specificity

The description names the domain ('编写一个单元测试') but offers only one generic action (write unit tests) with no second concrete capability, matching the anchor 'Names the domain but actions are minimal or generic.' It is not a 3 because no additional concrete actions are listed, and not a 1 because the domain is explicitly named rather than being pure abstract language.

2 / 5

Completeness

The 'when' is explicit ('当用户需要编写一个单元测试时'), but the 'what' ('编写单元测试') merely restates the trigger and is vague about what the skill actually does (file mapping, coverage rules, mock strategy). It is not a 4 because the 'what' is not specific, and not a 2 because a concrete trigger clause is present.

3 / 5

Trigger Term Quality

The phrase '当用户需要编写一个单元测试时' is a natural user utterance, but only the single term '单元测试' appears with no synonyms (e.g. '单测') or file extensions. This matches 'Some relevant keywords but missing common variations or synonyms' rather than 4 (which requires broader keyword coverage) or 2 (which lacks any natural phrase).

3 / 5

Distinctiveness Conflict Risk

'单元测试' is a clear, narrow niche unlikely to trigger for unrelated skills, matching 'Mostly distinct; minor overlap risk with closely related skills.' It is not a 5 because no distinguishing concrete features are stated that further separate it from adjacent testing skills.

4 / 5

Total

12

/

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.

Validation15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 2 suspicious

Warning

Total

15

/

16

Passed

Repository
labring/FastGPT
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.