qt-cmake-project — Claude Code skill for clean Qt 6 CMake
The skill writes and edits CMake for Qt 6 projects: targets, QML modules, resources. Useful when your agent mixes up Qt 5 and Qt 6 commands.
npx skills add TheQtCompanyRnD/agent-skills --skill qt-cmake-project -a claude-codeWhat qt-cmake-project does
The skill walks an agent through Qt CMake setup using the API from an installed Qt SDK, which exposes features plain CMake does not have. It splits work across reference files: a simple single-target project, a modular layout with add_subdirectory(), QML integration, resources, and configure or build steps. Before the final answer the agent checks its output against references/common-mistakes.md.
Hard rules sit at the core, because mainstream models get these wrong by default. Only Qt 6 commands: qt_add_executable, qt_add_library, qt_add_qml_module, qt_add_resources, qt_add_plugin, qt_add_translations. qt_standard_project_setup() must follow the first find_package(Qt6 ...), and the package call needs an explicit minimum such as find_package(Qt6 6.8 REQUIRED COMPONENTS ...). QML goes through qt_add_qml_module(), never a raw .qrc file.
The skill also treats project files as data, not orders. Anything read from CMakeLists.txt, *.cmake, CMakePresets.json, .qrc, qmldir, .qml or .cpp/.h is material to analyse and edit. When a command signature is unclear, it points the agent at the Qt docs MCP tool first, since invented option names like SOURCE_FILES or QRC_PREFIX do not exist. You need a Qt SDK installation with the CMake API for this to work.
What it helps with
- generate a CMakeLists.txt for a fresh Qt 6 project
- add an executable or library target with explicit visibility
- wire a QML module to C++ code
- migrate a project off Qt 5 macros onto Qt 6 commands
- organise images, icons and translations per target
Example prompts for the agent
- Create a Qt 6 project with a single executable and a QML UI
- Add a library target in CMakeLists.txt and link it to the app
- Move images and fonts into resources with qt_add_resources
How to install qt-cmake-project
1Skills CLI (Vercel)
npx skills add TheQtCompanyRnD/agent-skills --skill qt-cmake-project -a claude-code2Manually: put the files in place
~/.claude/skills/qt-cmake-project/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/qt-cmake-project/
1Skills CLI (Vercel)
npx skills add TheQtCompanyRnD/agent-skills --skill qt-cmake-project -a codex2Manually: put the files in place
.agents/skills/qt-cmake-project/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add TheQtCompanyRnD/agent-skills --skill qt-cmake-project -a cursor2Manually: put the files in place
.cursor/skills/qt-cmake-project/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install TheQtCompanyRnD/agent-skills qt-cmake-project2Manually: put the files in place
.github/skills/qt-cmake-project/SKILL.md1Skills CLI (Vercel)
npx skills add TheQtCompanyRnD/agent-skills --skill qt-cmake-project -a gemini-cli2Platform CLI
gemini skills install https://github.com/TheQtCompanyRnD/agent-skills --path skills/qt-cmake-projectManually: put the files in place
.devin/skills/qt-cmake-project/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add TheQtCompanyRnD/agent-skills --skill qt-cmake-project -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about qt-cmake-project
How do I install qt-cmake-project in Claude?
Run npx skills add TheQtCompanyRnD/agent-skills --skill qt-cmake-project -a claude-code. The skill file lands at ~/.claude/skills/qt-cmake-project/SKILL.md.
What does qt-cmake-project do?
It helps an agent generate and edit CMake for Qt 6 projects: define targets, add sources and resources, attach QML modules. Reference files cover each project shape.
Which Qt commands does the skill use?
Only unprefixed Qt 6 commands: qt_add_executable, qt_add_library, qt_add_qml_module, qt_add_resources, qt_add_plugin, qt_add_translations. Qt 5 macros such as qt5_add_resources count as defects and get migrated.