new-component

A generator for PySide6 interface components: reusable widgets, dialog windows, or main windows. It creates the class boilerplate, layouts, signals, and names used to find controls in tests.

In plain words
What is it for?
Create a named component from a class name, choose its component type, and place the resulting Python file in the matching source directory.
Why use it?
It avoids rewriting common Qt setup code and keeps new components in the expected project folders.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/l3digitalnet/claude-code-plugins/new-component
Clone the repo
git clone --depth 1 https://github.com/L3DigitalNet/Claude-Code-Plugins
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,120 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00022 $0.01120
Opus 5 $0.00011 $0.00560
Sonnet 5 $0.00004 $0.00224
Haiku 4.5 $0.00002 $0.00112

Measured yesterday against content hash 647fa0e2c043, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

new-component scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/qt-suite/commands/new-component.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/qt-suite:new-component — Generate Qt Component

Create a new PySide6 widget, dialog, or window class with correct boilerplate, layout structure, signal declarations, and setObjectName() calls for testability.

Step 1: Parse Arguments

Extract from the argument string:

  • name: CamelCase class name (e.g., UserProfileWidget, ConfirmDeleteDialog, DocumentWindow)
  • type: one of widget, dialog, or window
    • If not specified, infer from name suffix: *Widget → widget, *Dialog → dialog, *Window → window
    • If still ambiguous, ask with AskUserQuestion

Derive the file name: snake_case of the class name (e.g., UserProfileWidgetuser_profile_widget.py).

Step 2: Find Destination Directory

Read .qt-test.json to find app_entry and derive the package root. Then:

  • For widget: write to src/<package>/ui/widgets/<filename>.py
  • For dialog: write to src/<package>/ui/dialogs/<filename>.py
  • For window: write to src/<package>/ui/<filename>.py

If the directory doesn't exist, create it.

Step 3: Generate Component

Widget Template

from PySide6.QtWidgets import QWidget, QVBoxLayout
from PySide6.QtCore import Signal


class <ClassName>(QWidget):
    """<Brief description of what this widget displays or does>."""

    # Signals — declare what this widget emits for parent components to respond to
    # Example: data_submitted = Signal(dict)

    def __init__(self, parent: QWidget | None = None) -> None:
        super().__init__(parent)
        self.setObjectName("<snake_case_name>")
        self._setup_ui()
        self._connect_signals()

    def _setup_ui(self) -> None:
        """Build and arrange child widgets."""
        layout = QVBoxLayout(self)
        layout.setContentsMargins(0, 0, 0, 0)
        # TODO: add widgets

    def _connect_signals(self) -> None:
        """Wire internal signal→slot connections."""
        pass

Dialog Template

from PySide6.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QWidget
from PySide6.QtCore import Signal


class <ClassName>(QDialog):
    """<Brief description of what data this dialog collects or presents>."""

    def __init__(self, parent: QWidget | None = None) -> None:
        super().__init__(parent)
        self.setObjectName("<snake_case_name>")
        self.setWindowTitle("<Human-Readable Title>")
        self.setModal(True)
        self.setMinimumWidth(360)
        self._setup_ui()

    def _setup_ui(self) -> None:
        layout = QVBoxLayout(self)

        # TODO: add form fields

        buttons = QDialogButtonBox(
            QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Cancel
        )
        buttons.accepted.connect(self._on_accept)
        buttons.rejected.connect(self.reject)
        layout.addWidget(buttons)

    def _on_accept(self) -> None:
        """Validate inputs before accepting. Call self.accept() if valid."""
        self.accept()

    # TODO: add accessor properties to retrieve dialog values
    # Example:
    # @property
    # def name(self) -> str:
    #     return self._name_edit.text().strip()

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 153 lines · 22 tokens per session scan A 647fa0e2c043

Subscribe to this mod's changes

new-component is a command published in the GitHub repository L3DigitalNet/Claude-Code-Plugins (6 stars, last pushed 2d ago), licensed MIT. It adds 22 tokens to every session and 1,120 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.