openlayers

openlayers is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 49 tokens per session (2,201 once invoked), scanned A, original, MIT.

A JavaScript library for adding interactive two-dimensional maps to web pages. It can display map layers and geographic data, and lets users draw, select, modify, and style map features.

In plain words
What is it for?
Use it to build web maps with tile or map-service layers, GeoJSON and vector tiles, custom styles, popups, drawing tools, and feature selection.
Why use it?
It removes much of the browser-side work needed to connect map data to controls, projections, layers, and user interactions.

Skill for Claude CodeCodex

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

Good fit Use it to build web maps with tile or map-service layers, GeoJSON and vector tiles, custom styles, popups, drawing tools, and feature selection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/openlayers
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 znlgis/opengis-skills --skill openlayers
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/openlayers"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/openlayers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,201 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00049 $0.02201
Opus 5 $0.00024 $0.01100
Sonnet 5 $0.00010 $0.00440
Haiku 4.5 $0.00005 $0.00220

Measured 2d ago against content hash dacf5c23d62b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

openlayers 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 2d 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.

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.

gis/openlayers/SKILL.md · 278 lines

How it starts

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

项目地址: https://github.com/openlayers/openlayers

官方文档: https://openlayers.org/doc/

API 参考: https://openlayers.org/en/latest/apidoc/

示例: https://openlayers.org/en/latest/examples/

许可证: BSD-2-Clause

概述

OpenLayers(OL)特性:

  • 多源底图:OSM、Bing、XYZ、WMS、WMTS、ArcGIS REST
  • 矢量数据:GeoJSON、KML、GPX、TopoJSON、GML、MVT
  • 投影:内置 EPSG:3857/4326,与 proj4 集成支持任意投影
  • 矢量瓦片(MVT)原生支持
  • 强大的样式与交互(Draw/Modify/Select/Snap)
  • WebGL 渲染(点云、海量点)

安装

npm install ol
import 'ol/ol.css';
import Map from 'ol/Map.js';
import View from 'ol/View.js';
import TileLayer from 'ol/layer/Tile.js';
import OSM from 'ol/source/OSM.js';

const map = new Map({
  target: 'map',
  layers: [new TileLayer({ source: new OSM() })],
  view: new View({ center: [12968000, 4863000], zoom: 10 })  // EPSG:3857
});

核心概念

作用
Map 顶层容器
View 视图(投影、中心、缩放、旋转)
Layer 图层
Source 数据源
Feature / Geometry 矢量要素与几何
Style 样式
Interaction 交互

图层与数据源

栅格底图

import XYZ from 'ol/source/XYZ.js';
import TileWMS from 'ol/source/TileWMS.js';

new TileLayer({ source: new XYZ({
  url: 'https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}'
}) });

new TileLayer({ source: new TileWMS({
  url: 'http://localhost:8080/geoserver/wms',
  params: { LAYERS: 'topp:states', TILED: true }
}) });

矢量图层(GeoJSON)

import VectorLayer from 'ol/layer/Vector.js';
import VectorSource from 'ol/source/Vector.js';
import GeoJSON from 'ol/format/GeoJSON.js';

map.addLayer(new VectorLayer({
  source: new VectorSource({
    url: '/data/poi.geojson',
    format: new GeoJSON()
  })
}));

矢量瓦片(MVT)

import VectorTileLayer from 'ol/layer/VectorTile.js';
import VectorTileSource from 'ol/source/VectorTile.js';
import MVT from 'ol/format/MVT.js';

new VectorTileLayer({
  declutter: true,
  source: new VectorTileSource({
    format: new MVT(),
    url: 'https://server/tiles/{z}/{x}/{y}.pbf'
  })
});

Read the full file on GitHub · 278 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. 2d ago Changed dacf5c23d62b
  2. 8d ago First seen · 278 lines · 49 tokens per session scan A 618e3b5a5d50

Subscribe to this mod's changes

openlayers is a skill published in the GitHub repository znlgis/opengis-skills (61 stars, last pushed today), licensed MIT. It adds 49 tokens to every session and 2,201 once invoked, about $0.0002 per session on Opus 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-03.

Related

Other skills, from other repositories

angular-developer

Generates Angular code and provides architectural guidance. Trigger when creating projects, components, services, or HTTP communication, or for best practices on reactivity (signals, linkedSignal, resource, httpResource), forms, dependency injection, routing, SSR, accessibility (ARIA), animations, styling (component…

angular/angular · 77 tokens

angular-new-app

Creates a new Angular app using the Angular CLI. This skill should be used whenever a user wants to create a new Angular application and contains important guidelines for how to effectively create a modern Angular application.

angular/angular · 43 tokens

portaljs-add-map

Render a GeoJSON dataset on an interactive Leaflet map in the Views section of a dataset's showcase. Installs react-leaflet and a Map component, then renders the map for the chosen dataset. Use when a dataset's data is geographic and a map view is needed alongside the showcase's default metadata and download.

datopian/portaljs · 69 tokens

javascript-expert

Expert-level JavaScript development with modern ES2024+ features, Node.js, npm ecosystem, and best practices. Use when the user mentions ECMAScript, ES2024, Node.js, npm, or web, or when the task involves Modern JavaScript, Node.js Development, Modern Tooling, or Functional Programming.

personamanagmentlayer/pcl · 69 tokens

typescript-expert

Expert-level TypeScript development with modern tooling, advanced types, and best practices. Use this skill for TypeScript projects requiring type-safe code, modern bundling, and comprehensive testing.

personamanagmentlayer/pcl · 40 tokens

astro

Astro web framework reference — zero JavaScript by default with Islands Architecture. Covers project setup, file-based routing, framework islands (React/Vue/Svelte), hydration directives, content collections, SSR/SSG, View Transitions, and deployment.

bytesagain/ai-skills · 52 tokens