Agent skill

Datapages Actions

by romshark in 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.

MITAuto-check passed

Install Datapages Actions

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

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

GitHub CLI
$ gh skill install romshark/datapages datapages-actions --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-actions .claude/skills/datapages-actions && 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-actions
GitHub stars
113
Token cost
~1.5k tokens
SKILL.md length
700 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

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

  • SKILL.md covers Parameters, Return values, SSE and Errors, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Datapages Actions is an agent skill from 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.

Its SKILL.md is about 1.5k 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

  • “/datapages-actions”

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 Actions loads about 1.5k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 700 words of instructions outside code blocks.

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

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). 700 words, ~1,514 tokens.

Download SKILL.mdSave it as .claude/skills/datapages-actions/SKILL.md (or your agent's skills folder).
name
datapages-actions
description
Write Datapages action handlers (POST, PUT, PATCH, DELETE, QUERY): parameters, return values, Datastar signals, SSE patching, HTTP error status codes and the RecoverError hook.

Actions

Read datapages first for the build loop, hard rules and naming conventions.

Define a page action as a value-receiver method on its page type. Define an action not tied to a page as a method on *App. Give each action one route doc comment. A page action route must be below its page route. For example, /login/submit is valid for PageLogin at /login. An action route cannot end in a {name...} wildcard. Pass that value in a query parameter or a signal.

go
// POSTSubmit is /login/submit
func (PageLogin) POSTSubmit(r *http.Request) error { return nil }

// POSTSignOut is /sign-out/{$}
func (*App) POSTSignOut(r *http.Request) error { return nil }

Use a QUERYXXX action for a read that sends data in the body, such as a search with a large filter. It skips the CSRF check because QUERY is a safe method. Never change state in it.

Parameters

Parameters may appear in any order because the generator matches them by type. Names are unrestricted except for stateID. Read wrapped values from .Values.

typewhat
*http.Requestrequired
datapages.SSEpatches the stream of the calling page; page actions only, not *App actions
Sessionthe current session, see datapages-sessions
datapages.Path[struct{...}]route variables, path:"id" tags
datapages.Query[struct{...}]query parameters, query:"p" tags
datapages.Signals[struct{...}]signals sent by the client, json:"v" tags
datapages.State[StateX]per-tab server state, see datapages-state
stateID stringtab event address; requires State[T], see datapages-state
datapages.PageCacheWriterwrites the offline page cache, see datapages-offline
datapages.Dispatcher[EventX]publishes EventX, see datapages-events

The name in a Signals field's json tag must match [A-Za-z_][A-Za-z0-9_]* and must not contain __. json:"-" is invalid. Omit a field to exclude it. Nested structs define signal paths.

Return values

Returning only error is valid. Other supported return types are datapages.Component, datapages.Head, datapages.Redirect, datapages.NewSession[Data] and datapages.CloseSession. Return values may appear in any order.

go
) (redirect datapages.Redirect, err error) {
	return datapages.Redirect{URL: href.PageIndex()}, nil
}

Redirect.Status defaults to 302. Datastar requests ignore it because they cannot follow an HTTP redirect. They navigate by assigning window.location.

Do not combine datapages.SSE with session changes. An sse parameter causes the response headers to be sent before the handler runs, so the handler cannot set or delete the session cookie. The generator rejects newSession or closeSession with sse. A redirect still works because it uses the stream. A returned datapages.Component is rejected with sse too: send it with sse.PatchElement instead.

SSE

methodeffect
Context()context of the SSE stream
PatchElement(c)morph by element id
PatchElementAt(c, sel, mode)target a selector; datapages.PatchModeInner, ...Replace, ...Prepend, ...Append, ...Before, ...After
RemoveElement(sel)remove matching elements
PatchSignals(v)set client signals from JSON
PatchSignalsIfMissing(v)set only signals that do not exist
ExecuteScript(js)run JS in the browser
Redirect(url)client-side navigation
Prefetch(urls...)speculation rules hint

A selector must not contain a line break. Prefer one complete fragment over several small targeted patches. ...Prepend and ...Append cannot recover missed events. See the delivery rules in datapages-events.

Show full SKILL.md (263 more words)Show less

Errors

go
return datapages.ErrBadRequest                            // 400
return datapages.ErrForbidden                             // 403
return datapages.ErrNotFound                              // 404
return datapages.ErrConflict                              // 409
return fmt.Errorf("%w: %w", datapages.ErrNotFound, err)   // 404, keeps err

Any other error returns 500. The response body is the standard status text. A page load gets PageError404 for 404 and PageError500 for 500 instead when the app defines them. A Datastar request gets status 200 when the app defines RecoverError, and a handler with sse sends 200 before it runs. Wrap at most one sentinel. If an error contains several sentinels, the first of ErrBadRequest, ErrForbidden, ErrNotFound and ErrConflict sets the status.

RecoverError

A Datastar request shows an HTTP error only in the console. Define this hook to patch an error message into the page.

go
func (*App) RecoverError(err error, sse datapages.SSE) error {
	return sse.PatchElement(errorToast(err))
}

Only Datastar requests call this hook. It receives every handler error, including sentinels. Use errors.Is to identify sentinels. The response has status 200 whatever the error. For a page load, Datapages renders PageError404 for a 404 and PageError500 for a 500 if the app defines them. Otherwise it writes the status and its standard text if the response has not started. The hook writes an event stream, so do not use it as a page response.

A panic in a GET, action, StreamOpen or On handler becomes a datapages.PanicError. It contains the panic value and stack. Use errors.As to inspect it. Datapages logs the stack before it calls the hook, then ends the request.

StreamClose runs after the response completes. Datapages logs its panics but does not call the hook. If the hook returns an error, Datapages logs that error with the original one and does not change the response. Writing an HTTP error at that point would append plain text to the open SSE stream.

© 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-actions of romshark/datapages.

Open the folder on GitHubat commit 87d5a44

Compare with similar skills

Datapages Actions 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 Actions compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Datapages Actions this skillromshark/datapages113—~1.5kAutomated safety check: PassMIT
ActionsJetBrains/intellij-community21k—~341Automated safety check: PassCustom licence
Twenty Entity Runner Actionstwentyhq/twenty58k—~3.1kAutomated safety check: PassCustom licence
Laravel Actionscoollabsio/coolify63k—~2.4kAutomated safety check: PassApache-2.0
ActionsBuilderIO/agent-native7.1k—~4.4kAutomated safety check: PassNone
GitHub Actionssickn33/agentic-awesome-skills47k1 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Actions

    JetBrains/intellij-community

    Official

    Implement or change IntelliJ AnAction actions and registrations.

    21k GitHub stars~341 tokensUpdated today
    MobileAuto-check passed
  • Step four of adding a syncable entity in the Twenty server: write create, update and delete action handlers that run workspace migrations against the database.

    58k GitHub stars~3.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Laravel Actions

    coollabsio/coolify

    Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions.

    63k GitHub stars~2.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • Actions

    BuilderIO/agent-native

    How to create and run agent actions. An agent skill from BuilderIO/agent-native.

    7.1k GitHub stars~4.4k tokensUpdated today
    Backend & APIsAuto-check passed
  • GitHub Actions

    sickn33/agentic-awesome-skills

    Build, test, and deploy applications using GitHub Actions workflows.

    47k GitHub starsUsed in 1 repo~1.9k tokens
    DevOps & CloudAuto-check passed
  • Cmdk Actions

    getsentry/sentry

    Official

    Guide for adding new actions to Sentry's Command+K palette. An agent skill from getsentry/sentry.

    46k GitHub stars~6.3k tokensUpdated today
    Auto-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 yesterday
    Auto-check passed
  • Datapages Events

    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.

    113 GitHub stars~1.4k tokensUpdated yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    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 yesterday
    Auto-check passed

Questions about Datapages Actions

What does Datapages Actions do?

Write Datapages action handlers (POST, PUT, PATCH, DELETE, QUERY): parameters, return values, Datastar signals, SSE patching, HTTP error status codes and the RecoverError hook. Datapages Actions is an agent skill from 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.

How do I install Datapages Actions in Claude Code?

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

How do I install Datapages Actions in Codex?

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

Can I use Datapages Actions 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-actions -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-actions, .gemini/skills/datapages-actions, .github/skills/datapages-actions and .opencode/skills/datapages-actions in your project.

What does Datapages Actions need to run?

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

Does Datapages Actions 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 Actions 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 Actions use?

Datapages Actions 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 Actions use?

About 1.5k tokens (SKILL.md is roughly 6.1k 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 Actions?

Skills that share tags, products or a category with Datapages Actions: Actions (JetBrains/intellij-community, 21k stars), Twenty Entity Runner Actions (twentyhq/twenty, 58k stars), Laravel Actions (coollabsio/coolify, 63k stars) and Actions (BuilderIO/agent-native, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Datapages Actions?

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.