datapages-offline

datapages-offline is a skill for Claude Code, Codex from romshark/datapages. It costs 42 tokens per session (2,414 once invoked), scanned A, original, MIT.

A service-worker module for making web pages available during internet outages and loading cached page versions quickly. A service worker is browser code that can cache and serve pages, and this one supports offline snapshots and temporary shims.

In plain words
What is it for?
Use it to add offline routes, cache page snapshots, serve immediate placeholder responses before live pages load, and configure assets and cache versions in a Datapages application.
Why use it?
It gives an application a defined fallback when the browser is offline, while requiring HTTPS or localhost for the browser worker to run. It also documents where cached pages are written and how the cache is configured.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to add offline routes, cache page snapshots, serve immediate placeholder responses before live pages load, and configure assets and cache versions in a Datapages application.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/romshark/datapages/datapages-offline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add romshark/datapages --skill datapages-offline
Clone the repo
git clone --depth 1 https://github.com/romshark/datapages

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for datapages-offline

README.md
[![agentmods](https://agentmods.dev/badge/skills/romshark/datapages/datapages-offline/github.svg)](https://agentmods.dev/skills/romshark/datapages/datapages-offline)
Your own site
<a href="https://agentmods.dev/skills/romshark/datapages/datapages-offline"><img src="https://agentmods.dev/badge/skills/romshark/datapages/datapages-offline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for datapages-offline

Your own site · 80×15
<a href="https://agentmods.dev/skills/romshark/datapages/datapages-offline"><img src="https://agentmods.dev/badge/skills/romshark/datapages/datapages-offline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,414 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.02414
Opus 5.5 $0.00017 $0.00966
Sonnet 5.5 $0.00008 $0.00483
Haiku 4.5 $0.00004 $0.00241

Measured yesterday against content hash fd95cf950685, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

datapages-offline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

example/calculator/.agents/skills/datapages-offline/SKILL.md · 203 lines

How it starts

The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Offline and instant loads

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

modules/offline serves a service worker and adds registration to HTML responses. Handlers write its cache through the pageCache datapages.PageCacheWriter parameter:

  • Snapshots (Set): served only while the browser is offline.
  • Shims (SetShim): served online too, at once, then replaced by the live page.

The worker runs only in a secure context (HTTPS or localhost). Everywhere else the API does nothing.

Configure the module

Declaring PageOffline generates a WithOffline option with that page's route:

// PageOffline is /offline
type PageOffline struct{ App *App }

func (PageOffline) GET(r *http.Request) (body datapages.Component, err error) {
	return pageOffline(), nil
}
opts := []datapages.ServerOption{
	// Self-host Datastar: the CDN is unreachable offline.
	datapages.WithDatastarJS(assets.Path("datastar.js")),
	datapagesgen.WithOffline(app.OfflineConfig()),
}
// OfflineWorkerVersion identifies the installed worker and its cache. Increment
// it after a Datapages upgrade or a change to Assets, ExcludePaths,
// CrossOriginDestinations, OfflineClass, or PageOffline. Changes to Assets or
// PageOffline require a new installation because the worker fetches them only
// during installation.
const OfflineWorkerVersion = 1

func OfflineConfig() offline.Config {
	return offline.Config{
		WorkerVersion: OfflineWorkerVersion,
		// Precache the files required to render cached pages offline.
		Assets: []string{
			assets.Path("style.css"), assets.Path("datastar.js"),
		},
	}
}

For shims without PageOffline, install the module directly:

offline.WithServiceWorker("", offline.Config{WorkerVersion: 1})
offline.Config field default
WorkerVersion 1; increment after a Datapages upgrade or a change to Assets, ExcludePaths, CrossOriginDestinations, OfflineClass, or PageOffline
ScriptURL /service-worker.js; the scope is the whole origin either way
Assets none; files cached during installation
OfflineClass is-offline, toggled on <html> while offline
CrossOriginDestinations image, style, script, font; empty non-nil disables
ExcludePaths none; same-origin prefixes never cached

Read the full file on GitHub · 203 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed fd95cf950685
  2. 4d ago Changed 55f778f44f07
  3. 13d ago Changed · +2 lines e66c3af9ad9e
  4. 20d ago Changed · +2 lines 3e50ed6fd515
  5. 24d ago First seen · 199 lines · 42 tokens per session scan A 09292e5e7f30

Subscribe to this mod's changes

datapages-offline is a skill published in the GitHub repository romshark/datapages (114 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 2,414 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.

Related

Other skills, from other repositories

playwright

Use when the task requires capturing or automating a real browser from the terminal.

openai/openai-agents-python · 19 tokens

pinchtab

Use this skill when a task needs browser automation through PinchTab: open a website, inspect interactive elements, click through flows, fill out forms, scrape page text, reuse a dedicated automation profile with user approval, export screenshots or PDFs, manage multiple browser instances, or fall back to the HTTP API…

pinchtab/pinchtab · 94 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

ketch

Research skill for ketch — a fast stateless CLI for web search, OSS code search, curated library docs, page scraping, and site crawling; an optional MCP server exists for operators who want it, but the CLI is the primary interface. Use when a question needs live sources: 'research X', 'what are people saying about Y'…

1broseidon/ketch · 148 tokens

dashboard-builder

Build self-contained interactive HTML dashboards with charts, filters, and tables. Generates a single browser-openable file — no server or dependencies required.

winstonkoh87/Athena-Public · 31 tokens

crawlberg

Crawl, scrape, and convert websites to Markdown using the local crawlberg CLI and its MCP server. Use when the user wants to fetch a page, follow links across a domain, enumerate URLs, or drive a real browser. Covers installation, the subcommands (scrape, crawl, map, interact, batch-scrape, batch-crawl, download…

xberg-io/crawlberg · 104 tokens