gis-kitBLOCK
Reliable GIS for AI agents — vector/raster, terrain, network access and scanned-map georeferencing as a Claude Code / Codex skill
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
把常用的 GIS 操作写成脚本,方便 AI agent 调用。
面向 Claude Code、Codex 等 agent 的 skill。
[](LICENSE) [](requirements-tested.txt) [](https://github.com/shio-vinyl/gis-kit/actions/workflows/tests.yml) [](SKILL.md)
中文 · English
这是什么
这是我自己用的 GIS 工具箱。我把平时用得上的操作写成脚本,目前有 40 多个。
这些脚本有一个统一入口,agent 可以列出和搜索工具,通过 --help 查看参数,再按任务组合调用。
python scripts/gis.py list # 工具目录(只需标准库) python scripts/gis.py list --search raster python scripts/gis.py raster --help # 参数说明
SKILL.md 记录了处理数据时的基本要求:确认 CRS、单位和 NoData,保留 candidate / hold 等状态。具体选哪个工具、怎样衔接,由 agent 根据任务决定。
我平时用它处理一般规模的任务。数据量较大或对性能有更高要求时,可以让 agent 调用 QGIS、GRASS 等 GIS 后端,大表也可以使用可选的 DuckDB 空间 SQL。
我会继续按实际需要补充工具,也会保留一些研究性的功能。
现有工具
- 矢量处理支持裁剪、融合、合并、空间关联和缓冲,也有字段与拓扑检查修复、面积与城市指标计算。日常结果可以打包保存,并记录版本。
- 栅格与地形工具支持分区统计、重投影和 COG 输出,大栅格按窗口处理。DEM 可计算坡度、坡向、等高线和剖面;水文、可视域和地形成本可选用 GRASS 后端。
- 路网工具处理有向路网、OD 和设施覆盖情景,也支持需求加权覆盖。缺少需求权重时,不报告人口覆盖率。
- 栅格图像的语义矢量化由模型直接识图并绘制点、线、面,程序负责坐标换算、版本记录、几何检查与导出。我主要用历史地图做研究,目前推荐 GPT-6 Astra 和 GPT-6.1,过程和测试情况见下文。
- 重复任务可以用
--trace记录实际执行的步骤,整理成 recipe 后用于下一批数据。semantic-check检查指定的语义字段在步骤之间是否丢失或改变。
栅格图像的语义矢量化
gis-kit 有一套让多模态模型直接读栅格图、在图上绘制点线面的流程。识别目标、选择线的走向、确定面的范围由模型完成;裁剪、坐标换算、版本记录、几何检查、生成叠加对照图和导出文件由程序完成。
模型输出的坐标直接写在原图的像素坐标系中。折线和三次贝塞尔曲线都由模型绘制,控制点原样保存。如果某条曲线是程序对折线平滑后得到的,我会单独注明,不会把它算作模型画的。
目前主要用历史地图做研究和测试。
起因
过去把栅格地图转成矢量基本靠人工描绘,模型能做的很有限。GPT-6 Astra 之后,GPT 系列在识图和标注上的进步很明显,我才开始认真尝试这件事。
测试材料有四份:谭其骧《中国历史地图集》中两张 850×800 的局部裁片,斯坦福数字地图收藏中 1926 年的法国西北部地图,1789 年的黑森地图,以及 1829 年的美国罗德岛州图。
从测试结果看,模型已经能完成这项工作,主要障碍是费用太高,没法大量使用。
目前我使用并推荐的是 GPT-6 Astra 和 GPT-6.1。更早的 5.6 系列效果很差,Luna 仍不
c05e66ee7f7aOBSERVED · 2026-10-11Install
Commands as the repository documents them. They are shown, not run.
git clone https://github.com/shio-vinyl/gis-kit.git ~/.claude/skills/gis-kit
git clone https://github.com/shio-vinyl/gis-kit.git ~/.codex/skills/gis-kit
git clone https://github.com/shio-vinyl/gis-kit.git ~/.claude/skills/gis-kit
git clone https://github.com/shio-vinyl/gis-kit.git ~/.codex/skills/gis-kit
Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned | |
| codex | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: gis-kit description: 处理 GIS 矢量与栅格数据、空间分析、DEM 地形、路网与设施覆盖,以及扫描地图的语义描绘和配准;用于生成可回读的分析文件、候选成果与检查图。GIS toolkit for vector/raster processing, spatial analysis, DEM terrain, road-network access and facility coverage, and scanned-map tracing and georeferencing, producing verifiable files, candidates and QA plots. --- # GIS 数据处理与空间分析 强模型负责理解任务、搜索资料、选择工具和组合调用;gis-kit 提供确定性计算、文件契约与验证,不建设独立调度平台。正式地图、Scene / Storyboard 和地图视频使用可用的 `gis-composer` skill;已有诊断图可独立使用。 ## 发现与调用 先按[运行环境](references/runtime-environment.md)确认解释器。`PY` 为其实际路径,`GIS_SKILL` 为本 skill 的实际目录,不假设工作项目包含 `gis-kit/`。 ```bash "$PY" "$GIS_SKILL/scripts/gis.py" list --json "$PY" "$GIS_SKILL/scripts/gis.py" list --search raster "$PY" "$GIS_SKILL/scripts/gis.py" raster --help ``` `list` 从公开脚本的 docstring 和现有 references 生成目录,不导入 GIS 库或启动后端;原 CLI 的 `--help` 是参数事实源。使用 `gis.py <工具名> ...` 直接转发,原来的 `scripts/<工具名>.py ...` 调用继续有效。这里只保留操作判断,不维护第二份脚本/参数索引。 确需复用已执行步骤时,显式使用 `gis.py --trace /work/trace <工具名> ...`;从轨迹形成现有 recipe 草稿,选择和审阅仍由 Agent 完成。发现和轨迹整理仅需标准库,实际计算按需加载依赖。语义字段衔接用 `semantic-check` 显式比对。边界与用法见 [Harness:发现、轨迹与语义检查](references/harness.md)。 ## 核心判断 - 先确认输入图层/波段、CRS、计量单位、格网、NoData 及量的含义;总量、密度、比率和类别分别处理。赋 CRS 标签不能替代重投影,投影轴单位不默认是米。 - 保留原件、来源、参数、未知项和 `candidate` / `hold`;插补、推定及显示派生与观测分开。程序完成、几何门槛通过和局部人工接受分别记录,均不证明历史准确性或全图完整。检查器仅覆盖明确选择的字段/对象;没有全链自动语义保证。 - 按实际接口回读数值、几何、CRS 和文件,图像实际查看;旧接口的覆盖/原子写入行为逐一核实。局部栅格已有窗口链,全局算子及显示派生仍有全量边界。网络接入依赖输入证据,缺需求权重不报告人口覆盖;服务路段与服务面分开。 - 通用公开数据、地名搜索与 geocoding 交给 Agent 和已有工具按任务处理。高级 GIS 优先直接使用成熟库、CLI 或可选专业后端;只有重复需求和稳定封装价值成立才扩展本 skill。不维护通用取数框架、来源注册表或 gazetteer。 ## 按需参考 只读取当前任务需要的参考;具体命令从 `list --json` 的 `references` 与原生 help 下钻。 - 大数据与内存:需要读前拦截时用 `gis.py --memory-budget`,契约见[内存预算](references/memory-budget.md)。 - 大表与空间 SQL:先按[Spatial SQL 与规模路径](references/spatial-sql.md)选择 DuckDB / GDAL 等成熟引擎;可选薄入口直接接收原生 SQL,回读检查 Parquet 输出,不默认全量载入 GeoPandas。 - 矢量准备与分析:[基础工作流](references/vector-workflows.md)、[日常结果包](references/daily-vector.md)、[匹配与制图综合](references/vector-cartography.md)、[分析扩展](references/analysis-extensions.md)。 - 栅格与专业分析:[数值栅格](references/raster-numeric.md)、[栅格整理](references/raster-cleanup.md)、[地形诊断](references/terrain-analysis.md)、[路网与需求覆盖](references/network-access.md)、[其他专业分析](references/professional-analysis.md)。 - 文件衔接与复用:[Harness](references/harness.md)、[顺序 recipe 与重复交付](references/repeated-delivery.md)、[Composer 显示交付](references/composer-display.md)。 - 图像描绘与赋位:[标注流程](references/raster-annotation.md)、[配准流程](references/raster-georeferencing.md);仅写标注 patch 时再读[对象契约](references/raster-schema.md)。 ## 图像标注与配准 以下仅适用于图像识读任务。模型由用户或上层调度指定,不在 skill 内固定厂商、标识或推理档位;指定模型不可用时停止模型步骤,不静默替换。 默认由模型直接绘制坐标,程序负责裁剪、非生成式增强、坐标换算、版本、叠加、检查与导出。禁用生成式补图;阈值、骨架与程序追线仅在用户明确要求时使用。多局部任务逐处看图、提交和保存,按边或相连边批次保护已提交对象并核对覆盖,不等整图读完再集中输出。 描绘和配准可独立执行;完整任务先保留像素成果,再按图框转换。局部放大沿用原图坐标,独立插图另定义有效区域与变换。完整图幅分别核查类别、延续节点、遗漏面与插图;不自动分片修缝。明确要求的 TPS 研究沿用独立接口与冻结验收,不修改原生标注或仿射流程。配准 `pass` 仅表示通过预先声明的几何门槛,交付仍为待审候选。 ## 环境与交付 后续 CLI、测试与子进程使用同一已确认解释器;缺依赖不得静默换算法。安装、升级、同步 installed skill 均须用户授权。macOS 沙箱不默认依赖 `ogrinfo` 或启动 `uv`;已有环境可用时直接使用,具体依赖和 fallback 见运行环境参考。 模板位于 `templates/`,偏好位于 `config/user.yaml`,永久回归位于 `tests/`。运行产物、日志、缓存、大数据及历史证据放仓库外。本地执行不等于数据不会进入远端模型上下文;trace 为显式本地记录,也可能包含路径和业务参数,分享前按数据边界审阅。
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- none-observed
- Shell
- declared (1 observation(s))
- Dependencies
- pinned
- Secrets in source
- found
Findings (6)
gdf[args.field] = gdf.apply(lambda row: eval(args.expr), axis=1) # noqa: S307
secret = 'fixture-sensitive-value'
assert all(url.startswith(('http://127.0.0.1:','data:','blob:')) for url in metrics['render']['resourceUrls'])run: sudo apt-get update && sudo apt-get install -y --no-install-recommends fonts-noto-cjk
assets/vectorization/astra-vs-5.6.png
assets/vectorization/gpt-6.1-all-efforts.png
Gates applied: no_behavioural_pass.
c05e66ee7f7afull audit observations/trust-audit/skill/shio-vinyl__gis-kit.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | c05e66ee7f7a | BLOCK | D | 69 | first audit |
Questions
What does the gis-kit skill do?
Reliable GIS for AI agents — vector/raster, terrain, network access and scanned-map georeferencing as a Claude Code / Codex skill
Is gis-kit safe to install?
No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.
What can gis-kit access on my machine?
The audit observed that it runs shell commands and reads or writes files. Each of those is consistent with what it says it does. Secrets in the source: found — see the findings.
Which assistants does gis-kit work with?
Its documentation mentions claude-code and codex. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (c05e66ee7f7a), read on 2026-10-11. The repository is watched, and a new audit runs when it changes — this is the first audit.