eriktobben/hermes-backup/swiftui-macos-utility-apps
Claude Code and agent skill by eriktobben/hermes-backup
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Build and iterate small macOS SwiftUI utility apps with AppKit integrations for file picking, drag-drop, and batch processing. Use when implementing desktop tools that process local files, need progress UX, and require codec/format fallback behavior.
Install
npx vskill@latest install eriktobben/hermes-backup/swiftui-macos-utility-appsSKILL.md
The same SKILL.md was published earlier as eriktobben/hermes-backup/swiftui-macos-utility-apps.
SwiftUI macOS Utility Apps
When to use
Use for macOS desktop utilities that combine SwiftUI UI with AppKit/FileManager/ImageIO workflows (batch converters, file processors, local automation tools).
Core workflow
- Model output capabilities explicitly
- Define an
OutputFormatenum with display name, extension, preferredUTType, and fallback format. - Keep fallback logic centralized in the conversion service (
resolvedFormat).
- Design conversion as a service, not in ViewModel
- Service owns file IO, destination generation, codec logic, and conversion loop.
- ViewModel owns state (
isConverting,conversionProgress, status/error text, selected files, results).
- Handle user file input from multiple paths
NSOpenPanelfor picking files.- SwiftUI
.onDropfor drag-and-drop (UTType.fileURL.identifier). - Deduplicate by canonical file path in ViewModel.
- Implement safe output writing
- Never overwrite silently.
- Generate unique destination names (
name.ext,name-2.ext,name-3.ext, ...).
- Expose progress from service to UI
- Add a progress callback in service (
(done, total, currentURL) -> Void). - Update
@Publishedprogress/status on@MainActor. - Show a
ProgressViewwhile converting.
- Show actionable results
- Return structured
ConversionResultincluding source, destination, original/output bytes. - UI shows total input/output plus per-file savings samples.
- Add quality presets without losing manual control
- Model presets as an enum (e.g.,
smallest,balanced,highest) withdisplayNameand numericqualityValue. - ViewModel method
applyQualityPreset(_:)sets slider quality and recomputes estimates. - When slider moves manually, snap preset selection to nearest preset (
syncPresetToClosestQuality) so UI state stays coherent.
- Improve post-conversion workflow
- Persist
lastOutputFolderin ViewModel after a successful run. - Auto-open output folder on success (
NSWorkspace.shared.open(folder)). - Also expose an explicit “Open Output Folder” button (disabled until a folder exists).
Pitfalls
- Codec support varies by macOS version/runtime: WebP/AVIF may not be universally writable. Always resolve to a supported fallback (typically JPEG) when
UTType/destination support is unavailable. - UI thread violations: service callbacks can run off-main-thread; bounce updates to
@MainActor. - Selection UX debt: include per-item removal and clear-all to avoid forcing users to restart selection.
- Build checks can be environment-limited: if
swiftCLI is missing, report verification as blocked and provide exact missing prerequisite. - Workspace path ambiguity: this environment can contain multiple similarly named trees (e.g.,
./SourcesandProjects/minify/Sources). Before patching files, confirm target repo root withsearch_files+git -C <path> statusand then use absolute/anchored paths.
Verification checklist
swift buildsucceeds (or report exact environment blocker).- Drag-drop imports files correctly.
- Duplicate filename outputs get suffixes instead of overwrite.
- Progress bar increments to 100% and status text updates per file.
- Unsupported requested output format falls back cleanly and still completes conversion.
References
- See
references/image-converter-patterns.mdfor concrete snippets and fallback patterns. - See
references/minify-quality-presets-and-output-folder.mdfor preset-sync and output-folder UX pattern, plus path-ambiguity guardrail.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/software-development/swiftui-macos-utility-apps/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/eriktobben/hermes-backup/swiftui-macos-utility-apps)