Saltar al contenido
Skillpedia
Análisis y hojas de cálculo58 mil · #3180

cli-anything-qgis

Qué hace

Esta skill permite que tu agente trabaje con proyectos de mapas de QGIS desde la línea de comandos. Es para personas que hacen mapas o trabajan con datos geográficos y quieren automatizar parte de ese trabajo.

Cuándo usarla

  • ✓Cuando quieres añadir elementos de mapa o crear una capa vectorial nueva en un proyecto de QGIS.
  • ✓Cuando quieres exportar un diseño de impresión a PDF o imagen.
  • ✓Cuando quieres ejecutar una operación de procesamiento de QGIS desde la línea de comandos.

Link de la skill

https://github.com/HKUDS/CLI-Anything/blob/main/QGIS/agent-harness/cli_anything/qgis/skills/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/HKUDS/CLI-Anything/blob/main/QGIS/agent-harness/cli_anything/qgis/skills/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Crea una capa de puntos con las ubicaciones de mis tiendas en mi proyecto de QGIS y exporta el diseño del mapa a PDF.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La skill ejecuta QGIS con su entorno de ejecución real, así que tu agente puede crear capas, añadir elementos, armar diseños y ejecutar herramientas de procesamiento. Los resultados se guardan en el proyecto o se exportan como archivos.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

cli-anything-qgis

Use this skill when you need to inspect or modify QGIS projects from the terminal through the real QGIS runtime.

Requirements

  • QGIS installed with qgis_process on PATH
  • PyQGIS importable from the Python environment running the CLI
  • Python 3.10+

Agent guidance

  • Prefer --json for all machine-driven use.
  • For one-shot commands, pass --project <path> when operating on an existing project.
  • Running cli-anything-qgis with no subcommand starts a stateful REPL.
  • Layout export is backed by real QGIS processing algorithms:
    • native:printlayouttopdf
    • native:printlayouttoimage

What this CLI covers

  • create, open, save, and inspect .qgs / .qgz projects
  • create writable GeoPackage-backed vector layers
  • add features via WKT geometry and typed key=value attributes
  • create print layouts and add map/label items
  • export layouts to PDF or image
  • inspect and run generic qgis_process algorithms
  • inspect session status and history

Command groups

project

  • new -o/--output [--title] [--crs]
  • open PATH
  • save [PATH]
  • info
  • set-crs CRS

layer

  • create-vector --name --geometry --crs [--field name:type ...]
  • list
  • info LAYER
  • remove LAYER

feature

  • add --layer LAYER --wkt WKT [--attr key=value ...]
  • list --layer LAYER [--limit N]

layout

  • create --name [--page-size] [--orientation]
  • list
  • info LAYOUT
  • remove LAYOUT
  • add-map --layout LAYOUT --x --y --width --height [--extent xmin,ymin,xmax,ymax]
  • add-label --layout LAYOUT --text TEXT --x --y --width --height [--font-size N]

export

  • presets
  • pdf OUTPUT --layout LAYOUT [--dpi] [--force-vector] [--force-raster] [--georeference/--no-georeference] [--overwrite]
  • image OUTPUT --layout LAYOUT [--dpi] [--overwrite]

process

  • list
  • help ALGORITHM_ID
  • run ALGORITHM_ID [--param KEY=VALUE ...]

session

  • status
  • history [--limit N]

Examples

Create a project and add a writable layer

cli-anything-qgis --json project new -o demo.qgz --title "Demo" --crs EPSG:4326
cli-anything-qgis --json --project demo.qgz layer create-vector \
  --name places \
  --geometry point \
  --field name:string \
  --field score:int

Add features and inspect them

cli-anything-qgis --json --project demo.qgz feature add \
  --layer places \
  --wkt "POINT(1 2)" \
  --attr name=HQ \
  --attr score=5

cli-anything-qgis --json --project demo.qgz feature list --layer places --limit 10

Create and export a layout

cli-anything-qgis --json --project demo.qgz layout create --name Main
cli-anything-qgis --json --project demo.qgz layout add-map --layout Main --x 10 --y 20 --width 180 --height 120
cli-anything-qgis --json --project demo.qgz layout add-label --layout Main --text "Demo map" --x 10 --y 8 --width 100 --height 10
cli-anything-qgis --json --project demo.qgz export pdf output.pdf --layout Main --overwrite

Inspect or run processing algorithms

cli-anything-qgis --json process help native:buffer
cli-anything-qgis --json --project demo.qgz process run native:buffer \
  --param INPUT=/tmp/demo_data.gpkg|layername=places \
  --param DISTANCE=1 \
  --param SEGMENTS=8 \
  --param END_CAP_STYLE=0 \
  --param JOIN_STYLE=0 \
  --param MITER_LIMIT=2 \
  --param DISSOLVE=false \
  --param OUTPUT=/tmp/buffer.geojson

REPL

cli-anything-qgis

Example interactive flow:

project new -o demo.qgz --title "Demo"
layer create-vector --name places --geometry point --field name:string
feature add --layer places --wkt "POINT(1 2)" --attr name=HQ
layout create --name Main
session status
quit
Preguntas frecuentes

¿Necesito tener QGIS instalado?

Sí. QGIS debe estar instalado en tu equipo y con su herramienta de procesamiento disponible.

¿Qué archivos de proyecto admite?

Trabaja con archivos de proyecto de QGIS en formato .qgs y .qgz, y crea capas respaldadas por GeoPackage.

¿Puede trabajar sin un proyecto existente?

Sí. Puede crear un proyecto nuevo, y también trabajar con uno existente cuando le indiques la ruta.

Detalles

Descripción original del autor

Stateful QGIS CLI for projects, writable layers, features, layouts, exports, and qgis_process operations using the real QGIS runtime.

repo: HKUDS/CLI-Anything

Popularidad

Estrellas en GitHub
58 mil
Posición en el ranking
#3180
Licencia
Apache-2.0
Actualizada
21/9/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas