CtrlK
BlogDocsLog inGet started
Tessl Logo

define-errors

defineErrors from wellcrafted: variant factories, extractErrorMessage, InferErrors/InferError, call site patterns. Use when creating error types or reviewing error patterns.

65

Quality

82%

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

81%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 high-quality reference skill: fully executable examples with Good/Bad contrasts, unambiguous decision rules, and clearly signaled ownership boundaries to sibling skills. The main weaknesses are repetition across the cause-based pattern sections and some inlined niche content (Whispering RPC boundary, reverted-convention history) that could be trimmed or split out.

Suggestions

Cut or collapse Pattern 5 (FsError) — it repeats the cause+field shape of Patterns 3/4 three times; one ReadFailed example or a note that read/write/delete follow the same shape would suffice.

Trim the historical narrative in the 'data' soft-convention section ('An earlier Wellcrafted change tried to reserve data and was reverted...') to just the convention and the preferred field names.

Move niche boundary content such as the Whispering RPC Boundary section into a reference file (e.g. references/rpc-boundary.md) with a one-line pointer from the body.

DimensionReasoningScore

Conciseness

The content is dense, project-specific, and assumes Claude's competence (no basic TypeScript or error-concept explanations), but Pattern 5 (FsError) duplicates the cause+field shape of Patterns 3/4 across three near-identical variants, and the 'data' section carries historical narrative ('An earlier Wellcrafted change tried to reserve data and was reverted'). Fits anchor 3 ('mostly efficient but could be tightened') — the duplication is a full section, more than the minor trimming of anchor 4.

3 / 5

Actionability

Every pattern is copy-paste-ready executable TypeScript — 'export const RecorderError = defineErrors({...})' with InferErrors shadowing, extractErrorMessage inside factories, exhaustive 'switch (error.name)' pinned with 'default: error.error satisfies never', and 'Result<T, CallError>' integration — plus concrete Good/Bad message contrasts. Fully covers the common cases, matching anchor 5.

5 / 5

Workflow Clarity

This is a single-task conventions skill with no multi-step process and no destructive or batch operations, so no validation cap applies. The single action (construct error variants) is unambiguous with explicit decision rules: 'one defineErrors call' per public failure contract, when a single 'Failed' variant is acceptable, and when 'if' is legitimate versus an exhaustive switch. Per the simple-skill exception, this matches anchor 5.

5 / 5

Progressive Disclosure

No bundle files exist (references/, scripts/, assets/ are absent), so all ~300 lines are inline in one file, but the body is well-sectioned (Import, Core Rules, Patterns, consumption/envelope topics) and cross-skill references are clearly signaled ('See error-handling for...', 'see error-handling/references/http-boundaries.md'). Fits anchor 4 ('good structure; most content appropriately placed; minor gaps') — niche sections such as the Whispering RPC boundary could be split out, keeping it below anchor 5's clean overview-plus-references split.

4 / 5

Total

17

/

20

Passed

Description

75%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, specific description that names the library API surface and includes an explicit 'Use when' clause. All dimensions land at anchor 4: concrete and distinguishable, with minor gaps in trigger synonym coverage and a slight overlap risk with the error-handling skill on the generic 'reviewing error patterns' trigger.

Suggestions

Add natural trigger synonyms such as 'error variants', 'error factories', or 'InferErrors types' so users phrasing the need differently still match.

Broaden the when-clause to cover more invocation moments, e.g. 'Use when creating error types or tagged error variants, extracting error types, or reviewing error-handling patterns in the codebase.'

Sharpen the 'reviewing error patterns' trigger to reduce overlap with the error-handling skill, e.g. 'reviewing defineErrors variant definitions or call-site construction'.

DimensionReasoningScore

Specificity

Names the domain ('defineErrors from wellcrafted') and several concrete capabilities ('variant factories, extractErrorMessage, InferErrors/InferError, call site patterns'), but coverage is not comprehensive — error unions, Result integration, and exhaustive-switch consumption are absent. Fits anchor 4 ('several specific actions; minor gaps') rather than 5, and exceeds anchor 3's 1-2 concrete actions.

4 / 5

Completeness

Both what ('variant factories, extractErrorMessage, InferErrors/InferError, call site patterns') and when ('Use when creating error types or reviewing error patterns') are present and explicit. The when-clause is narrower than anchor 5's comprehensive concrete triggers, so 4 is the best fit; well above anchor 3's missing/weak when.

4 / 5

Trigger Term Quality

'Use when creating error types or reviewing error patterns' plus the specific API names ('defineErrors', 'extractErrorMessage') give good natural keyword coverage. Missing common variations such as 'error variants', 'define errors', or 'error factory', so it fits anchor 4 rather than anchor 5's comprehensive synonym coverage.

4 / 5

Distinctiveness Conflict Risk

Anchoring to 'defineErrors from wellcrafted' is highly specific with minimal conflict risk, but the trigger 'reviewing error patterns' is broad enough to overlap with the sibling 'error-handling' skill. Fits anchor 4 ('mostly distinct; minor overlap risk') rather than 5's minimal-conflict niche.

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
EpicenterHQ/epicenter
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.