openlayers-vue3-demo

openlayers-vue3-demo is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 117 tokens per session (5,094 once invoked), scanned A, original, MIT.

A Vue 3 example that displays OpenLayers maps and loads map layers from GeoServer, a server for publishing geographic data. It uses WMS, a standard way to request map images, and a layer tree controlled from the page.

In plain words
What is it for?
Use it to build Vue map pages with WMS layers, a layer switcher, map controls, GeoServer layer groups, and a local Docker setup.
Why use it?
Connecting a web map to GeoServer involves layer loading, authentication, and development-server configuration. This example shows those parts together in a runnable project.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import GeoServerRestApi from '../geoserver/GeoServerRestApi'.

Good fit Use it to build Vue map pages with WMS layers, a layer switcher, map controls, GeoServer layer groups, and a local Docker setup.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills
agentmods
npx agentmods add skills/znlgis/opengis-skills/openlayers-vue3-demo

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 openlayers-vue3-demo

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/openlayers-vue3-demo/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/openlayers-vue3-demo)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/openlayers-vue3-demo"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/openlayers-vue3-demo/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 openlayers-vue3-demo

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/openlayers-vue3-demo"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/openlayers-vue3-demo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,094 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00117 $0.05094
Opus 5.5 $0.00047 $0.02038
Sonnet 5.5 $0.00023 $0.01019
Haiku 4.5 $0.00012 $0.00509

Measured 21d ago against content hash 1d20a01b24a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

openlayers-vue3-demo scanned grade A with 1 finding 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 21d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

const response = await axios.get('/geoserver/rest/layers')
demos/openlayers-vue3-demo/SKILL.md · 341 lines

How it starts

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

项目地址: https://github.com/znlgis/openlayers-vue3-demo

教程: https://znlgis.github.io/demos/vue3-openlayers/

最新版本: 无发布版本(快照工程,package.json 为 0.0.0);依赖 Vue 3.5 / vue3-openlayers 11.2 / Vite 5.4 / axios 1.7(截至 2026-11,取自 package.json)

许可证: LGPL-2.1(仓库根 LICENSE 为 GNU LGPL v2.1,截至 2026-11)

概述

openlayers-vue3-demo 是 B 站直播配套的 OpenLayers + Vue 3 集成演示项目,围绕「一张图 DEMO」实现最小闭环:地图展示 + GeoServer 图层树。与直接调用 ol 内核 API 的写法不同,本项目全程使用 vue3-openlayers 声明式组件,在模板中完成地图装配。应用启动后通过 GeoServer REST API 拉取图层与图层组,动态生成可勾选的图层树并渲染 WMS 瓦片。配套教程覆盖 NVM / Node 环境、Vue 3 基础环境、OpenLayers 概念、Docker 化 GeoServer / PostGIS / Nginx。适合作为学习 vue3-openlayers 组件库与 GeoServer 对接的起点。

核心特性

特性 说明
声明式地图 Map.OlMap / Map.OlView 等组件装配地图,无需手写 Map 实例
动态图层树 从 /rest/layers、/rest/layergroups 拉取,模板 v-for 生成图层组件
WMS 渲染 Sources.OlSourceTileWms 加载 GeoServer WMS(url 统一为 /geoserver/wms)
地图控件 图层切换器、缩放、右键菜单、比例尺(MapControls 系列)
开发代理 Vite /geoserver 代理 + Basic 认证头,规避 CORS 与明文凭据
Docker 环境 postgis + kartoza/geoserver + nginx 三容器可复现环境
一张图定位 地图展示(EPSG:4326 视图)+ 服务管理(教程规划的增删改查)

环境准备 / 快速开始

环境要求

  • Node.js 18+(教程以 20.15.0 为例,可用 nvm-windows 管理;npm config set registry http://registry.npmmirror.com 加速)
  • Docker Desktop(运行 GeoServer / PostGIS / Nginx)
  • 参考教程:https://znlgis.github.io/demos/vue3-openlayers/

创建与安装

# 1. 基于 Vite 模板创建 Vue 3 工程
npm create vite@latest openlayers-vue3-demo -- --template vue
cd openlayers-vue3-demo

# 2. 安装组件库与请求依赖
npm install vue3-openlayers axios base-64

# 3. 启动开发服务器
npm run dev

# 4. 生产构建 / 本地预览
npm run build
npm run preview

Docker 环境(GeoServer + PostGIS + Nginx)

# PostGIS 数据库
docker pull postgis/postgis
docker run -d -p 5432:5432 --name postgis \
  -e POSTGRES_PASSWORD=postgres -e PGDATA=/var/lib/postgresql/data/pgdata \
  -v //d/docker/data/postgis:/var/lib/postgresql/data postgis/postgis

# GeoServer(首次运行加 SAMPLE_DATA=true 导入示例数据;8765:8080 端口映射)
docker pull kartoza/geoserver
docker run -d -p 8765:8080 --name geoserver --link postgis:postgis \
  -e SAMPLE_DATA=true -e GEOSERVER_ADMIN_PASSWORD=geoserver \
  -e GEOSERVER_DATA_DIR=/data/geoserver/data_dir \
  -e GEOWEBCACHE_CACHE_DIR=/data/geoserver/data_dir/gwc \
  -v //d/docker/data/geoserver:/data/geoserver/data_dir \
  -v //d/docker/data/geoserver/gwc:/data/geoserver/data_dir/gwc \
  kartoza/geoserver

# Nginx(8080:80,挂载自定义 nginx.conf)
docker pull nginx
docker run --name nginx -d -p 8080:80 \
  -v //d/docker/data/nginx/nginx.conf:/etc/nginx/nginx.conf:ro nginx

Read the full file on GitHub · 341 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. 21d ago Changed 1d20a01b24a7
  2. 23d ago Changed · -4 lines · +21 tokens per session c36c2f144d13
  3. 1mo ago Changed · +2 lines · +12 tokens per session 262d0f746a91
  4. 1mo ago Changed · +9 lines 9451a156e03e
  5. 1mo ago First seen · 334 lines · 84 tokens per session scan A 96367edf137a

Subscribe to this mod's changes

openlayers-vue3-demo is a skill published in the GitHub repository znlgis/opengis-skills (87 stars, last pushed yesterday), licensed MIT. It adds 117 tokens to every session and 5,094 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-15.

Related

openlayers-vue3-demo compared with skills from other repositories

openlayers-vue3-demo next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
openlayers-vue3-demoznlgis/opengis-skillsSkill87yesterdayMITA117Claude Code, Codex
dev-container-handoffmicrosoft/vscodeSkill196ktodayMITA52Claude Code, Codex
portable-text-serializationvercel/eveSkill6.2ktodayApache-2.0A80Claude Code, Codex
debugging-signals-pipelinePostHog/posthogSkill41ktodaynoneB89Claude Code, Codex
vue-nuxt-expertmartinholovsky/claude-skills-generatorSkill482d agoUnlicenseA0Claude Code, Codex
next-intl-i18ns0vers/next-app-i18n-starterSkill66yesterdayMITA123Claude Code, Codex
mdcms-self-host-setupmdcms-ai/mdcmsSkill224d agoMITA120Claude Code, Codex