# qt-canvas2d

This Claude Code skill guides QML work with Qt Canvas2D. It applies when writing, reviewing, fixing or porting 2D drawing code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 203 installs · ★ 556 repo stars
- Author: TheQtCompanyRnD
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/TheQtCompanyRnD/agent-skills/tree/HEAD/skills/qt-canvas2d/SKILL.md
- Updated: 2026-10-20
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/qt-canvas2d

## What it does

The skill guides QML code that uses Qt Canvas2D, from new drawing code to reviews, fixes and performance tuning. It also covers moving drawing code from Qt Quick Canvas, HTML5 canvas or C++ QCanvasPainter, and comparing Canvas2D with Shape/ShapePath when choosing a GPU drawing approach.

Its material includes an API reference, rules and 19 runnable recipes. The agent consults the API reference before writing code and the porting guide for migrations. Qt Canvas Painter is part of Qt 6.12+, and the application must link `Qt6::CanvasPainter` and import both `QtQuick` and `QtCanvas2D`. Work outside the canvas item itself also calls for the `qt-qml` skill.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add TheQtCompanyRnD/agent-skills --skill qt-canvas2d -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/qt-canvas2d/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/qt-canvas2d/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add TheQtCompanyRnD/agent-skills --skill qt-canvas2d -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/qt-canvas2d/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add TheQtCompanyRnD/agent-skills --skill qt-canvas2d -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/qt-canvas2d/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install TheQtCompanyRnD/agent-skills skills/qt-canvas2d
```

2. **Manually: put the files in place**
- File: `.github/skills/qt-canvas2d/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add TheQtCompanyRnD/agent-skills --skill qt-canvas2d -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/TheQtCompanyRnD/agent-skills --path skills/qt-canvas2d
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/qt-canvas2d/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add TheQtCompanyRnD/agent-skills --skill qt-canvas2d -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/TheQtCompanyRnD/agent-skills/tree/HEAD/skills/qt-canvas2d/SKILL.md

## When to use it
- write QML drawing code for Qt Canvas2D
- review or fix existing Canvas2D code
- port Qt Quick Canvas drawing to Canvas2D
- choose between Canvas2D and Shape/ShapePath

## Example prompts
- Write QML code to draw a chart with Qt Canvas2D.
- Review this Canvas2D code and fix rule violations.
- Port this Qt Quick Canvas drawing code to Canvas2D.

## Similar
- [canvas2d-data-visualization](https://affpapa.org/en/nevibecode/skills/canvas2d-data-visualization.md) — skill · 9 installs
- [pyside](https://affpapa.org/en/nevibecode/rules/pyside.md) — rule · ★ 3589 repo stars
- [pyqt6-ui-development-rules](https://affpapa.org/en/nevibecode/skills/pyqt6-ui-development-rules.md) — skill · 1200 installs
- [code-map-visualization](https://affpapa.org/en/nevibecode/skills/code-map-visualization.md) — skill · 145 installs
- [pixijs-migration-v8](https://affpapa.org/en/nevibecode/skills/pixijs-migration-v8.md) — skill · 6500 installs
- [canvas2d-isometric-renderer](https://affpapa.org/en/nevibecode/skills/canvas2d-isometric-renderer.md) — skill · ★ 51 repo stars

From the same set: [theqtcompanyrnd/agent-skills](https://affpapa.org/en/nevibecode/by/theqtcompanyrnd/agent-skills.md) — 14 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
