CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

webiny-event-handler-pattern

EventHandler implementation pattern — handle method, event payloads, filtering, DI, domain event definition, publishing events from UseCases, and reacting to external events. Use this skill to implement any Webiny EventHandler (before/after hooks) or to define and publish your own domain events.

Quality

84%

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

71%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, code-dense skill body: it teaches the EventHandler pattern through executable TypeScript templates, enforces architectural rules (thin handlers, model filtering, registration requirements), and includes an explicit type-resolution checkpoint. The main weakness is structure: with no references/ bundle, the self-defined-domain-events section is a large inlined block that the rubric expects split into a one-level-deep reference file.

Suggestions

Move the 'Defining Your Own Domain Events' material (abstractions.ts, events.ts, and UseCase publishing examples) into a references/ file such as references/defining-domain-events.md, leaving a concise summary and a clearly signaled link in SKILL.md.

Collapse the 'How to Implement' and 'Injecting Dependencies' sections into one template (they differ only in the injected dependency), stating the dependency-variation rule in a sentence instead of a second full code block.

Add a post-implementation verification step (e.g., typecheck or a build check before 'yarn webiny deploy api --env=dev') to close the workflow's feedback loop.

DimensionReasoningScore

Conciseness

The body is lean: sections are short, assume competence (no explanation of what DI or events are in general), and every paragraph carries Webiny-specific rules Claude would not know. Minor redundancy keeps it below the top anchor — 'How to Implement' and 'Injecting Dependencies' show two near-identical handler scaffolds differing only in the injected dependency, which could be collapsed.

4 / 5

Actionability

Mostly executable, copy-paste-ready TypeScript covering the common cases (handler implementation, event definition, publishing from a UseCase, reacting to external CMS events, registration), plus a concrete deploy command. Minor gap: the primary template uses placeholder imports ('SomeEventHandler from "webiny/api/<category>"') requiring substitution, while the external-event example is fully concrete — placing it between 'concrete code with minor gaps' (4) and 'fully executable covering common cases' (5), noticeably above the midpoint.

4 / 5

Workflow Clarity

The sequence is clear and well-ordered: define payloads/handler abstractions in abstractions.ts → event classes in events.ts → publish from the UseCase (before → operation → after) → register in Extension.ts → deploy. The 'Resolving Types (MANDATORY)' section is an explicit numbered pre-flight checkpoint ('read the source file... Do not assume or guess property names'), and Key Rules restate publish order and failure modes. It falls short of the top anchor because there is no post-write validation or feedback loop (e.g., typecheck/build verification after implementing), only the pre-code source-reading checkpoint.

4 / 5

Progressive Disclosure

Section headers are clear and there is helpful cross-skill navigation ('Related Skills', 'See webiny-api-architect'), but the file is a ~290-line monolith with no bundle files: the entire 'Defining Your Own Domain Events' half (~110 lines of abstractions/events/UseCase code) is inlined in SKILL.md where the rubric expects a one-level-deep reference file. This matches 'some structure, but content that should be separate is inline' (3) — it is above the poorly-structured anchor (2) thanks to clean headers and signaled cross-references, but below 'good structure, most content appropriately placed' (4).

3 / 5

Total

15

/

20

Passed

Description

88%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 comprehensive set of concrete capabilities and includes an explicit 'Use this skill to...' trigger clause covering both consuming and defining domain events. Third-person voice is maintained and no vague fluff is present. The only weaknesses are a few missing natural synonyms (subscribe/listen for events) and slight trigger overlap with the sibling Webiny UseCase skill.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions — 'handle method, event payloads, filtering, DI, domain event definition, publishing events from UseCases, and reacting to external events' — giving comprehensive coverage of the pattern's capabilities within its domain. It matches the anchor for multiple specific concrete actions, and is not below it only in the sense of domain breadth, which is appropriate for a focused skill.

5 / 5

Completeness

It explicitly answers both: what ('EventHandler implementation pattern — handle method, event payloads, filtering, DI, domain event definition, publishing events from UseCases, and reacting to external events') and when ('Use this skill to implement any Webiny EventHandler (before/after hooks) or to define and publish your own domain events'). The 'Use this skill to...' clause provides explicit, concrete trigger guidance, matching the top anchor; without it the score would cap at 3, but it is present.

5 / 5

Trigger Term Quality

Strong natural keywords: 'EventHandler', 'before/after hooks', 'domain events', 'publish events', 'event payloads', 'reacting to external events' — phrases a user working in Webiny would say. Missing a few natural variations/synonyms (e.g., 'subscribe to events', 'listen for events', 'event handler registration'), so it sits between 'good coverage, a few natural terms missing' (4) and comprehensive (5); it is noticeably above the midpoint but not clearly at the top anchor.

4 / 5

Distinctiveness Conflict Risk

The Webiny EventHandler niche is clear and the trigger phrases ('implement any Webiny EventHandler', 'define and publish your own domain events') are distinct from generic skills. There is minor overlap risk with closely related Webiny skills (the body itself lists webiny-use-case-pattern, which also covers event publishing from UseCases), placing it at 'mostly distinct; minor overlap risk' rather than the minimal-conflict top anchor.

4 / 5

Total

18

/

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

webiny/webiny-js

Path

skills/user-skills/api/event-handler-pattern/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.