Agent skill

Datapages Server

by romshark in romshark/datapages

Configure the Datapages server entry point: NewServer type arguments, the message broker, server options, static assets, TLS and Prometheus metrics.

MITAuto-check passedDevOps & Cloud

Install Datapages Server

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

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

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

At a glance

Configure the Datapages server entry point: NewServer type arguments, the message broker, server options, static assets, TLS and Prometheus metrics.

  • Tasks that involve Event-driven systems
  • SKILL.md covers NewServer, Broker, Options and Static assets, plus 1 more section
  • Calls make
  • Tasks that involve Monitoring and alerting

What it does

Datapages Server is an agent skill from romshark/datapages. Configure the Datapages server entry point: NewServer type arguments, the message broker, server options, static assets, TLS and Prometheus metrics.

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

It sits in DevOps & Cloud, covering Event-driven systems and Monitoring and alerting. It works with Prometheus. The repository describes itself as: A Datastar Go web frontend framework. The licence is MIT.

When your agent uses it

  • Tasks that involve Event-driven systems
  • Tasks that involve Monitoring and alerting

Example prompts

  • “/datapages-server”

Requirements

  • Docker

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 Server loads about 2.2k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 1,042 words of instructions outside code blocks.

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

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,042 words, ~2,239 tokens.

Download SKILL.mdSave it as .claude/skills/datapages-server/SKILL.md (or your agent's skills folder).
name
datapages-server
description
Configure the Datapages server entry point: NewServer type arguments, the message broker, server options, static assets, TLS and Prometheus metrics.

Server entry point

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

On its first run, datapages gen writes the server command's main.go. It does not regenerate that file on later runs.

NewServer

datapages gen reads the type arguments to find the app package and output directory.

go
s, err := datapages.NewServer[
	app.App,                     // App
	app.SessionData,             // or datapages.DisableSessions
	datapages.DisablePrometheus, // or datapages.EnablePrometheus
	datapagesgen.Server,         // the datapagesgen of that app package
](&a, broker, opts...) // the app is passed by pointer

Keep the call inside the module. Import datapages with a package name because the scanner rejects dot imports. Generated code is always in datapagesgen directly below its app package. One module can contain several apps. Run one with datapages watch --app frontend.

datapages.EnablePrometheus requires WithPrometheus, DisablePrometheus rejects it.

Broker

A broker is always required. It sends events between server instances and to SSE subscribers. Use modules/messaging/natscore for multiple instances. Use modules/messaging/inmem only for one instance. The generated server uses NATS. Start it with make up before starting the server.

Options

go
var opts []datapages.ServerOption
opts = append(opts,
	datapages.WithLogger(slog.Default()),
	datapages.WithMiddleware(mw),
	datapages.WithSessions(datapages.SessionsConfig{}),
	datapages.WithSessionManager[app.SessionData](mgr),
	datapages.WithAssets(app.StaticFS, false),
	datapages.WithHTTPServer(&http.Server{ReadHeaderTimeout: 10 * time.Second}),
	datapages.WithDatastarJS("https://cdn.example.com/datastar.js"),
	datapages.WithShutdownTimeout(30*time.Second),
	datapages.WithAssetsCache(datapages.AssetsCacheConfig{}),
	datapages.WithBodySizeLimit(1<<20),
	datapages.WithLogSampling(datapages.LogSamplingConfig{Interval: time.Minute}),
	datapages.WithPrometheus(datapages.PrometheusConfig{Host: ":9091"}),
)

WithBodySizeLimit limits the request body of an action that declares Signals. The default is 1 MiB. An over-limit request returns 400 while reading signals. A handler that reads r.Body itself gets no limit: wrap the body in http.MaxBytesReader. WithLogSampling limits repeated framework warnings, not application logs. WithHTTPServer uses every supplied field except Addr and Handler. Keep WriteTimeout at zero because a nonzero value ends long-lived SSE streams.

WithPrometheus starts a second HTTP server that serves /metrics on the configured host. WithShutdownTimeout limits how long ListenAndServe waits after context cancellation for requests, SSE streams and StreamClose hooks. When the timeout expires, Datapages logs the shutdown error and returns. Cancel the context on SIGTERM as well as SIGINT with signal.NotifyContext(ctx, os.Interrupt, syscall.SIGTERM). Docker, Kubernetes and systemd stop a process with SIGTERM, which otherwise ends it without a graceful shutdown.

Deployments need no application code. Each page sends its build ID with Datastar requests. A server with a different ID returns 205 Reset Content without running the handler. The page then reloads. Shutdown resets open SSE streams. Datastar then reconnects to the next process. The ID defaults to a hash of the executable. Set WithBuildID when replicas use different binaries for one release. During a rolling deployment, route each client to one build.

The session cookie uses the Secure attribute. Set DisableSecureCookie only when the complete deployment uses plain HTTP, where the browser would reject the secure cookie. datapages.IsDevMode() reports whether the dev server is active. DATAPAGES_DEV_MODE and TEMPL_DEV_MODE enable development behavior. Log at slog.LevelDebug when you need to inspect that behavior.

Declaring PageOffline generates datapagesgen.WithOffline(offline.Config{...}). The option serves the service worker. See datapages-offline.

If WithMiddleware adds a Content-Security-Policy, it must allow script-src 'unsafe-inline' 'unsafe-eval'. Datapages writes the build script, the CSRF script and the instance ID script inline. Datastar compiles every data-* expression at run time.

WithCSPNonce(func(r *http.Request) string) replaces both allowances with a nonce. The application mints the nonce and puts it in its own policy header. Datapages reads it back, writes it on the html element as data-nonce and on every script it writes. Mint the nonce in middleware and store it in the request context: Datapages calls the function several times per response and every call with the same request must return the same value. data-nonce turns on Datastar's CSP mode, which compiles expressions through a nonced script element instead of Function. It needs Datastar 1.0.3 or later. The nonce must differ per response.

WithOffline passes the nonce to the offline module regardless of option order. The nonce cannot reach a page served from the service worker's cache; see datapages-offline.

go
s.ListenAndServe(ctx, "localhost:8080")
s.ListenAndServeTLS(ctx, "localhost:8443", certPath, keyPath)
Show full SKILL.md (471 more words)Show less

Static assets

An embed.FS in the app package enables file serving. Its doc comment defines the URL prefix. Its directive defines the source directory.

go
// StaticFS is /static/
//go:embed static/*
var StaticFS embed.FS

Declare at most one such variable in an app package. The URL prefix must start and end with / and must not be /. It may contain only ASCII letters, digits, -, ., _, ~ and /: the server matches it against the decoded request path, which a percent-encoded prefix never matches. The directive must name exactly one directory inside the app package.

datapages.WithAssets(app.StaticFS, false) supplies the filesystem and the directory-browsing setting. Generated code supplies the URL prefix, source directory and development disk path. In development mode, Datapages reads files from disk and disables caching. Asset changes then need no rebuild. The server rejects WithAssets when the app declares no assets.

WithAssetsFS accepts an http.FileSystem and overrides WithAssets. Datapages uses that filesystem as-is: it does not extract the declared source directory or replace it in development mode. The app's declared URL prefix still determines where files are served. Without an asset declaration, the option is accepted but no asset route is registered.

Without WithAssetsCache, Datapages sends neither Cache-Control nor ETag for assets. A zero AssetsCacheConfig sends Cache-Control: public, max-age=0 and an ETag. The browser revalidates every request. An unchanged file returns 304 with an empty body.

Set MaxAge only when an asset URL changes with its content, such as when the file name contains a build hash. Otherwise a browser can use stale content until the age expires. Immutable prevents reloads from revalidating a fresh response and requires a positive MaxAge. CacheControl sets the header directly and cannot be combined with MaxAge or Immutable. DisableETag omits the ETag. Disabled omits both headers.

The server computes an ETag on a file's first request and keeps it until the process exits. This is correct for the immutable embed.FS used by WithAssets. Set DisableETag for a WithAssetsFS file system whose files can change while the server runs. Development mode ignores this option and always sends Cache-Control: no-store.

Use assets.Path("style.css") from the generated assets package to reference a file. Use href.Asset("style.css") inside an <a href>. The linter checks app-internal URLs in <a href> and Datastar action attributes. It does not check asset URLs in <link> or <script> elements.

datapages.yaml

cmd names the command to create when there is no NewServer call. It defaults to cmd/server. watch configures datapages watch:

key under watchuse
app-host, proxy-timeout, debouncedev server URL and timing
format, lintformat or lint during rebuilds
exclude, watcher-ignorepaths excluded from source scanning or file watching
flags, dir-workcommand flags and working directory
log.level, log.clear-on, log.print-js-debug-logswatcher output
tls.cert, tls.keycertificate and key for dev-server TLS
compiler.tags, compiler.envGo build tags and environment; compiler also accepts Go compiler flags
custom-watchersextra watchers with include/exclude patterns, command and rebuild action

See datapages watch --help for CLI flags.

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

Open the folder on GitHubat commit 87d5a44

Compare with similar skills

Datapages Server 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 Server compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Datapages Server this skillromshark/datapages113—~2.2kAutomated safety check: PassMIT
KubeEye Cluster Inspectionkubesphere/kubesphere17k—~3.6kAutomated safety check: PassCustom licence
Happy Infra Metrics and Grafanaslopus/happy24k—~2kAutomated safety check: NotesMIT
Syncmetapawurb/hotpath-rs1.9k—~1.2kAutomated safety check: NotesMIT
WizTelemetry Platform Servicekubesphere/kubesphere17k—~1.8kAutomated safety check: PassCustom licence
Collectors Prometheus Profilesnetdata/netdata81k—~4.7kAutomated safety check: PassGPL-3.0

Similar skills

  • KubeEye Cluster Inspection

    kubesphere/kubesphere

    Deploys KubeEye on KubeSphere and writes InspectRule and InspectPlan resources to inspect cluster health, then retrieves the inspection reports.

    17k GitHub stars~3.6k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Queries live Prometheus metrics and manages Grafana dashboards as code for Happy's infrastructure, using the grafanactl CLI and the Grafana datasource proxy API.

    24k GitHub stars~2k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Syncmeta

    pawurb/hotpath-rs

    Sync changes from the hotpath, hotpath-macros and hotpath-drain crates to their meta counterparts (hotpath-meta, hotpath-macros-meta and hotpath-drain-meta).

    1.9k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • WizTelemetry Platform Service

    kubesphere/kubesphere

    Installs and configures the WizTelemetry Platform Service extension for KubeSphere, the shared API server behind its observability extensions.

    17k GitHub stars~1.8k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Create, review or validate Netdata Prometheus chart profiles, exporter dashboard design, collection policy and stock semantic proofs.

    81k GitHub stars~4.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Optimize AlpaSim Slurm topology throughput using persistent local Prometheus/Grafana telemetry and run artifacts.

    1.3k GitHub stars~1.6k tokensUpdated 20 days ago
    DevOps & CloudAuto-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 today
    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 today
    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 today
    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 today
    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 today
    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 today
    Auto-check passed

Works with

Categories

Questions about Datapages Server

What does Datapages Server do?

Configure the Datapages server entry point: NewServer type arguments, the message broker, server options, static assets, TLS and Prometheus metrics. Datapages Server is an agent skill from romshark/datapages. Configure the Datapages server entry point: NewServer type arguments, the message broker, server options, static assets, TLS and Prometheus metrics.

When should I use Datapages Server?

Datapages Server fits situations like: tasks that involve Event-driven systems; tasks that involve Monitoring and alerting.

How do I install Datapages Server in Claude Code?

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

How do I install Datapages Server in Codex?

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

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

What does Datapages Server need to run?

Going by SKILL.md and its folder, Datapages Server needs the command-line tools its instructions call (make). Our summary lists: Docker.

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

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

About 2.2k tokens (SKILL.md is roughly 9k 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 Server?

Skills that share tags, products or a category with Datapages Server: KubeEye Cluster Inspection (kubesphere/kubesphere, 17k stars), Happy Infra Metrics and Grafana (slopus/happy, 24k stars), Syncmeta (pawurb/hotpath-rs, 1.9k stars) and WizTelemetry Platform Service (kubesphere/kubesphere, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Datapages Server?

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.