Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Coding
SwiftButler
Try itAnalyze, syntax-check, reindent, and distribute Swift source code with the SwiftButler CLI. Use when working with Swift files or packages and you need a comp...
What it does
Use to reduce Swift source into a more manageable working surface.
The skill document
SwiftButler
Use butler to reduce Swift source into a more manageable working surface.
Setup
Install via Homebrew:
brew install cocoanetics/tap/swiftbutler
Verify:
butler --version
For local development from a checkout:
swift build
.build/debug/butler --version
Core Rules
- Prefer
analyzewhen an agent needs API shape, not full implementation details. - Prefer
--format yamlor--format jsonwhen the result will be parsed or reused. - Prefer
checkfor fast validation loops beforeswift build. - Use
reindentto normalize indentation in place; choose exactly one of--spacesor--tabs. - Use
distributebefore targeted edits when a generated file has become too large or noisy.
Fast Command Map
Analyze Swift APIs
# Default interface-style output
butler analyze Sources/MyModule
# Public API only
butler analyze Sources/MyModule --visibility public
# Recursive YAML output for tooling
butler analyze Sources --recursive --format yaml
# Write structured output to a file
butler analyze Sources --recursive --format yaml --output api.yaml
Supported formats:
interfacejsonyamlmarkdown
Syntax-check Swift quickly
butler check Sources --recursive
butler check Sources --recursive --json
butler check Sources --recursive --json --pretty
butler check Sources --recursive --format markdown --show-fixits
Reindent with spaces or tabs
# Default: 3 spaces
butler reindent Sources --recursive
# Explicit spaces
butler reindent Sources --recursive --spaces 2
butler reindent Sources --recursive --spaces 4
# Tabs instead of spaces
butler reindent Sources --recursive --tabs
# Preview without modifying files
butler reindent Sources --recursive --tabs --dry-run
Notes:
--spacesaccepts values from1to16.--tabsand--spacesare mutually exclusive.- Without
--tabs, the default is--spaces 3.
Distribute large files into smaller ones
# Split one large generated file
butler distribute Generated.swift
# Preview recursive distribution
butler distribute Sources/Generated --recursive --dry-run
# Write distributed files to a separate directory
butler distribute Sources/Generated --recursive --output SplitSources
When to Use Which Command
- Use
analyzeto hand an LLM a compact view of types, functions, properties, and docs. - Use
checkinside generation or repair loops for immediate syntax feedback. - Use
reindentafter generated or patched code has inconsistent indentation. - Use
distributewhen one large Swift file should become declaration-sized files that are easier to inspect and edit.
Related skills
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.
More from odrobnik
Browse all skillsAutomate George banking (Erste/Sparkasse AT): balances, transactions, and SEPA file upload in JSON.
Text-to-speech, sound effects, music generation, voice management, and quota checks via the ElevenLabs API. Use when generating audio with ElevenLabs or mana...
Manage multiple OpenAI Codex accounts by capturing current login tokens, switching between saved accounts, and auto-selecting the best one based on quota bud...
Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehic...
Fetches health data from the Withings API for multiple family members including weight, body composition (fat, muscle, bone, water), activity, and sleep. Use...
Control and monitor Snapmaker 2.0 3D printers via their HTTP API. Status, job management, progress watching, and event monitoring.