Skip to content

Guide · Agent skill

How to use the QGIS Command-Line Control agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

This guide explains what the cli-anything-qgis agent skill does, how to install it for Claude, and how to ask an agent to use it. It is written for GIS users and developers who have QGIS on their machine but may never have used an agent skill before. By the end you will know how to set up the skill, trigger it with plain requests, and avoid the mistakes that can overwrite project data.

QGIS Command-Line ControlHKUDS/CLI-Anything · Apache-2.0

Quick start

  1. 1Install QGIS and check qgis_process. Install QGIS and confirm that qgis_process is on your PATH and that PyQGIS imports in the Python environment you will use. Python 3.10 or newer is required.
  2. 2Install the cli-anything-qgis tool. Make sure the cli-anything-qgis command runs in your terminal. The source does not describe how to install this tool, so follow the project's own documentation for it.
  3. 3Download the skill ZIP. Download the ZIP for this skill from this page. It contains SKILL.md.
  4. 4Unzip into a skills folder. Unzip the download into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder for one project. Alternatively, upload it in the Claude apps under Settings, Capabilities, Skills.
  5. 5Ask for a GIS task in plain language. Describe the project, layer, layout or processing job you want, and name the input files and the output path.
  6. 6Check the results. Open the output or ask the agent to list features, layers or session history, and confirm the changes are what you expected.

What an agent skill is and what this one lets the agent do

An agent skill is a folder containing a SKILL.md file that tells an AI agent when and how to use a tool. This skill, cli-anything-qgis, teaches the agent to operate QGIS, a widely used open-source mapping program, through a command-line tool instead of the graphical interface.

Once installed, the agent can create or open QGIS project files, add writable GeoPackage-backed vector layers, add features from WKT geometry with typed attributes, build print layouts with map and label items, export layouts to PDF or image, and run generic qgis_process algorithms such as native:buffer. It can also inspect session status and history.

  • Projects: create, open, save and inspect .qgs and .qgz files
  • Layers and features: create vector layers and add or list features
  • Layouts: create print layouts, add map and label items
  • Exports: PDF or image output from a layout
  • Processing: list, look up help for, and run qgis_process algorithms

Install the skill from the ZIP or the Claude apps

Download the ZIP for this skill from this page. The skill is distributed as a folder whose main file is SKILL.md.

For Claude Code, unzip the download into your personal skills folder at ~/.claude/skills/ so the skill is available in every project. To limit it to one project, unzip it into that project's .claude/skills/ folder instead.

In the Claude apps, you can instead upload the skill under Settings, then Capabilities, then Skills.

  • Personal (all projects): ~/.claude/skills/
  • Single project: <your-project>/.claude/skills/
  • Claude apps: Settings → Capabilities → Skills

Check the requirements before you start

The skill does not include QGIS. It depends on a working QGIS installation, and it will not work without the pieces listed below. Check these first so that failures are not confusing later.

The source does not document how to install the cli-anything-qgis command-line tool itself, so confirm that the cli-anything-qgis command runs in your terminal before asking an agent to use it.

  • QGIS installed, with qgis_process available on your PATH
  • PyQGIS importable from the Python environment that runs the CLI
  • Python 3.10 or newer
  • The cli-anything-qgis command-line tool available in your terminal

Trigger the skill with natural requests

You do not need to type commands yourself. Describe the GIS task in plain language and name QGIS, and the agent should pick up the skill when the request matches its description, which covers projects, writable layers, features, layouts, exports and qgis_process operations.

Good requests state the input, the change and the output. For example: create a QGIS project called demo in EPSG:4326 with a point layer named places, then export a layout titled Demo map to PDF. Asking for JSON output is not required, because the skill already tells the agent to prefer --json for machine-driven use.

For multi-step work, say so. The skill tells the agent to keep a stateful session, so you can ask for a sequence of edits that build on each other.

  • Good: Add a point at POINT(1 2) named HQ to the places layer in demo.qgz, then list the features.
  • Good: Buffer the places layer by 1 unit and save the result as GeoJSON in /tmp.
  • Vague: Make a map. Name the project, layer, and output file instead.

See typical commands the agent may run

The examples below come from the skill's source. They show what the agent will run on your behalf, so you can read them and check the actions before accepting results. Running cli-anything-qgis with no subcommand starts an interactive session, which the agent can use for multi-step work.

The first example creates a project and a point layer with two attribute fields.

  • Use the --project flag to point at an existing project for one-shot commands.
  • Layout exports use the QGIS processing algorithms native:printlayouttopdf and native:printlayouttoimage.
  • Use process help ALGORITHM_ID to see an algorithm's parameters before running it.
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 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 export pdf output.pdf --layout Main --overwrite

Review safety notes before relying on results

This skill runs scripts on your machine, and it does not use the network according to its listing. It changes project files and writes outputs to disk, so the results are only as good as the commands the agent runs. Treat the agent's work as a draft until you have checked it.

Some commands are destructive. The save command can overwrite a project, layer remove deletes a layer, and layout remove deletes a layout. Export commands accept --overwrite, which replaces an existing output file. Keep backups of any project or data you care about, and do not point the agent at production GIS projects without them.

  • Back up .qgs and .qgz projects and source data before running edits
  • Be cautious with save, layer remove and layout remove
  • Review outputs before using them, especially exports with --overwrite

What people use it for

  • Create a project with a point layer, add a set of sites from coordinates, and export a labelled layout to PDF.
  • Run native:buffer on a GeoPackage layer and write the result to GeoJSON for a downstream pipeline.
  • Batch-generate map images from a list of layout definitions as PNG or other image outputs.
  • Inspect an existing .qgz project's layers and CRS before making edits.
  • Build repeatable, scripted layer edits that can be rerun on new data.

Frequently asked questions

Is the cli-anything-qgis skill free to use?

The source lists the licence as Apache-2.0 for the HKUDS/CLI-Anything project that contains this skill. QGIS is a separate, widely used open-source program, and you need it installed for the skill to work. Check the licence files in the project for full terms.

What do I need to install before the QGIS agent skill works?

You need QGIS installed with qgis_process on your PATH, PyQGIS importable from the Python environment running the CLI, Python 3.10 or newer, and the cli-anything-qgis command-line tool. The skill will not work without the real QGIS runtime.

Where do I put the SKILL.md skill folder for Claude?

For all projects, unzip the download into ~/.claude/skills/. For a single project, use that project's .claude/skills/ folder. In the Claude apps, you can upload the skill under Settings, then Capabilities, then Skills.

Does the QGIS skill need an internet connection?

According to the skill's listing, it does not use the network. It does run scripts on your machine and writes project files and outputs to disk.

Can the agent overwrite or delete my QGIS data?

Yes. The save command can overwrite a project, layer remove deletes a layer, layout remove deletes a layout, and export commands with --overwrite replace existing output files. Back up your projects and data before running edits.

Why does the skill need QGIS when I could use another GIS tool?

This skill is built around the real QGIS runtime and its qgis_process tools, so it only fits workflows that use QGIS. If you do not have QGIS installed or need a different GIS program, pick a tool that matches your environment instead.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you already run QGIS and want an AI agent to make repeatable, scripted changes to projects, layers, layouts and exports, with JSON output and a stateful session for multi-step work. Skip it if you do not have QGIS and qgis_process set up, or if you need a simple chat-only tool, because it writes to project files and disk and can delete or overwrite data.

Download the skill