shapely

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

A Python library for working with shapes such as points, lines, and polygons. It can compare, combine, measure, validate, and convert these shapes.

In plain words
What is it for?
Use it in Python programs for spatial analysis, such as finding intersections, creating buffers, simplifying shapes, calculating distances, and reading GeoJSON or other geometry formats.
Why use it?
It removes the need to implement common geometry calculations yourself when building software that works with maps or location data.

Skill for Claude CodeCodex

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

Good fit Use it in Python programs for spatial analysis, such as finding intersections, creating buffers, simplifying shapes, calculating distances, and reading GeoJSON or other geometry formats.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/shapely"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/shapely.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 5,741 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.00092 $0.05741
Opus 5.5 $0.00037 $0.02296
Sonnet 5.5 $0.00018 $0.01148
Haiku 4.5 $0.00009 $0.00574

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

Security

Grade A, and why

shapely 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 19d 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/shapely/SKILL.md · 424 lines

How it starts

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

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

官方文档: https://shapely.readthedocs.io/

PyPI: https://pypi.org/project/shapely/

最新版本: 2.2.0(截至 2026-11,PyPI;GitHub Release)

版本判定: 上游 main 分支已打 2.3.0.dev0 开发版标签,属于未发布开发版,PyPI 稳定版仍是 2.2.0,本文按 2.2.0 写

许可证: BSD-3-Clause

概述

Shapely 是 Python 计算几何的核心库,基于 GEOS(Geometry Engine - Open Source)的 C++ 几何引擎。它为 PostGIS、GeoPandas、PyQGIS 等众多开源 GIS 项目提供几何计算底层支持。核心能力:

  • 几何对象模型:Point、LineString、Polygon、Multi*、GeometryCollection
  • 空间关系判断:contains、intersects、within、touches、covers、disjoint、relate(DE-9IM)
  • 集合运算:intersection、union、difference、symmetric_difference
  • 构造操作:buffer、simplify、convex_hull、delaunay_triangles、voronoi_polygons、make_valid
  • 几何度量:area、length、distance、hausdorff_distance、frechet_distance
  • 空间索引:STRtree,加速批量空间查询
  • 格式读写:WKT、WKB、GeoJSON
  • 双重 API:函数式(向量化,支持 NumPy 广播)+ OOP(标量便捷)
  • 2.2 新增:minimum_width、get_segments、transform_coordseq、split、coverage_clean;标量属性/方法的调用开销大幅下降(p.x 从 2-3 微秒降到约 50-100 纳秒)

环境要求: Python 3.11+(Shapely 2.2 起;2.1 为 3.10+),NumPy >= 1.26,GEOS >= 3.10。PyPI 二进制 wheel 内含 GEOS 3.14.1(2.2.0 起;2.1.2 的 wheel 是 3.13.1),Windows ARM64 wheel 自 2.2.0 起提供。


环境准备

# pip(含预编译 GEOS 的 wheel)
pip install shapely

# Conda / Mamba
# 推荐使用 conda-forge/miniforge 发行版(比 Anaconda 轻量)
conda install -c conda-forge shapely

# 验证
python -c "import shapely; print(shapely.__version__, shapely.geos_version)"

几何类型

类型 类 说明
Point shapely.Point 单个坐标 (x, y [, z [, m]])
LineString shapely.LineString 由 2 个以上点组成的有序序列
LinearRing shapely.LinearRing 闭合的简单 LineString
Polygon shapely.Polygon 外环 + 可选内环(洞)
MultiPoint shapely.MultiPoint 点集合
MultiLineString shapely.MultiLineString 线集合
MultiPolygon shapely.MultiPolygon 面集合
GeometryCollection shapely.GeometryCollection 异构几何集合

Read the full file on GitHub · 424 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 19d ago Changed · +20 lines fb2eb1fc7144
  2. 21d ago Changed · -5 lines f852bfcdd689
  3. 1mo ago Changed · +57 lines 9e5059ad3f13
  4. 1mo ago Changed · -8 lines · +48 tokens per session f6c1aceba0a7
  5. 1mo ago Changed · +1 lines 8cc848b6ca28
  6. 1mo ago Changed · +18 lines 6a6159d13740
  7. 2mo ago Changed · +2 lines 5620eb177df4
  8. 2mo ago Changed cf0e01ddb9a4
  9. 2mo ago Changed 5b70ce58a11f
  10. 2mo ago First seen · 339 lines · 44 tokens per session scan A 05d4d8405d23

Subscribe to this mod's changes

shapely is a skill published in the GitHub repository znlgis/opengis-skills (87 stars, last pushed 20d ago), licensed MIT. It adds 92 tokens to every session and 5,741 once invoked, about $0.0004 per session on Opus 5.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

shapely compared with skills from other repositories

shapely next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
shapelyznlgis/opengis-skillsSkill8720d agoMITA92Claude Code, Codex
matlabK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA44Claude Code
pennylaneK-Dense-AI/scientific-agent-skillsSkill59kyesterdayMITA74Claude Code
holoscan-install-wheelNVIDIA/skillsSkill4.2ktodayApache-2.0A34Claude Code, Codex
python-engineering-guidelinesanywhere-labs/Agents-AnywhereSkill3.9kyesterdayApache-2.0A75Codex
future-self-liteTHU-MAIC/OpenMAICSkill45ktodayMITA20Claude Code, Codex
rocm-kernelshuggingface/kernelsSkill796todayApache-2.0A93Claude Code