← 返回列表
全部 Skill›工具 Tools›add-data-source

add-data-source

作者 @koala73 · 语言 en
Add a new WorldMonitor data source or map layer end to end — Railway seeder, Redis seed-meta and health registration, RPC, service, layer toggle, source attribution, and docs. Use when integrating a new API or dataset, adding a seed-*.mjs worker, or adding a map layer.
工具 Tools域名与 DNS 工具通用待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
91,144
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Add a data source

Source: CONTRIBUTING.md#adding-data-sources. Health contracts: docs/health-endpoints.mdx.

Requirements

  • Freely accessible (no paid-only API for core functionality), permissive license or public government data, updates at least daily, geo-locatable.

Steps

  1. Seeder (if the data is cached): a scripts/seed-*.mjs built on runSeed(domain, resource, canonicalKey, fetchFn, opts) from scripts/_seed-utils.mjs. Set ttlSeconds to at least 3x the cron interval. Load credentials with loadEnvFile() only. The seed must write seed-meta:<key>. Send a User-Agent. Follow a neighbouring seeder's Railway registration in scripts/railway-services.json.
  2. Health: register the key in api/health.js (BOOTSTRAP_KEYS, STANDALONE_KEYS, SEED_META, or ON_DEMAND_KEYS). Datasets with no dashboard consumer are standalone health keys.
  3. Shared startup data goes through api/bootstrap.js; opt-in panels stay on the on-demand path.
  4. RPC: follow the add-rpc-endpoint skill (proto, make generate, handler in server/worldmonitor/{domain}/v1/, gateway, vite.config.ts). Non-JSON payloads (XML, binary, HTML embeds) may use a standalone Edge function listed in api/api-route-exceptions.json.
  5. Service module in src/services/{domain}/ wrapping the generated client.
  6. Layer config and renderer following existing layer patterns; make it toggleable in the layer UI. Panels register in src/config/panels.ts and src/app/panel-layout.ts.
  7. Every new outbound host in scripts/, server/, api/, or src/ needs a row in shared/source-attribution-manifest.json: npm run sources:check, then npm run sources:generate. Add a manifest row only together with the code that introduces its host; after a rebase that touches attribution, re-run sources:generate instead of hand-merging.
  8. Document the source in the data sources docs (docs/data-sources.mdx).

Verify

  • Producer and reader checks with fixtures (no live network in tests). Record live freshness separately when it matters.
  • npm run typecheck, npm run typecheck:api, npm run lint:boundaries, npm run test:related, npm run generate if derived files changed.
  • Browser behavior: the verify-worldmonitor skill.
评论
Kkoala73
koala73
koala73/worldmonitor
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@koala73
所属大类工具 Tools / 域名与 DNS 工具
国内可用性通用
最近源活动—
风险提示无
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。