CtrlK
BlogDocsLog inGet started
Tessl Logo

unit-testing

为 BK-CI 代码编写单元测试时使用,例如 JUnit5、MockK、测试组织、依赖 Mock、异常校验和 TDD 场景。当用户要补测试或用测试驱动实现时优先使用。

58

Quality

73%

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 ./ai/skills/unit-testing/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Content

51%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 well-structured and token-efficient but hollow on substance: it delivers generic testing aphorisms instead of the BK-CI-specific, executable guidance (JUnit5/MockK patterns, naming conventions, a test-writing sequence with a run step) the description promises. Structure is a strength; actionability and workflow sequencing are the clear weaknesses.

Suggestions

Add at least one concrete, copy-paste BK-CI test example (JUnit5 + MockK) demonstrating the expected naming and assertion style, since actionability is the weakest dimension.

Rewrite 快速指导 as a genuine sequenced workflow (identify the branch/behavior → mock the dependency boundary → write the test → run and verify), including an explicit run/verify checkpoint.

Cut guidance Claude already knows (AAA pattern, weak-assertion warnings, happy-path advice) and replace it with project-specific conventions, e.g., where tests live in BK-CI modules and how they are run in the build.

Keep only one pointer to `backend-microservice-development` to remove the duplicated cross-reference.

DimensionReasoningScore

Conciseness

The body is lean (~40 lines) with short, purposeful sections, but lines like "常见模式仍然是 AAA、Mock 外部依赖、显式断言结果和交互" and "断言太弱,只证明代码跑过" restate testing knowledge Claude already has. This matches the 'efficient; minor instances of over-explanation that could be trimmed' anchor rather than the every-token-earns-its-place anchor at 5.

4 / 5

Actionability

There is no code, command, naming example, or BK-CI-specific convention anywhere in the body; guidance like "Mock 应该服务于隔离边界,而不是掩盖设计问题" and "测试命名要能直接表达行为和预期" is high-level principle without the specifics to execute. This matches the 'minimal concrete guidance; high-level hints but missing the specific steps' anchor, and is not the 3 anchor because even pseudocode-style concrete patterns (a naming template, a MockK snippet) are absent.

2 / 5

Workflow Clarity

"快速指导" is a numbered list of unordered framing principles (point 1 is about scope, point 5 about a related skill), not a sequenced test-writing workflow, and there is no run/verify step. This sits at the 'rough sequence present but many gaps' anchor — arguably below it since no true sequence exists — and clearly below the 3 anchor where steps are at least listed as an executable sequence.

2 / 5

Progressive Disclosure

The skill is under 50 lines, single-purpose, with well-organized sections (适用场景 / 不适用场景 / 快速指导 / 高信号规则 / 关键陷阱 / 延伸阅读) and no bundle files to offload, so the simple-skill exception applies: well-organized sections alone warrant a 5. The only blemish is the duplicated pointer to `backend-microservice-development` (in both 快速指导 and 延伸阅读), which is a redundancy rather than an organization gap.

5 / 5

Total

13

/

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: domain and tooling are concrete, triggers are explicit in the user's own vocabulary, and scope is anchored to the BK-CI project. The only gaps are a few missing natural synonyms and no explicit negative scope (integration/E2E exclusion lives in the body, not the description).

DimensionReasoningScore

Specificity

The description names a concrete domain ("为 BK-CI 代码编写单元测试") and lists several specific capabilities — "JUnit5、MockK、测试组织、依赖 Mock、异常校验和 TDD 场景" — which matches the 'several specific actions; minor gaps' anchor. It falls short of the 5 anchor because coverage of the unit-testing domain omits common variations such as parameterized tests or coverage reporting.

4 / 5

Completeness

Both parts are explicit: the 'what' ("编写单元测试… JUnit5、MockK、测试组织、依赖 Mock、异常校验和 TDD 场景") and a concrete 'when' clause ("当用户要补测试或用测试驱动实现时优先使用"). This matches the anchor for clearly and explicitly answering both what and when with concrete trigger phrases; it is not the 4 anchor because the trigger conditions are specific rather than generic.

5 / 5

Trigger Term Quality

Natural user phrases are present — "补测试", "用测试驱动实现", "单元测试", plus tool keywords JUnit5 and MockK — giving good keyword coverage. It misses some natural synonyms (e.g., "写测试", "回归测试", English 'unit test'), so it does not reach the comprehensive-synonyms anchor at 5.

4 / 5

Distinctiveness Conflict Risk

The BK-CI scoping combined with JUnit5/MockK/TDD triggers carves a mostly distinct niche with minor overlap risk against a generic Java-testing skill. It is not a 5 because nothing in the description itself distinguishes it from ordinary Java unit-testing guidance beyond the BK-CI mention.

4 / 5

Total

17

/

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
TencentBlueKing/bk-ci
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.