Agent skill

Datapages Architecture

by romshark in romshark/datapages

Plan a Datapages app or feature: choose where to store values, how to update the browser, where to define handlers, how to scope event subjects and how many server processes to run.

MITAuto-check passed

Install Datapages Architecture

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

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

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

At a glance

Plan a Datapages app or feature: choose where to store values, how to update the browser, where to define handlers, how to scope event subjects and how many server processes to run.

  • SKILL.md covers New app, Before implementation, Default architecture and Where to store a value, plus 7 more sections
  • Calls make

What it does

Datapages Architecture is an agent skill from romshark/datapages. Plan a Datapages app or feature: choose where to store values, how to update the browser, where to define handlers, how to scope event subjects and how many server processes to run. Use before other Datapages skills when these choices are not set.

Its SKILL.md is about 2.6k 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-architecture”

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

    Shell commands in SKILL.md call:

    • make

    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 Architecture loads about 2.6k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 1,436 words of instructions outside code blocks.

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

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). 1,436 words, ~2,633 tokens.

Download SKILL.mdSave it as .claude/skills/datapages-architecture/SKILL.md (or your agent's skills folder).
name
datapages-architecture
description
Plan a Datapages app or feature: choose where to store values, how to update the browser, where to define handlers, how to scope event subjects and how many server processes to run. Use before other Datapages skills when these choices are not set.

Architecture

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

Use this skill to choose the Datapages constructs a feature needs. Ask the operator when a missing requirement would change that choice. Then read the referenced skill before implementing the selected construct.

Keep authoritative state on the server, separate reads from commands and send complete page updates instead of small DOM patches.

New app

sh
datapages init  # go.mod, app/app.go, cmd/server/main.go, compose.yaml, Makefile, CI
make up         # start the broker
make dev        # datapages watch

init creates PageIndex, PageError404, PageError500, Head and RecoverError. It writes only missing files and deletes nothing. You can run it again without overwriting existing files.

Before the first page, decide:

questiondecides
Are users authenticated?Session data type and the Session alias shared by all handlers. See datapages-sessions.
What does a handler need besides the request?App fields. A page has no named dependency fields, only App *App.
Can data change without the reader acting?Whether events are needed. See datapages-events.
Will one or multiple server processes run?Broker, session store and data placement. See Server topology.

Add sessions, state and events when a feature needs them, not upfront.

Before implementation

Do not guess requirements that change the application model. Ask the operator when they are unclear.

unknowndetermines
Authentication or per-user dataWhether data belongs in a session. See datapages-sessions.
PersistenceWhat must survive a process restart and where it is stored.
External changesWhether data can change without the current tab acting and needs events. See datapages-events.
Per-tab server stateWhether a handler without a request needs tab-local values.
URL stateWhether a value must be shareable or survive reload.
Server topologyWhether one or multiple server processes will run. See Server topology.
Shared routesWhether a handler belongs to a page, *App or an embedded shared type.

Do not ask when the requirement is already explicit in the task or existing code.

Use the smallest model that satisfies the requirements. Add sessions, events, State[T], persistence or shared handlers only when a current requirement needs them.

Default architecture

For server-backed interactive or real-time data, prefer Datastar's CQRS model:

  • the server stores authoritative state;
  • separate reads from commands;
  • long-lived SSE handlers provide reads;
  • short-lived actions are commands;
  • commands mutate authoritative state and notify subscribers;
  • On handlers react to events and render from authoritative state;
  • prefer complete page updates over small DOM patches;
  • keep plain GET rendering correct.

A command should normally mutate state and dispatch an event. The event says that something changed; it is not the authoritative state. Subscribers read the current state, render the page and send the result over SSE.

Render one template for each page and let Datastar update the changed DOM. Split templates into smaller components when useful. Do not add small DOM patches only to reduce transferred HTML. SSE streams use Brotli compression.

Each stream update must contain enough current state to restore the UI after a missed event or interrupted connection. Send complete current state when a missed incremental update would make the client incorrect.

Handle local interactions on the client. Examples include opening a menu, changing a class and validating a local field.

Where to store a value

Give each value one owner:

valueownerconstraint
Shared by all users and outlives a requestApp field behind a repositoryOne App serves all requests in one process. Guard its fields. For multiple servers, see Server topology.
One user across tabs and restartsSession data and its storeEvery handler uses the same data type.
One browser tabdatapages.State[T]Reconnect starts zeroed. StreamOpen rebuilds it.
Shareable URL state that survives reloadQuery field with reflectsignalSeeds the signal on load and rewrites the URL on change.
Interaction-only state such as draft text or an open menuDatastar signalThe server sees it when an action sends it.
Derived valueNowhereCompute it. Storing the same fact twice can create inconsistent values.

An On handler receives no request or signals. Put what it needs on the event or in State[T].

For example, copy a user-selected filter into State[T] in StreamOpen or in the action that changes it. The event handler can then render from that state.

state.Values is valid only while the handler runs. Never retain its pointer, store it in App or use it from a goroutine. Copy the required values.

How to update the browser

changeuse
Client-only interaction: class, menu, field validationDatastar attributes and signals. No request.
Server decides, only the acting tab needs the resultTake datapages.SSE in the action and patch.
Authoritative state changed and open pages must updateCommand mutates state and dispatches an event; On handlers read current state and render it.
Navigate to another pagehref, or datapages.Redirect from the action.

The acting tab also receives subscribed events. A command that dispatches an event rarely needs SSE. Using both usually sends the same state twice.

For server-rendered updates, render a complete DOM tree from current state. Avoid coordinating many small patches or client-side signal updates.

Shrink morph targets only for a measured reason. A complete HTML fragment is often simpler because Datastar preserves unchanged DOM while morphing the received tree.

Events are notifications, not durable state. Delivery is at most once and has no replay. A hidden tab, interrupted stream or full buffer can miss an event. Later renders must use authoritative state. They must not depend on every earlier event.

Every page must also render correctly from a plain GET.

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

Who owns the handler

routeowner
Serves one pageThat page type, value receiver.
Called from several pages*App. An action has one absolute route, so embedding it twice conflicts.
Shared GET, On or stream hookA non-Page type with App *App, embedded in each page.

Keep an app action stateless unless every calling page uses the same State[T] type. A state type mismatch returns 409.

If pages render changed data differently, make the shared action dispatch an event. Each page's On handler reads current state and renders its own page.

Event subject scope

receiverssubject
Everyone on the pageNo subject fields.
One authenticated user across tabsdatapages.SubjectUser field.
One browser tabdatapages.SubjectStateID field populated from stateID.
Watchers of one room or documentdatapages.Subject field with a signal tag.

One dispatch targets one subject. To target several users, dispatch once per user. Each dispatch can fail independently.

An event with subject fields claims every subject below its base subject. Define the subject namespace before splitting an event into several types.

Use notification events when subscribers can read authoritative state. Put data on the event only when the On handler cannot read it from a repository or State[T].

An empty event is enough when every subscriber re-reads the repository.

Multiple applications

One Go module may contain several Datapages applications. Each application has its own app package, datapagesgen package and entry point.

Applications that use the same broker share one event namespace. They must not claim the same subject. For events shared across apps, declare the event type once in a shared package. Use that type in each application.

Use:

sh
datapages watch --app <name>

when the module contains multiple applications.

Server topology

Determine whether the app will use one server process or several before you select infrastructure or store shared data.

componentsingle servermultiple servers
Brokermodules/messaging/inmemmodules/messaging/natscore
Session storemodules/sessions/natskv, or inmem in developmentmodules/sessions/natskv
State[T]In memoryOne process per tab. Route its stream and actions by Datapages-Instance.
Data in App fieldsMay stay in memoryMove it to a datastore, or each process serves its own copy.

The application model otherwise stays the same.

modules/sessions/inmem loses every session on restart and signs every user out. Do not use it in production, including on a single server. modules/messaging/inmem sends events only within one process. A restart loses only events in flight, which is consistent with at-most-once delivery.

After changing the application model

Return to datapages for the build and validation loop.

Run:

sh
datapages gen

gen validates the model and writes generated code. datapages lint performs the same validation without writing files. Use it in CI and editors.

CLI errors identify invalid application declarations. Fix those declarations. Never edit datapagesgen directly.

Defaults

Use the construct with the fewest parts.

For server-backed interactive or real-time state, use this default:

command -> mutate authoritative state -> dispatch event -> subscriber reads current state -> complete morph

A complete morph sends a DOM tree derived from current state, potentially the whole page, instead of coordinating fine-grained updates.

Deviate when the requirements make a simpler or different model more suitable.

A page that re-reads data on navigation is correct before events exist. Add events only when changes must reach already open pages. Add State[T] only when a handler without a request needs a per-tab value.

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

Open the folder on GitHubat commit 87d5a44

Compare with similar skills

Datapages Architecture 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 Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Datapages Architecture this skillromshark/datapages113—~2.6kAutomated safety check: PassMIT
Agent App Storeruvnet/ruflo74k2 repos~1kAutomated safety check: PassMIT
App Store Optimizationalirezarezvani/claude-skills28k1 repos~4.2kAutomated safety check: PassMIT
Eas App Storessickn33/agentic-awesome-skills47k1 repos~1.9kAutomated safety check: PassMIT
App Store Changelogsickn33/agentic-awesome-skills47k2 repos~831Automated safety check: PassMIT
Microsoft Store Publishergithub/awesome-copilot40k—~3.8kAutomated safety check: PassMIT

Similar skills

  • Agent App Store

    ruvnet/ruflo

    Agent skill for app-store - invoke with $agent-app-store. An agent skill from ruvnet/ruflo.

    74k GitHub starsUsed in 2 repos~1k tokens
    MobileAuto-check passed
  • App Store Optimization

    alirezarezvani/claude-skills

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Marketing & SEOAuto-check passed
  • Eas App Stores

    sickn33/agentic-awesome-skills

    Curated upstream guidance for Eas App Stores; use when the workflow matches the user goal.

    47k GitHub starsUsed in 1 repo~1.9k tokens
    MobileAuto-check passed
  • App Store Changelog

    sickn33/agentic-awesome-skills

    Generate user-facing App Store release notes from git history since the last tag.

    47k GitHub starsUsed in 2 repos~831 tokens
    DevelopmentAuto-check passed
  • Microsoft Store Publisher

    github/awesome-copilot

    Official

    Takes a Windows desktop app through MSIX packaging, WACK validation and a Partner Center submission with the Microsoft Store, with strict confirmation safeguards for risky steps.

    40k GitHub stars~3.8k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Skills Store

    PostHog/posthog

    Official

    Discover and use shared team skills stored in PostHog. An agent skill from PostHog/posthog.

    40k GitHub stars~3.1k 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 2 days ago
    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 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

Questions about Datapages Architecture

What does Datapages Architecture do?

Plan a Datapages app or feature: choose where to store values, how to update the browser, where to define handlers, how to scope event subjects and how many server processes to run. Datapages Architecture is an agent skill from romshark/datapages. Plan a Datapages app or feature: choose where to store values, how to update the browser, where to define handlers, how to scope event subjects and how many server processes to run.

How do I install Datapages Architecture in Claude Code?

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

How do I install Datapages Architecture in Codex?

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

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

What does Datapages Architecture need to run?

Going by SKILL.md and its folder, Datapages Architecture needs the command-line tools its instructions call (make).

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

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

About 2.6k tokens (SKILL.md is roughly 11k 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 Architecture?

Skills that share tags, products or a category with Datapages Architecture: Agent App Store (ruvnet/ruflo, 74k stars), App Store Optimization (alirezarezvani/claude-skills, 28k stars), Eas App Stores (sickn33/agentic-awesome-skills, 47k stars) and App Store Changelog (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Datapages Architecture?

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.