From kde-plasmoid-dev
Use when the user wants to develop, scaffold, debug, package, or install a KDE Plasma 6 plasmoid (desktop or panel widget). Triggers on phrases like "build a plasmoid", "KDE widget", "Plasma 6 applet", "kpackagetool6", "QML plasmoid", "PlasmoidItem". Plasma 6 / Qt 6 only — does not cover the legacy Plasma 5 stack.
npx claudepluginhub danielrosehill/claude-code-plugins --plugin kde-plasmoid-devThis skill uses the workspace's default tool permissions.
Plasmoids are QML applications loaded by the Plasma 6 shell. A plasmoid is a directory with a `metadata.json` and a `contents/ui/main.qml`, packaged and installed via `kpackagetool6`.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Share bugs, ideas, or general feedback.
Plasmoids are QML applications loaded by the Plasma 6 shell. A plasmoid is a directory with a metadata.json and a contents/ui/main.qml, packaged and installed via kpackagetool6.
Plasma APIs and packaging conventions change between minor releases. Always fetch the current canonical docs before scaffolding or debugging — do not rely on the inline summary below as the source of truth. Fetch the relevant pages with WebFetch (or the user's preferred docs tool) and use them as the authority.
Authoritative references (Plasma 6):
metadata.json properties reference — https://develop.kde.org/docs/plasma/widget/properties/plasma-sdk examples repo) — https://invent.kde.org/plasma/plasma-sdkWhen the user asks for an API, schema field, or import path, fetch the relevant URL above rather than guessing.
These hold at the time of writing — verify against the docs above for any project that ships.
my-plasmoid/
├── metadata.json
└── contents/
├── ui/
│ ├── main.qml # required — root must be PlasmoidItem
│ ├── CompactRepresentation.qml # optional — panel / collapsed view
│ └── FullRepresentation.qml # optional — popup / expanded view
├── config/
│ ├── main.xml # KConfigXT schema
│ └── config.qml # ConfigModel of pages
└── icon.svg # optional, if not using a theme icon
metadata.json{
"KPlugin": {
"Id": "org.example.myplasmoid",
"Name": "My Plasmoid",
"Description": "One-line description",
"Icon": "preferences-desktop-plasma",
"Authors": [{ "Name": "Author", "Email": "author@example.com" }],
"Category": "Utilities",
"License": "MIT",
"Version": "1.0",
"Website": "https://example.com"
},
"KPackageStructure": "Plasma/Applet",
"X-Plasma-API-Minimum-Version": "6.0"
}
The Id must be reverse-DNS, unique, and must match the directory name when installed.
main.qml skeletonimport QtQuick
import QtQuick.Layouts
import org.kde.plasma.plasmoid
import org.kde.plasma.components as PlasmaComponents
import org.kde.kirigami as Kirigami
PlasmoidItem {
id: root
compactRepresentation: PlasmaComponents.Label { text: "MP" }
fullRepresentation: ColumnLayout {
Layout.minimumWidth: Kirigami.Units.gridUnit * 12
Layout.minimumHeight: Kirigami.Units.gridUnit * 8
PlasmaComponents.Label {
Layout.alignment: Qt.AlignCenter
text: "Hello from My Plasmoid"
}
}
}
The root must be PlasmoidItem (from org.kde.plasma.plasmoid). Imports drop the version suffix in Plasma 6 (org.kde.plasma.components, not ... 3.0).
# Install or upgrade to user scope (~/.local/share/plasma/plasmoids/<id>/)
kpackagetool6 -t Plasma/Applet -i ./my-plasmoid # first time
kpackagetool6 -t Plasma/Applet -u ./my-plasmoid # upgrade in place
kpackagetool6 -t Plasma/Applet -r org.example.myplasmoid
# Live preview without touching the panel
plasmoidviewer6 -a ./my-plasmoid
# or, for an installed plasmoid:
plasmawindowed org.example.myplasmoid
# Reload plasmashell after an upgrade
kquitapp6 plasmashell && kstart plasmashell
Edits to QML files inside ~/.local/share/plasma/plasmoids/<id>/contents/ui/ take effect after a plasmashell reload (or remove + re-add the widget on the panel).
console.log(): journalctl --user -f -t plasmashellkquitapp6 plasmashell; QT_LOGGING_RULES="qml=true" plasmashell --replaceplasmoidviewer6 runs the plasmoid in isolation — the fastest dev loop, and prints errors to the terminal directly.Item instead of PlasmoidItem silently fails to expose compactRepresentation / fullRepresentation.org.kde.plasma.components 3.0 fail in Plasma 6; drop the version.Id mismatch — directory name and KPlugin.Id must agree.metadata.json — JSON is strict; kpackagetool6 will refuse to install.KPlugin.Icon must be a freedesktop icon name (e.g. preferences-desktop-plasma) or omitted if shipping contents/icon.svg.When the user asks to scaffold a new plasmoid:
plasmashell --version (must be 6.x), kpackagetool6 --version. If they're on Plasma 5, stop and tell the user this skill is Plasma 6 only.~/repos/ — never ~/.claude/).metadata.json schema before writing the file.metadata.json and contents/ui/main.qml. Add contents/config/ only if the user wants settings.kpackagetool6 -t Plasma/Applet -i ./<dir> and tell the user how to add it to their panel.journalctl --user -f -t plasmashell in a background shell during iteration.