QG
qgis-core
Knowledge about the QGIS API, plugin structure, and asynchronous processing with QgsTask.
Install
mkdir -p .claude/skills/qgis-core && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14182" && unzip -o skill.zip -d .claude/skills/qgis-core && rm skill.zipInstalls to .claude/skills/qgis-core
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Knowledge about the QGIS API, plugin structure, and asynchronous processing with QgsTask.89 charsno explicit “when” trigger
About this skill
QGIS Core Development
Standardizes interaction with the QGIS API, ensuring a responsive and well-structured plugin.
When to use this skill
- When implementing new tools that interact with the map canvas.
- When handling vector or raster layers.
- When performing heavy operations that require secondary threads.
Degree of Freedom
- Strict: The use of
QgsTaskfor long processes and Core/GUI decoupling are mandatory.
Workflow
- Architecture: Separate logic into
core/(processing) andgui/(visualization). - Validation: Always verify
isValid()on layers before operating. - Asynchrony: Wrap processes > 0.5s in a
QgsTask. - CRS Management: Explicitly handle coordinate transformations.
Instructions and Rules
Golden Rules
- QgsTask: Do not block the UI. Use signals and slots for communication.
- Network/Threads: Avoid
threading.Thread(useQgsTask) and synchronous network calls (rulesUNSAFE_THREADandBLOCKING_NETWORK_CALL). - Boundaries: Use WKT to communicate core logic with the graphical interface.
- Modernization: Avoid legacy
QVariant; the analyzer will detectOBSOLETE_VARIANT. - Injection: Avoid global use of
iface; prefer passing objects in constructors.
Plugin Structure
core/: Business logic agnostic to the UI.gui/: Widgets and dialogs dependent on PyQGIS.exporters/: Data output modules.
Quality Checklist
- Is UI blocking avoided through
QgsTask? - Is layer integrity validated in every operation?
- Are CRS transformations explicitly defined?
- Is the Core/GUI separation of responsibilities followed?