agentleFS
pbzonapbzona/godot-skills/skills/godot-desktop-apps/SKILL.md

godot-desktop-apps

Skill2 starsChanged 4 months agoMITView on GitHub

Builds non-game Godot 4.x desktop tools and utilities with feature architecture, forms, typed validation, keyboard workflows, settings, user documents, persistence, and desktop exports. Use when requests mention calculators, editors, desktop utilities, local files, or application data; use godot-ui for generic Control layout, themes, and focus behavior.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the project's established Godot executable with --version when available.

    line 19
  2. Distinctive:

    Run the current application.

    line 23
  3. Distinctive:

    Never replace a shipped persistence format or change application identity/user-data location without a migration plan.

    line 25
  4. Distinctive:

    Use the smallest separation that keeps state testable and UI code understandable:

    line 29
  5. Distinctive:

    Keep entered values after failure, show an actionable error, focus the first invalid field, and disable submission only when that behavior …

    line 45
  6. Very specific:

    Use Shortcut resources, menu accelerators, or the project's command system for application shortcuts.

    line 106
  7. Distinctive:

    Keep non-game desktop stretch behavior and high-DPI strategy deliberate.

    line 114
  8. Very specific:

    Use user-selected filesystem paths for documents users expect to manage.

    line 116
  9. Distinctive:

    Treat save errors, malformed data, unsupported future versions, and migration failures as normal recoverable cases.

    line 117
  10. Very specific:

    Never store passwords, tokens, or private keys in plain ConfigFile data.

    line 118
  11. Distinctive:

    Test empty, boundary, malformed, pasted, Unicode, locale-specific, and extremely long field values.

    line 125
  12. Distinctive:

    Test release exports on each desktop OS in scope, including app identity, icons, file dialogs, paths, permissions, shortcuts, and window …

    line 130

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Godot Desktop Applications

Build desktop apps around explicit state, predictable form behavior, full keyboard access, reusable themes, and durable user data. Use Godot's scene system for composition without putting the entire application in one scene script.

Inspect Before Editing

Scale this inspection to the change's risk, and complete the relevant checks before changing scenes, scripts, project settings, or persisted formats.

  1. Locate project.godot and confirm the root. Read config/features, main scene, window size and mode, minimum-size handling, stretch/content scale, DPI settings, locale, input actions, and GUI theme configuration.
  2. Run the project's established Godot executable with --version when available. Match code, resources, and platform APIs to that exact Godot 4.x release.
  3. Inspect representative .tscn, .gd, and .tres files. Record feature boundaries, scene ownership, unique-name use, signal conventions, typed GDScript style, autoloads, services, navigation, dialogs, and naming.
  4. Inspect every existing data path and format: ConfigFile, FileAccess, JSON, custom Resource, databases, user://, user-selected files, schema versions, migrations, autosave, and error handling.
  5. Inspect themes, fonts and fallbacks, icon strategy, light/dark/system preference, UI scale, focus styles, shortcuts, menu actions, localization, and right-to-left support.
  6. Run the current application. Resize to the smallest and largest supported sizes; complete primary workflows with keyboard only; test invalid forms; locate the actual user data directory; and note existing warnings.

Never replace a shipped persistence format or change application identity/user-data location without a migration plan.

Architecture

Use the smallest separation that keeps state testable and UI code understandable:

  • Application shell: window-level layout, menus, navigation, global dialogs, and feature mounting.
  • Feature view: a scene for one workflow or screen, composed from standard controls and reusable components.
  • Feature coordinator: connects view signals to domain operations, owns transient workflow state, and maps results back to the view.
  • Domain model/service: typed rules and operations that do not depend on node paths or visual controls.
  • Persistence adapter: reads and writes one versioned format, returning explicit errors or results.

Small apps can keep the feature view and coordinator in one script. Split them when validation, persistence, background work, or reuse makes the boundary valuable. Do not create an autoload for every object; reserve global lifetime for genuinely application-wide services.

Form Workflow

  1. Define a typed data model and validation rules before wiring controls.
  2. Give every field a persistent label, expected format, and error location.
  3. Accept normal intermediate editing states. Validate without rewriting text on every keystroke unless strict filtering is a real requirement.
  4. Parse and normalize at a clear boundary such as submit, focus exit, or an intentional live-preview update.
  5. Keep entered values after failure, show an actionable error, focus the first invalid field, and disable submission only when that behavior is understandable.
  6. Emit a semantic command or call a coordinator after validation. Do not let each field save independently unless the product deliberately autosaves.

Typed Form Example

This view validates a workspace label without coupling validation to persistence. %NameEdit, %NameError, and %SaveButton must be unique named controls in the scene.

extends Control

signal save_requested(workspace_name: String)

@onready var name_edit: LineEdit = %NameEdit
@onready var name_error: Label = %NameError
@onready var save_button: Button = %SaveButton

func _ready() -> void:
    name_edit.text_changed.connect(_on_name_changed)
    name_edit.text_submitted.connect(_on_name_submitted)
    save_button.pressed.connect(_submit)
    _refresh_validation()
    name_edit.grab_focus()

func _validation_message(raw_name: String) -> String:
    var candidate: String = raw_name.strip_edges()
    if candidate.is_empty():
        return "Enter a workspace name."
    if candidate.length() > 48:
        return "Use 48 characters or fewer."
    return ""

func _on_name_changed(_new_text: String) -> void:
    _refresh_validation()

func _on_name_submitted(_submitted_text: String) -> void:
    _submit()

func _refresh_validation() -> void:
    var message: String = _validation_message(name_edit.text)
    name_error.text = message
    name_error.visible = not message.is_empty()
    save_button.disabled = not message.is_empty()

func _submit() -> void:
    var message: String = _validation_message(name_edit.text)
    if not message.is_empty():
        _refresh_validation()
        name_edit.grab_focus()
        return
    save_requested.emit(name_edit.text.strip_edges())

The coordinator handling save_requested should report save failure back to the view rather than pretending persistence succeeded.

Focus and Keyboard Contract

  • Set useful initial focus when a window, view, or dialog opens.
  • Make Tab and Shift+Tab follow reading order. Set explicit focus neighbors for non-linear layouts.
  • Support Enter/accept for the primary action only when it does not conflict with multiline editing or another focused control.
  • Support Escape/cancel at the owning dialog or navigation layer.
  • Restore focus to the opener after closing a dialog.
  • Use Shortcut resources, menu accelerators, or the project's command system for application shortcuts. Keep buttons/menu items as discoverable alternatives.
  • Preserve standard text editing, clipboard, undo/redo, selection, and IME behavior.
  • Draw visible focus in every theme and control state.

Themes and Persistence

  • Apply shared Theme resources at the app shell or feature root. Use semantic type variations and define normal, hover, pressed, focus, disabled, selected, read-only, and invalid states as applicable.
  • Support light, dark, high-contrast, and UI-scale preferences only to the scope the product needs. Verify system-theme APIs against the exact Godot and platform version.
  • Keep non-game desktop stretch behavior and high-DPI strategy deliberate. Enforce a sensible minimum window size and allow content to scroll or reflow.
  • Store settings in a versioned ConfigFile under user:// when INI-like typed key/value data is sufficient.
  • Use user-selected filesystem paths for documents users expect to manage. user:// is for application-owned data, not a substitute for Save As.
  • Treat save errors, malformed data, unsupported future versions, and migration failures as normal recoverable cases.
  • Never store passwords, tokens, or private keys in plain ConfigFile data.

Verification

  • Parse/import with the matching editor and run existing tests. Use <godot> --headless --path <project> --editor --quit when supported.
  • Launch from a clean user-data state, an existing valid state, malformed settings, a read-only or failing destination, and an older supported schema.
  • Complete all primary workflows using only keyboard. Test Tab, Shift+Tab, arrows, Enter, Escape, Space, menu accelerators, and application shortcuts.
  • Test empty, boundary, malformed, pasted, Unicode, locale-specific, and extremely long field values. Verify caret and IME behavior.
  • Resize continuously from minimum to large windows. Test high-DPI/UI scale, long translations, fallback fonts, and light/dark/high-contrast modes in scope.
  • Open, cancel, confirm, and reopen every dialog. Verify focus containment and restoration.
  • Save, close, relaunch, and compare state. Test interrupted/failed writes and confirm the app does not report success after an error.
  • Confirm application-owned data uses the expected user directory and exported builds never attempt to write to res://.
  • Test release exports on each desktop OS in scope, including app identity, icons, file dialogs, paths, permissions, shortcuts, and window behavior.
  • Report data migrations, user-visible behavior changes, test environments, and anything that remains platform-specific or unverified.

Pitfalls

  • Putting UI state, business rules, file I/O, and navigation in one root script until none can be tested independently.
  • Using node text as the only source of truth after the form has been submitted or saved.
  • Filtering every keypress and breaking paste, caret placement, negative numbers, decimals, Unicode, or IME composition.
  • Converting an empty or malformed string before validation.
  • Showing an error only by color or in a transient tooltip.
  • Hiding focus visuals, trapping focus in a custom control, or requiring a mouse for an essential action.
  • Overriding common text-editing shortcuts from a global _input handler.
  • Hard-coding one window size or using stretch settings intended for games to blur a desktop UI.
  • Saving application data to res://, which is not writable in normal exported projects.
  • Ignoring Error return values from ConfigFile, FileAccess, or directory operations.
  • Overwriting an incompatible future schema with defaults and destroying recoverable user data.
  • Committing credentials or placing secrets in plain settings files.

References

  • Application architecture
  • Forms, validation, and keyboard
  • Themes and persistence

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.