Command Palette

Search for a command to run...

Назад к скиллам
скилл № 25990

desktop-gtk

Use when the user asks about GTK 4 or GTK 3, GtkWidget, GtkBuilder or Blueprint UI files, GTK CSS, event controllers, GtkListView, gtk-rs or PyGObject apps…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить desktop-gtk в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

GTK

Purpose

Build applications using GTK (GIMP Toolkit) — the primary widget toolkit for GNOME and a cross-platform toolkit supporting Linux, Windows, and macOS. GTK4 provides a modern rendering model with CSS styling, hardware-accelerated rendering via Vulkan/OpenGL, and a robust widget hierarchy.

Agent Protocol

Trigger

Exact user phrases: "GTK", "GTK3", "GTK4", "GtkWidget", "GtkBuilder", "Gtk CSS", "gtk-rs", "PyGObject", "GTK application", "GtkWindow", "GtkBox", "GtkListView".

Input Context

  • GTK version (3.x or 4.x — 4.x preferred for new projects)
  • Language (C, Rust via gtk4-rs, Python via PyGObject, Vala, JS via GJS)
  • Display backend (Wayland, X11, Windows GDK, macOS Quartz)
  • CSS styling approach (Adwaita theme, custom CSS, libadwaita)
  • Performance needs (heavy rendering via GtkGLArea, large data via GtkListView)
  • Platform target (Linux native, cross-platform)

Output Artifact

GTK application architecture with widget tree, signal flow, data binding, and styling strategy.

Response Format

GTK version: {4.x}  Language: {C|Python|Rust|Vala}
UI: {GtkBuilder/Blueprint files, widget tree}
Lists: {GListModel + GtkListView factory}
Input: {event controllers}  Actions: {app./win. actions + accels}
Code: {files}

Completion Criteria

  • Widget hierarchy designed (container types, layout management)
  • UI definition format chosen (GtkBuilder XML vs programmatic)
  • Signal and callback architecture established
  • Data display strategy (GtkListView/ColumnView vs GtkTreeView)
  • CSS styling approach defined (Adwaita + custom CSS)
  • GtkApplication startup flow configured
  • Keyboard navigation and mnemonics enabled
  • Accessibility (ATK/AT-SPI) integrated
  • Internationalization via gettext configured
  • Window geometry and state persistence implemented

Max Response Length

250 lines.

Framework/Methodology

GTK Version Decision

Feature GTK3 GTK4
Widget hierarchy GtkBox, GtkGrid, GtkPaned Same + GtkListView, GtkColumnView
Event handling signal_connect per event Event controllers (GtkEventControllerKey)
Rendering Cairo (CPU) Vulkan/OpenGL (GPU, ngl subsystem)
CSS animation Limited Full CSS transitions + animations
Accessibility ATK AT-SPI directly integrated
List widgets GtkTreeView (complex, outdated) GtkListView, GtkColumnView (modern, flexible)
OpenGL GtkGLArea GtkGLArea + GtkMediaFile
File chooser GtkFileChooser GtkFileDialog (portal-based, async)
Lifecycle Manual dispose GObject ref-counted, easier memory management

Recommendation: GTK4 for all new projects. GTK3 only for legacy maintenance.

GTK App Architecture

GtkApplication
  ├── activate() → create windows
  ├── GActionMap (menus, shortcuts)
  ├── GMenuModel (app menu)
  └── GSimpleAction (actions)
      ↓
GtkApplicationWindow
  ├── Title bar (CSD or SSD)
  ├── GtkBox layout
  │   ├── GtkHeaderBar / GtkMenuBar
  │   ├── Content area (GtkListView, GtkBox, GtkNotebook)
  │   └── GtkStatusBar / Footer
  ├── GtkOverlay (popovers, tooltips)
  └── GtkShortcutsWindow

Workflow

Step 1: Set Up GtkApplication

// Rust with gtk4-rs
use gtk::prelude::*;
use gtk::{Application, ApplicationWindow, Button, Box, Orientation};

fn main() {
    let app = Application::builder()
        .application_id("com.example.app")
        .build();

    app.connect_activate(|app| {
        let window = ApplicationWindow::builder()
            .application(app)
            .title("My GTK App")
            .default_width(600)
            .default_height(400)
            .build();

        let vbox = Box::new(Orientation::Vertical, 8);
        let button = Button::with_label("Click Me");
        button.connect_clicked(|_| {
            println!("Clicked!");
        });
        vbox.append(&button);

        window.set_child(Some(&vbox));
        window.present();
    });

    app.run();
}
# Python with PyGObject
import gi
gi.require_version('Gtk', '4.0')
from gi.repository import Gtk, GLib, Gio

class MyApp(Gtk.Application):
    def __init__(self):
        super().__init__(application_id='com.example.app')
    def do_activate(self):
        window = Gtk.ApplicationWindow(application=self)
        box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=8)
        button = Gtk.Button(label='Click Me')
        button.connect('clicked', lambda b: print('Clicked!'))
        box.append(button)
        window.set_child(box)
        window.present()

app = MyApp()
app.run(None)

Step 2: Build UI with GtkBuilder XML

<!-- interface.ui -->
<interface>
  <template class="MyAppWindow" parent="GtkApplicationWindow">
    <property name="title">My GTK App</property>
    <property name="default-width">600</property>
    <property name="default-height">400</property>
    <child>
      <object class="GtkBox">
        <property name="orientation">vertical
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/gtk-advanced.md
  • references/gtk-architecture.md
  • references/gtk-builder-guide.md
  • references/gtk-deployment.md
  • references/gtk-fundamentals.md
  • references/gtk-setup.md

FAQ

Что делает скилл desktop-gtk?

Use when the user asks about GTK 4 or GTK 3, GtkWidget, GtkBuilder or Blueprint UI files, GTK CSS, event controllers, GtkListView, gtk-rs or PyGObject apps. Produces GTK application code and UI definitions. Not for GNOME Shell extensions or libadwaita platform integration (use desktop-gnome).

Как установить скилл desktop-gtk?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл desktop-gtk запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить desktop-gtk с