Agent skill

Datapages Events

by romshark in romshark/datapages

Datapages real-time events: event types and subjects, dispatchers, On handlers, per-user and signal-bound subject fields, and the StreamOpen and StreamClose hooks.

MITAuto-check passed

Install Datapages Events

skills CLI
$ npx skills add romshark/datapages --skill datapages-events -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install romshark/datapages datapages-events --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/romshark/datapages.git skills-src && mkdir -p .claude/skills && cp -r skills-src/internal/generator/agentdocs/data/skills/datapages-events .claude/skills/datapages-events && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
datapages-events
GitHub stars
113
Token cost
~1.4k tokens
SKILL.md length
651 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Datapages real-time events: event types and subjects, dispatchers, On handlers, per-user and signal-bound subject fields, and the StreamOpen and StreamClose hooks.

  • SKILL.md covers Dispatch, Handle, Subjects and Delivery, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Datapages Events is an agent skill from romshark/datapages. Datapages real-time events: event types and subjects, dispatchers, On handlers, per-user and signal-bound subject fields, and the StreamOpen and StreamClose hooks. Activate when adding events, subscriptions or stream hooks to a Datapages app.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A Datastar Go web frontend framework. The licence is MIT.

Example prompts

  • “Use the datapages-events skill to datapage real-time events: event types and subjects, dispatchers, On handlers, per-user and signal-bound subject…”
  • “/datapages-events”

What it can do on your machine

Read from SKILL.md and the folder at commit 87d5a44. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Datapages Events loads about 1.4k tokens when it runs. Until then it costs about 65 tokens; SKILL.md has 651 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from romshark/datapages at commit 87d5a44, republished under its MIT licence (© romshark). 651 words, ~1,408 tokens.

Download SKILL.mdSave it as .claude/skills/datapages-events/SKILL.md (or your agent's skills folder).
name
datapages-events
description
Datapages real-time events: event types and subjects, dispatchers, On handlers, per-user and signal-bound subject fields, and the StreamOpen and StreamClose hooks. Activate when adding events, subscriptions or stream hooks to a Datapages app.

Events

Read datapages first for the build loop, hard rules and naming conventions. Read datapages-state when the page uses per-tab server state.

A handler dispatches an event type. Datapages delivers it over SSE to subscribed pages. Declare the type in the app package or an imported package. Types in imported packages can be shared by multiple apps.

go
// EventMessageSent is "messaging.sent"
type EventMessageSent struct {
	Message string `json:"message"`
}

Dispatch

Add a datapages.Dispatcher[EventX] parameter, one per event type.

go
func (PageChat) POSTSend(
	r *http.Request,
	messageSent datapages.Dispatcher[EventMessageSent],
) error {
	return messageSent.Dispatch(EventMessageSent{Message: "hello"})
}

Dispatch uses the handler's context. Use DispatchCtx(ctx, ev) when the publish can outlive the handler or needs a separate deadline. An action can use r.Context(). An On handler has no request and can use sse.Context(). Publishes through multiple dispatchers are not atomic. Combine their errors with errors.Join.

Handle

On + the event name, on a page or on an embedded type.

go
func (PageChat) OnMessageSent(
	event EventMessageSent,
	sse datapages.SSE,
	streamID datapages.StreamID, // optional
	session Session,             // optional
) error {
	return sse.PatchElement(messageComponent(event.Message))
}

The event and sse are required. On handlers cannot accept signals. Put required data on the event, or use datapages.State[T] for per-tab data.

Subjects

A subject field must have the exact type datapages.Subject or datapages.SubjectUser. The generator rejects a defined type such as type Recipient datapages.SubjectUser, and a field that holds a subject type, such as []datapages.SubjectUser, which would route nothing. Subject fields must be exported and must precede payload fields. Their values extend the base subject in field order, separated by periods. EventDirectMessage{Recipient: "u1"} publishes to messaging.direct.u1. A subject field must not be tagged json:"-": the payload carries its value, the subject only routes the event.

go
// EventDirectMessage is "messaging.direct"
type EventDirectMessage struct {
	Recipient datapages.SubjectUser `json:"recipient"`

	Content string `json:"content"`
}
  • One dispatch targets one subject. To notify several recipients, dispatch once per recipient. Each publish can fail independently.
  • Two events must not share a subject. An event with subject fields also claims every subject below its base subject. For example, "chat" with fields conflicts with "chat.msg".
  • A subject value may contain any byte. Datapages escapes bytes that are not valid in a subject, so an email address works. An empty value fails the dispatch and publishes nothing.
  • SubjectUser sends only to the client authenticated as that user and requires a session type. An event may have one SubjectUser field: the generator rejects a second one, such as To, Cc datapages.SubjectUser. Validate an ID with datapages.ValidateUserID before returning it in a new session.
  • A signal:"name" tag on a datapages.Subject field gets the value from the client signal. An empty value returns 400. Datapages escapes * as a literal segment, not a wildcard. The tag is a period-separated signal path. Each segment must match [A-Za-z_][A-Za-z0-9_]* and must not contain __. Two fields must not use the same signal. A page's events must not need one signal both as a value and as an object, such as chat and chat.room. A SubjectUser field cannot have this tag because it is already bound to the authenticated user.
Show full SKILL.md (207 more words)Show less

Delivery

Delivery is at most once and has no replay. Only streams subscribed at publish time receive an event. A hidden tab closes its stream by default and misses events. The default broker subscription buffer holds 16 messages. When it is full, the broker drops new messages without blocking the publisher or telling the page. Render full current state after a refresh so a missed append or prepend event cannot leave the page incomplete.

Stream hooks

StreamOpen and StreamClose run when a page's SSE stream opens and closes. Both require r *http.Request and at least one of streamID datapages.StreamID or state datapages.State[T]. They may return error or no value.

go
func (PageIndex) StreamOpen(
	r *http.Request,
	streamID datapages.StreamID,
	sse datapages.SSE,                            // optional
	session Session,                              // optional
	signals datapages.Signals[struct{ /*...*/ }], // optional
	ping datapages.Dispatcher[EventPing],         // optional
) error

StreamClose may also take session, dispatchers and stateID string with State[T]. It cannot take sse or signals. A StreamOpen error stops setup, closes the stream and calls RecoverError. Datapages only logs a StreamClose error.

Use State[T] for filters, sort order and other per-tab values. Use stream hooks to acquire and release resources for a stream. streamID is internal and must not be sent to a client.

Datapages serves the stream at the page route plus _$/. A page with both public and user-addressed events has a second stream at _$/anon/.

Share a handler across pages by embedding: see datapages-pages.

© romshark, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in internal/generator/agentdocs/data/skills/datapages-events of romshark/datapages.

Open the folder on GitHubat commit 87d5a44

Compare with similar skills

Datapages Events next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Datapages Events compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Datapages Events this skillromshark/datapages113—~1.4kAutomated safety check: PassMIT
Event TypesBuilderIO/agent-native7.1k—~365Automated safety check: PassNone
Eventscoreyhaines31/marketingskills54k—~3kAutomated safety check: PassMIT
Dispatchsickn33/agentic-awesome-skills47k1 repos~2.1kAutomated safety check: PassMIT
Rust Path Typesopeninterpreter/openinterpreter69k2 repos~605Automated safety check: PassApache-2.0
Python Type Safetywshobson/agents40k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Event Types

    BuilderIO/agent-native

    How event types work — fields, scheduling types, tabs in the editor, and the full set of configurable options.

    7.1k GitHub stars~365 tokensUpdated today
    Auto-check passed
  • Events

    coreyhaines31/marketingskills

    When the user wants to plan, run, sponsor, speak at, or get pipeline from events — webinars, conferences, trade shows, meetups, dinners, workshops, virtual summits, or user conferences.

    54k GitHub stars~3k tokensUpdated yesterday
    Marketing & SEOAuto-check passed
  • Dispatch

    sickn33/agentic-awesome-skills

    Delegate tasks to OpenAI Codex CLI and Google Antigravity CLI from Claude Code with topic-aware sessions

    47k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Rust Path Types

    openinterpreter/openinterpreter

    Rules for choosing Rust types for filesystem paths in new Codex code, covering protocol types, internal use and model tool arguments.

    69k GitHub starsUsed in 2 repos~605 tokens
    DevelopmentAuto-check passed
  • Python Type Safety

    wshobson/agents

    Python type safety with type hints, generics, protocols, and strict type checking.

    40k GitHub stars~1.4k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Pyrefly Type Coverage

    pytorch/pytorch

    Migrate a file to use stricter Pyrefly type checking with annotations required for all functions, classes, and attributes.

    104k GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed

More from romshark/datapages

All 15 skills in this repo
  • Datapages

    romshark/datapages

    Apply the Datapages framework rules, build loop and naming conventions, and select the relevant task skill.

    113 GitHub stars~1.9k tokensUpdated 2 days ago
    Auto-check passed
  • Datapages Sessions

    romshark/datapages

    Add Datapages authentication: define and read the Session type, open and close sessions, configure CSRF protection and choose a session manager.

    113 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • Datapages State

    romshark/datapages

    Add per-tab Datapages State[T], initialize and use it in handlers, dispatch state-scoped events, and configure the live instance limit.

    113 GitHub stars~806 tokensUpdated 2 days ago
    Auto-check passed
  • Review Criteria

    romshark/datapages

    Classify Datapages findings by reach and severity and write review-.md reports.

    113 GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed
  • Git Commits

    romshark/datapages

    Write Datapages commit messages, including the breaking-change marker and the BREAKING block.

    113 GitHub stars~960 tokensUpdated 2 days ago
    Auto-check passed
  • Datapages Actions

    romshark/datapages

    Write Datapages action handlers (POST, PUT, PATCH, DELETE, QUERY): parameters, return values, Datastar signals, SSE patching, HTTP error status codes and the RecoverError hook.

    113 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed

Questions about Datapages Events

What does Datapages Events do?

Datapages real-time events: event types and subjects, dispatchers, On handlers, per-user and signal-bound subject fields, and the StreamOpen and StreamClose hooks. Datapages Events is an agent skill from romshark/datapages. Datapages real-time events: event types and subjects, dispatchers, On handlers, per-user and signal-bound subject fields, and the StreamOpen and StreamClose hooks.

How do I install Datapages Events in Claude Code?

Run `npx skills add romshark/datapages --skill datapages-events -a claude-code`. Or copy the skill folder (internal/generator/agentdocs/data/skills/datapages-events in romshark/datapages) into .claude/skills/datapages-events in your project. Claude Code loads it when a task matches its description.

How do I install Datapages Events in Codex?

Run `npx skills add romshark/datapages --skill datapages-events -a codex`. Or copy the skill folder (internal/generator/agentdocs/data/skills/datapages-events in romshark/datapages) into .agents/skills/datapages-events in your project. Codex loads it when a task matches its description.

Can I use Datapages Events in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add romshark/datapages --skill datapages-events -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/datapages-events, .gemini/skills/datapages-events, .github/skills/datapages-events and .opencode/skills/datapages-events in your project.

What does Datapages Events need to run?

SKILL.md names no scripts, command-line tools or credentials: Datapages Events is instructions for the agent only.

Does Datapages Events access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Datapages Events safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Datapages Events use?

Datapages Events is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Datapages Events use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Datapages Events?

Skills that share tags, products or a category with Datapages Events: Event Types (BuilderIO/agent-native, 7.1k stars), Events (coreyhaines31/marketingskills, 54k stars), Dispatch (sickn33/agentic-awesome-skills, 47k stars) and Rust Path Types (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Datapages Events?

romshark (a GitHub user) maintains it in romshark/datapages, which has 113 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 7, 2026.

Source: romshark/datapages on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.