CtrlK
BlogDocsLog inGet started
Tessl Logo

migrate-to-shoehorn

将测试文件从 `as` 类型断言迁移到 @total-typescript/shoehorn。适用于用户提到 shoehorn、想替换测试中的 `as`,或需要局部测试数据时。

67

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

SKILL.md
Quality
Evals
Security

Quality

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.

A well-crafted, highly actionable skill body: executable code patterns, a concrete search command, and a sequenced checklist with a validation step. The only trims are the `as`-problems explanation Claude already knows, and the workflow would be slightly stronger with an explicit fix-and-re-run loop after the type check.

DimensionReasoningScore

Conciseness

The body is largely lean — Before/After code pairs, a decision table, and a checklist all earn their tokens. However, the "Why shoehorn?" section ("经过训练,不去使用它", "必须手动指定 target type", double-as explanation) spends tokens explaining problems with `as` that Claude already knows. Minor over-explanation keeps it at 'efficient with minor trimming possible', not the lean top anchor.

4 / 5

Actionability

Fully executable guidance throughout: install command (`npm i @total-typescript/shoehorn`), a ready-to-run grep (`grep -r " as [A-Z]" --include="*.test.ts" --include="*.spec.ts"`), complete copy-paste Before/After TypeScript snippets for both `as Type` and `as unknown as Type` cases, and a function-selection table. Coverage of the common migration cases is comprehensive.

5 / 5

Workflow Clarity

The Workflow section gives a clear two-phase sequence with a checklist and a final validation step ("运行 type check 验证"), and the destructive/batch cap does not apply since validation is present. It falls short of the top anchor because there is no feedback loop — no guidance on what to do when the type check fails (fix and re-verify).

4 / 5

Progressive Disclosure

No bundle files exist and the skill is self-contained with well-organized sections (Why, Install, Migration patterns, When to use each, Workflow); nothing clearly belongs in a separate file. At ~113 lines it exceeds the compact under-50-line threshold for an automatic 5, and the top anchor centers on well-signaled external references, which this skill neither has nor needs — so it sits at 'good structure with minor gaps'.

4 / 5

Total

17

/

20

Passed

Description

78%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: it states a concrete, well-scoped capability and includes an explicit use-when clause with natural trigger phrases in the shoehorn niche. Minor improvements possible by naming the replacement functions and tightening the broad 'partial test data' trigger.

DimensionReasoningScore

Specificity

"将测试文件从 `as` 类型断言迁移到 @total-typescript/shoehorn" names the domain and one concrete action (migrating `as` assertions to shoehorn), but does not list several specific actions such as fromPartial/fromAny replacement patterns. This matches the anchor for naming a domain with 1-2 concrete actions, not the level above which requires a list of several specific actions.

3 / 5

Completeness

It explicitly answers both 'what' (migrate `as` type assertions in test files to @total-typescript/shoehorn) and 'when' ("适用于用户提到 shoehorn、想替换测试中的 `as`,或需要局部测试数据时") with three concrete trigger phrases. The 'when' is explicit and specific, matching the top anchor rather than the level below where 'when' could be more explicit.

5 / 5

Trigger Term Quality

Triggers like "用户提到 shoehorn", "想替换测试中的 `as`", and "需要局部测试数据" are natural phrases users would say. A few natural variations are missing (e.g. 'type casting', 'type assertions', 'test fixtures'), so it falls just below comprehensive synonym coverage.

4 / 5

Distinctiveness Conflict Risk

The shoehorn-specific migration niche is mostly distinct with clear triggers, but "需要局部测试数据" (needs partial test data) has minor overlap risk with generic test-fixture generation skills. Not the top anchor because that trigger is slightly broad.

4 / 5

Total

16

/

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
vinvcn/mattpocock-skills-zh-CN
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.