mapserver

mapserver is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 92 tokens per session (4,080 once invoked), scanned A, original, MIT.

An open-source server for publishing geographic data as web maps and standard OGC services. OGC services are agreed interfaces such as WMS for map images, WFS for features, and WCS for coverage data.

In plain words
What is it for?
Use it to serve Shapefiles, PostGIS data, GeoTIFFs, and other sources; style and combine layers; and expose them through WMS, WFS, WCS, or OGC API Features.
Why use it?
It avoids writing a custom web server for reading spatial files, drawing map layers, and serving geographic data to clients. Map and layer settings can be kept in a mapfile.

Skill for Claude CodeCodex

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

Good fit Use it to serve Shapefiles, PostGIS data, GeoTIFFs, and other sources; style and combine layers; and expose them through WMS, WFS, WCS, or OGC API Features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/mapserver
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 mapserver
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 mapserver

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/mapserver"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/mapserver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,080 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 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.00092 $0.04080
Opus 5.5 $0.00037 $0.01632
Sonnet 5.5 $0.00018 $0.00816
Haiku 4.5 $0.00009 $0.00408

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

Security

Grade A, and why

mapserver scanned grade A with 2 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 6d 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt update

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

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

- **验证产物**:先离线 `map2img -m demo.map -o out.png -s 600 400` 看渲染,再 `mapserv -nh "QUERY_STRING=map=/abs/demo.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities"` 抓能力文档,最后才 `curl -sI "http://host/cgi-bin/mapserv?map=...&R
gis/mapserver/SKILL.md · 297 lines

How it starts

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

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

官方文档: https://mapserver.org/

最新版本: 8.6.6(rel-8-6-6,发布记录)

许可证: MIT

该 SKILL 关注 MapServer 服务端发布与 mapfile 配置;数据源准备配合 gis/gdal(ogr2ogr)、空间数据库配合 gis/postgis。

概述

MapServer 是 OSGeo 维护的开源平台,用于把空间数据发布为 Web 地图与 OGC 服务。它以 C 语言实现,核心是一个读取 mapfile 的 mapserv CGI 可执行程序。它定位为"地图服务引擎"而非完整 GIS,侧重高效渲染与标准协议输出。

  • OGC 服务:WMS、WFS、WCS、OGC API Features、SOS
  • 渲染:地图合成、图层叠加、要素标注、栅格与矢量混合
  • 样式:CLASS/STYLE 内置符号体系,外部 SLD 绑定
  • 数据源:Shapefile、PostGIS、GeoPackage、OGR 支持的格式、GeoTIFF 等栅格
  • 扩展:MapScript(Python/PHP/Java/.NET)脚本化、MapCache 瓦片缓存、TinyOWS WFS-T

环境准备

方式一:Debian/Ubuntu 软件包

sudo apt update
sudo apt install -y cgi-mapserver mapserver-bin
# 可选:Apache 集成
sudo apt install -y apache2 libapache2-mod-fcgid
sudo a2enmod authnz_fcgi cgi
sudo systemctl restart apache2

cgi-mapserver 提供 CGI 可执行程序,mapserver-bin 提供 mapserv、map2img、shp2img、legend 等命令行工具。

方式二:源码编译(CMake)

MapServer 8.x 需要支持 C++11/C99 的编译器,8.4.0 起要求 CMake 3.16+。先装依赖(GDAL、PROJ、libpng、FreeType、zlib、libcurl 为常用项):

sudo apt install -y build-essential cmake libgdal-dev libproj-dev \
  libpng-dev libfreetype6-dev zlib1g-dev libcurl4-openssl-dev

tar -zxvf mapserver-8.6.6.tar.gz
cd mapserver-8.6.6 && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt \
      -DWITH_CURL=ON -DWITH_CLIENT_WFS=ON -DWITH_CLIENT_WMS=ON \
      -DWITH_PYTHON=ON ..
make
sudo make install

方式三:Windows(OSGeo4W)

使用 OSGeo4W 安装器,勾选 mapserver 组件即可获得 mapserv.exe 与全部依赖。

验证

mapserv -v
# 输出应包含 MapServer version 8.6.6 与 SUPPORTS=WMS_SERVER,WMS_CLIENT,WFS_SERVER...

若缺少某个服务,对应 SUPPORTS= 字段不会出现,说明编译时未启用该库。


核心 API / 命令

mapfile 对象层次

mapfile 必须以 MAP 开头,扩展名为 .map,不区分大小写,从顶部到底部依次读取(越靠上的图层越先绘制)。字符串含特殊字符或关键字时必须加引号。

对象 作用
MAP 根对象,定义名称、尺寸、范围、颜色、输出格式
LAYER 数据 + 样式的组合,按 TYPE(POINT/LINE/POLYGON/RASTER)区分
CLASS 图层内的一类要素及其样式与过滤条件
STYLE 具体绘制样式(颜色、线宽、符号、填充)
LABEL 要素注记的文字与排版
WEB 服务元数据与模板,承载 wms_*/wfs_* 关键字
PROJECTION 定义对象坐标参考系
SYMBOL/OUTPUTFORMAT/LEGEND 符号库、输出格式、图例

Read the full file on GitHub · 297 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. 6d ago Changed · +2 lines · +31 tokens per session scan B → A 79d9a2a7bb89
  2. 11d ago First seen · 295 lines · 61 tokens per session scan B df291706233d

Subscribe to this mod's changes

mapserver is a skill published in the GitHub repository znlgis/opengis-skills (75 stars, last pushed 7d ago), licensed MIT. It adds 92 tokens to every session and 4,080 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.

Related

Other skills, from other repositories

apache

Apache HTTP Server 配置.

chaterm/terminal-skills · 7 tokens

cloudrun-development

CloudBase Run backend development rules (Function mode/Container mode). Use this skill when deploying backend services that require long connections, multi-language support, custom environments, AI agent development, or migrating existing/GitHub apps that need VPC access to MySQL/PostgreSQL/Redis. Also use when…

TencentCloudBase/CloudBase-AI-Toolkit · 109 tokens

ai-model-nodejs

Use this skill for Node.js backend AI via @cloudbase/node-sdk (>=3.16.0) — cloud functions, CloudRun, Express/Koa/NestJS, serverless APIs, scheduled jobs, LLM proxies, agent orchestration. The only SDK supporting image generation (ai.createImageModel + generateImage). Text via ai.createModel with groups cloudbase…

TencentCloudBase/CloudBase-AI-Toolkit · 158 tokens

auth-nodejs-cloudbase

CloudBase Node SDK auth guide for server-side identity, user lookup, and custom login tickets. This skill should be used when Node.js code must read caller identity, inspect end users, or bridge an existing user system into CloudBase; not when configuring providers or building client login UI.

TencentCloudBase/CloudBase-AI-Toolkit · 63 tokens

auth-web-cloudbase

CloudBase Web Authentication Quick Guide for frontend integration after auth-tool has already been checked. Provides concise and practical Web authentication solutions with multiple login methods and complete user management.

TencentCloudBase/CloudBase-AI-Toolkit · 38 tokens

cloud-storage-web

Complete guide for CloudBase cloud storage using Web SDK (@cloudbase/js-sdk) - upload, download, temporary URLs, file management, and best practices.

TencentCloudBase/CloudBase-AI-Toolkit · 35 tokens