QGIS Agent

SKILLAI 工具
AI 工具 未标注权限 许可证不明确
安装这个技能

Drive QGIS's 1000+ Processing algorithms (QGIS native / GDAL / GRASS / SAGA / 3D / point cloud) from any AI agent over plain HTTP. Architecture: Agent --HTTP--> scripts/server.py (PyQGIS) --> QGIS 3.28+/4.x. Bilingual docs (English first, Chinese after). 驱动本机 QGIS 的 1000+ Processing 算法(矢量地理处理、栅格与地形分析、插值、网络分析、格式转换、渲染出图),让 AI 智能体通过纯 HTTP 直接执行空间分析。

一句话选型结论

按资料字段整理

QGIS Agent是AI 工具类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类AI 工具 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_7eae0ae2/qgis-agent
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

AI 工具
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_7eae0ae2仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791700978
正文体量12.7 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
组合多个 AI 能力

把写作、检索、总结串成一条流程。

搭工作流

把固定流程做成可重复调用的步骤。

做提示词与评测

整理提示词并对比输出效果。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在AI 工具场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
QGIS Agent当前 未标注权限 未标注 未标注 未标注 有
执行计划 只读 GitHub 仓库 151.5 万 Codex、Claude、Cursor 有
Playwright MCP 测试 浏览器控制 ClawHub 市场 136.5 万 OpenClaw 有
完成前的验证 未标注权限 GitHub 仓库 131.9 万 Codex、Claude、Cursor 有
子 Agent 驱动开发 只读 GitHub 仓库 131.2 万 Codex、Claude、Cursor 有
前端设计 执行命令 GitHub 仓库 125.6 万 Codex、Claude、Cursor 有

SKILL.md 全文

12.7 KB
模型实际读到的说明书原文,来自技能仓库

QGIS Agent

Drive the 1000+ Processing algorithms of the local QGIS installation (QGIS native / GDAL / GRASS / SAGA / 3D / point cloud), letting AI agents perform spatial analysis directly over plain HTTP.

Architecture: this skill (Agent) --HTTP--> scripts/server.py (PyQGIS) --> QGIS 4.x

Prerequisites

  • Windows 10/11 + QGIS 3.28 or later (free & open source, OSGeo4W standalone installer) — PyQGIS must run inside QGIS's bundled Python
  • Server HTTP address: http://127.0.0.1:8767 (localhost only)

Step 1: Make sure the server is running

Probe whether the service is up:

curl -s http://127.0.0.1:8767/health
# {"status":"ok","server":"qgis-agent-server","version":"1.0","algorithms":1000,"providers":6,...}

If not running, start it in the background with QGIS's bundled Python:

"C:/Program Files/QGIS 4.0.3/bin/python-qgis.bat" "<skill-dir>/scripts/server.py" 8767

On Windows you can also run scripts/start_server.bat (auto-detects the QGIS install dir; Ctrl+C to stop).

Step 2: Call the tools (plain HTTP, no MCP client needed)

The agent can call everything with curl:

# List all algorithm providers and their algorithm counts
curl -s http://127.0.0.1:8767/modules

# List all algorithms of one provider (e.g. QGIS native)
curl -s http://127.0.0.1:8767/module/qgis

# Search algorithms by keyword (always use this when unsure of the ID)
curl -s "http://127.0.0.1:8767/search?q=buffer"

# Get the full parameter signature of an algorithm (check before /call)
curl -s "http://127.0.0.1:8767/tool/native:buffer"

# Run an algorithm: POST /call  body = {"name": "algorithm-id", "arguments": {...}}
curl -s -X POST http://127.0.0.1:8767/call -H "Content-Type: application/json" \
  -d '{"name":"native:buffer","arguments":{"INPUT":"C:/data/roads.shp","DISTANCE":500,"OUTPUT":"C:/out/roads_buf.gpkg"}}'

Workflow: /search to find the algorithm → /tool to check the signature → /call to run it. Algorithm IDs are provider:name, e.g. native:buffer, gdal:rasterize, grass:r.slope.aspect (in QGIS 3.x the GRASS provider is named grass7).

Provider cheat sheet (QGIS 4.0 measured values)

provider #algos (approx) Purpose
native 339 vector geometry / overlay / analysis / selection / table ops, raster analysis, terrain analysis, interpolation, cartography
grass 307 hydrology, viewshed, cost paths, network allocation (provider is grass in QGIS 4, grass7 in 3.x)
gdal 59 format conversion, reprojection (warp), raster tiling
qgis 39 reclassify, aspect, other raster-terrain / interpolation algorithms (partly duplicated in native)
pdal 24 point cloud (LiDAR) processing
3d 1 TIN interpolation, DEM generation

Actual counts are returned by /modules (they vary with installed plugins and versions).

Key parameter conventions (important, learned the hard way)

  • Extent strings are ordered xmin,xmax,ymin,ymax (the official QGIS Processing order), NOT minx,miny,maxx,maxy!
    Example: "483000,513000,4407000,4437000 [EPSG:32650]". The server parses it and handles CRS conversion automatically.
  • Distance-like parameters (buffer radius, spacing, slope thresholds, etc.) are in meters — the server forces the Distance unit to Meters, even when the CRS is geographic (degrees).
  • Prefer .gpkg (GeoPackage) for outputs: single file, no non-ASCII path issues; pass "TEMPORARY_OUTPUT" to create a temporary layer.
  • Enum parameters (TYPE, END_CAP_STYLE, ...) take integers; check /tool/{algorithm-id} descriptions for valid values.

Project / rendering / code execution

# Inspect the current project and layers (field list, feature count, CRS)
curl -s http://127.0.0.1:8767/project

# Open / save a project
curl -s -X POST http://127.0.0.1:8767/project/open -H "Content-Type: application/json" -d '{"path":"C:/data/demo.qgz"}'
curl -s -X POST http://127.0.0.1:8767/project/save -H "Content-Type: application/json" -d '{"path":"C:/out/demo.qgz"}'

# Render the current project to PNG (layers & extent optional)
curl -s -X POST http://127.0.0.1:8767/render -H "Content-Type: application/json" \
  -d '{"output":"C:/out/map.png","width":1024,"height":768}'

# Execute arbitrary PyQGIS code (disabled by default; set PYQGIS_ENABLE_EXEC=1 at startup to enable)
curl -s -X POST http://127.0.0.1:8767/pyqgis -H "Content-Type: application/json" \
  -d '{"code":"print(QgsProject.instance().fileName())"}'

Typical call chains (composite analysis)

Site-selection requests decompose naturally into buffer → overlay → filter chains, e.g.
hospital siting (within 500 m of major roads, slope < 5°):
1. native:buffer roads 500 m → 2. native:slope on the DEM → 3. qgis:reclassifybytable to binarize slope → 4. native:intersection to intersect

More examples (buffer, clip, field calculator, slope/aspect, interpolation, hotspots, rendering) in references/examples.md.

Error handling

Errors return {&quot;status&quot;:&quot;error&quot;,&quot;message&quot;:&quot;...&quot;,&quot;suggestion&quot;:&quot;...&quot;}. Common cases:
- algorithm not found → typo in the ID; use /search?q= to find the right one (the same algorithm may live under native or qgis depending on version)
- path outside whitelist → path not allowed; adjust QGIS_ALLOWED_PATHS or move the data
- parameter mismatch → verify names and types via /tool/{algorithm-id}
- invalid input data → make sure the file exists and the format is supported by OGR/GDAL

Results include elapsed_sec; vector outputs also carry feature_count, geometry_type and size_mb.

Security & configuration

  • The server listens on 127.0.0.1 only — never exposed to the LAN
  • Path whitelist: unrestricted by default; set QGIS_ALLOWED_PATHS (semicolon-separated) to require all requested paths to live inside whitelisted directories
    set QGIS_ALLOWED_PATHS=C:/GIS-AI-Course/;D:/data/
  • Arbitrary PyQGIS execution is disabled by default (/pyqgis returns 403); set PYQGIS_ENABLE_EXEC=1 at startup to enable — trusted environments only
  • Confirm target data with the user before destructive write operations (overwriting outputs)

QGIS 智能体(中文说明)

驱动本机 QGIS 的 1000+ Processing 算法(QGIS 原生 / GDAL / GRASS / SAGA / 3D / 点云),让 AI 直接用自然语言完成空间分析。

架构:本技能(Agent) --HTTP--&gt; scripts/server.py (PyQGIS) --&gt; QGIS 4.x

前置条件

  • Windows 10/11 + QGIS 3.28 及以上(免费开源,OSGeo4W 独立安装包)——PyQGIS 需在 QGIS 自带 Python 中运行
  • 服务端 HTTP 地址:http://127.0.0.1:8767(仅本机监听)

第一步:确保服务在运行

先探测服务是否已启动:

curl -s http://127.0.0.1:8767/health
# {&quot;status&quot;:&quot;ok&quot;,&quot;server&quot;:&quot;qgis-agent-server&quot;,&quot;version&quot;:&quot;1.0&quot;,&quot;algorithms&quot;:1000,&quot;providers&quot;:6,...}

若未启动,后台启动服务(用 QGIS 自带 Python):

&quot;C:/Program Files/QGIS 4.0.3/bin/python-qgis.bat&quot; &quot;&lt;本技能目录&gt;/scripts/server.py&quot; 8767

Windows 下也可运行 scripts/start_server.bat(自动探测 QGIS 安装目录,Ctrl+C 停止)。

第二步:调用工具(纯 HTTP,无需 MCP 客户端)

智能体直接用 curl 调用即可:

# 列出全部算法提供器(provider)及算法数量
curl -s http://127.0.0.1:8767/modules

# 列出某个提供器的全部算法(如 QGIS 原生算法)
curl -s http://127.0.0.1:8767/module/qgis

# 按关键词搜索算法(不确定算法 ID 时必用)
curl -s &quot;http://127.0.0.1:8767/search?q=buffer&quot;

# 查看算法完整参数签名(写 /call 前先查)
curl -s &quot;http://127.0.0.1:8767/tool/native:buffer&quot;

# 执行算法:POST /call  body = {&quot;name&quot;: &quot;算法ID&quot;, &quot;arguments&quot;: {...}}
curl -s -X POST http://127.0.0.1:8767/call -H &quot;Content-Type: application/json&quot; \
  -d &#x27;{&quot;name&quot;:&quot;native:buffer&quot;,&quot;arguments&quot;:{&quot;INPUT&quot;:&quot;C:/data/roads.shp&quot;,&quot;DISTANCE&quot;:500,&quot;OUTPUT&quot;:&quot;C:/out/roads_buf.gpkg&quot;}}&#x27;

调用流程:/search 找算法 → /tool 查签名 → /call 执行。算法 ID 格式为 provider:算法名,如 native:buffer、gdal:rasterize、grass:r.slope.aspect(QGIS 3.x 中 GRASS 提供器名为 grass7)。

模块速查(provider,QGIS 4.0 实测值)

provider 算法数(约) 用途
native 339 矢量几何/叠加/分析/筛选/建表、栅格分析、地形分析、插值、制图
grass 307 水文分析、视域、成本路径、网络分配(QGIS 4 中 provider 名为 grass,3.x 为 grass7)
gdal 59 格式转换、投影变换(warp)、栅格切片
qgis 39 重分类、坡向等栅格地形 / 插值算法(部分与 native 重复)
pdal 24 点云(LiDAR)处理
3d 1 TIN 插值、DEM 生成

实际数量以 /modules 返回为准(随安装的插件与版本变化)。

关键参数约定(重要,实测踩坑)

  • 范围(Extent)字符串顺序是 xmin,xmax,ymin,ymax(QGIS Processing 官方顺序),不是 minx,miny,maxx,maxy!
    例:&quot;483000,513000,4407000,4437000 [EPSG:32650]&quot;。服务端会自动解析并做 CRS 转换。
  • 距离类参数(缓冲半径、间距、坡度阈值等)单位为米——服务端已强制 Distance 单位为 Meters,即使 CRS 是经纬度也按米解释。
  • 输出格式推荐 .gpkg(GeoPackage,单文件、无中文路径问题);传 &quot;TEMPORARY_OUTPUT&quot; 生成临时图层。
  • 枚举参数(如 TYPE、END_CAP_STYLE)传整数,具体取值查 /tool/{算法ID} 的 description。

工程 / 渲染 / 代码执行

# 查看当前工程与图层(含字段列表、要素数、CRS)
curl -s http://127.0.0.1:8767/project

# 打开 / 保存工程
curl -s -X POST http://127.0.0.1:8767/project/open -H &quot;Content-Type: application/json&quot; -d &#x27;{&quot;path&quot;:&quot;C:/data/demo.qgz&quot;}&#x27;
curl -s -X POST http://127.0.0.1:8767/project/save -H &quot;Content-Type: application/json&quot; -d &#x27;{&quot;path&quot;:&quot;C:/out/demo.qgz&quot;}&#x27;

# 渲染当前工程为 PNG(可指定图层与范围)
curl -s -X POST http://127.0.0.1:8767/render -H &quot;Content-Type: application/json&quot; \
  -d &#x27;{&quot;output&quot;:&quot;C:/out/map.png&quot;,&quot;width&quot;:1024,&quot;height&quot;:768}&#x27;

# 执行任意 PyQGIS 代码(默认关闭,启动时设 PYQGIS_ENABLE_EXEC=1 开启)
curl -s -X POST http://127.0.0.1:8767/pyqgis -H &quot;Content-Type: application/json&quot; \
  -d &#x27;{&quot;code&quot;:&quot;print(QgsProject.instance().fileName())&quot;}&#x27;

典型调用链(复合分析)

选址类需求按"缓冲区→叠加→筛选"链条自动拆解为多次 /call,例:
医院选址(距主干道 500m 内、坡度 < 5°):
1. native:buffer 道路 500m → 2. native:slope DEM 求坡度 → 3. qgis:reclassifybytable 坡度二值化 → 4. native:intersection 叠加取交集

更多示例(缓冲区、裁剪、字段计算、坡度坡向、插值、热点分析、渲染出图等)见 references/examples.md。

错误处理

返回 {&quot;status&quot;:&quot;error&quot;,&quot;message&quot;:&quot;...&quot;,&quot;suggestion&quot;:&quot;...&quot;},常见情形:
- algorithm not found → 算法 ID 拼写错误,用 /search?q= 找正确 ID(同一算法在不同版本中可能挂在 native 或 qgis 下)
- path outside whitelist → 路径不在白名单,调整 QGIS_ALLOWED_PATHS 或换目录
- 参数不匹配 → 用 /tool/{算法ID} 核对参数名与类型
- 输入数据无效 → 确认文件路径存在、格式受 OGR/GDAL 支持

结果中 elapsed_sec 含执行耗时;输出为矢量数据时 result 内会带 feature_count、geometry_type、size_mb。

安全与配置

  • 服务只监听 127.0.0.1,不会暴露到局域网
  • 路径白名单:默认不限制;设置环境变量 QGIS_ALLOWED_PATHS(分号分隔多个路径)后,所有请求中的文件路径必须位于白名单目录内
    set QGIS_ALLOWED_PATHS=C:/GIS-AI-Course/;D:/data/
  • PyQGIS 任意代码执行默认关闭(/pyqgis 返回 403),启动时设 PYQGIS_ENABLE_EXEC=1 才开启;仅在可信环境使用
  • 谨慎执行写操作(覆盖输出)前,向用户确认目标数据

常见问题

5 问
答案由本站依据条目字段整理
QGIS Agent怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_7eae0ae2/qgis-agent。安装方式为未标注。装完刷新技能列表或重开客户端。

QGIS Agent支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

QGIS Agent权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

QGIS Agent收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

QGIS Agent用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。