openlayers-vue3-demo

openlayers-vue3-demo is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 84 tokens per session (4,694 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 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,694 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.00084 $0.04694
Opus 5.5 $0.00034 $0.01878
Sonnet 5.5 $0.00017 $0.00939
Haiku 4.5 $0.00008 $0.00469

Measured 3d ago against content hash 9451a156e03e, 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 3d 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 · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 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/

许可证: LGPL-2.1(以仓库为准)

概述

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 · 343 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. 3d ago Changed · +9 lines 9451a156e03e
  2. 4d 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 (65 stars, last pushed 4d ago), licensed MIT. It adds 84 tokens to every session and 4,694 once invoked, about $0.0003 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

Other skills, from other repositories

slidev

Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.

slidevjs/slidev · 51 tokens

debugging-signals-pipeline

Debug the signals pipeline locally end-to-end. Covers emitting test signals from fixtures, monitoring Temporal workflows via the REST API, reading sandbox agent logs from object storage, inspecting Docker sandbox containers, and diagnosing common failures (stale ClickHouse embeddings, agentsh network denials…

PostHog/posthog · 89 tokens

vue-expert

Expert knowledge in Vue.js 3, Composition API, Pinia state management, and Nuxt.js for building modern reactive web applications. Use when the user mentions Vue 3, the Composition API, Pinia, Nuxt, reactive, or frontend, or when the task involves Vue 3 Fundamentals, Composition API, Pinia State Management, or Nuxt.js.

personamanagmentlayer/pcl · 78 tokens

vue

Vue 3 - Progressive JavaScript framework with Composition API, reactivity system, single-file components, Vite integration, TypeScript support.

bobmatnyc/claude-mpm-skills · 29 tokens

nuxt-docs

Nuxt 4.x — full-stack Vue.js framework. File-based routing, auto-imports, SSR, Nitro, layers, modules.

pledgeandgrow/pledge-skills · 33 tokens

api-first

Maintain the OpenAPI contract in docs, regenerate TypeScript types into src/generated/api, and wire client/server imports without hand-editing generated files.

bishopZ/2026-Boilerplate · 32 tokens