Add Event Type

VerifiedSafe

Add a new event type to the frontend feed system with a corresponding React component.

Sby Skills Guide Bot
DevelopmentIntermediate
7/23/2026
Claude CodeCursorCodex
#react#typescript#frontend#websocket#ui-components

Recommended for

Automated summary

Guides adding a new event type to the frontend feed system, from the TypeScript union to the React block component and its rendering in the feed.

Strengths

  • Explicit step-by-step flow covering the type definition, EventType union, block component, render switch, and WebSocket handler.
  • Enforces repository conventions (PascalCase components, snake_case event types, Tailwind classes) and disallows any.
  • Uses existing block components as patterns and includes a mock WebSocket event as a test.

Limitations

  • Assumes a specific architecture (frontend/src/App.tsx, existing block components) that may not match other projects.
  • Does not describe the backend event contract or payload schema validation.
  • Testing guidance is limited to sending a mock event, without example payloads.
When to use it

Use when you need to display a new agent output or event type in this React feed.

When not to use it

Avoid when the frontend does not use this EventType/block architecture or when the change is backend-only.

Security analysis

Safe
Quality score72/100

The skill only provides textual guidance for adding a new event type and React component. It does not declare any tools or instruct destructive, exfiltrating, or obfuscated actions. No execution risk beyond normal code editing.

No concerns found

How this analysis is made

Examples

Add search result event
Add a new 'search_result' event type to the frontend feed, including its TypeScript interface, a SearchResultBlock component, and rendering in App.tsx.
Display error events
Create an event block for displaying errors in the agent feed and wire it into the existing EventType union and feed renderer.
Progress update event
Add a progress_update event type with a matching React block and handle it in the WebSocket message handler.

name: add-event-type description: Add a new event type to the frontend feed system with corresponding React component. Use when user mentions "new event", "add event type", "event block", "new block type", or wants to display new agent output types.

Add Event Type

Instructions

  1. Read current event types in frontend/src/App.tsx:

    • Find the EventType union type definition
    • Review existing block components (UserMessageBlock, PlanBlock, TodoBlock, etc.)
  2. Define the new event type interface:

    type NewEventType = {
      type: 'new_type';
      // Add required fields
    };
    
  3. Add to EventType union:

    type EventType = UserMessage | Plan | Todo | ... | NewEventType;
    
  4. Create a new block component following existing patterns:

    function NewTypeBlock({ event }: { event: NewEventType }) {
      return (
        <div className="p-3 bg-zinc-800/50 rounded-lg border border-zinc-700/50">
          {/* Render event data */}
        </div>
      );
    }
    
  5. Add case to the feed rendering switch/conditional in the main component

  6. Update WebSocket message handler if backend sends this event type

Examples

  • "Add a new 'search_result' event type"
  • "Create a block for displaying errors"
  • "Add event type for progress updates"

Guardrails

  • Follow existing naming conventions (PascalCase components, snake_case event types)
  • Use existing Tailwind classes for consistent styling
  • Ensure TypeScript types are complete (no any)
  • Test by sending mock event through WebSocket

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/add-event-type-mrx3xzea/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/add-event-type-mrx3xzea' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/add-event-type-mrx3xzea/download' --output '.skill-downloads/add-event-type-mrx3xzea/SKILL.md.part' && mv '.skill-downloads/add-event-type-mrx3xzea/SKILL.md.part' '.skill-downloads/add-event-type-mrx3xzea/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/add-event-type-mrx3xzea/SKILL.md' && test -s '.skill-downloads/add-event-type-mrx3xzea/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/add-event-type' && cp -R '.skill-downloads/add-event-type-mrx3xzea' '.claude/skills/add-event-type'

Cursor
test -f '.skill-downloads/add-event-type-mrx3xzea/SKILL.md' && test -s '.skill-downloads/add-event-type-mrx3xzea/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/add-event-type' && cp -R '.skill-downloads/add-event-type-mrx3xzea' '.cursor/skills/add-event-type'

Codex
test -f '.skill-downloads/add-event-type-mrx3xzea/SKILL.md' && test -s '.skill-downloads/add-event-type-mrx3xzea/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/add-event-type' && cp -R '.skill-downloads/add-event-type-mrx3xzea' '.agents/skills/add-event-type'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/add-event-type-mrx3xzea'

openskills read 'add-event-type-mrx3xzea'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/add-event-type-mrx3xzea/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills