swiftbutler for Openclaw

SwiftButler is a CLI tool designed to analyze, syntax-check, reindent, and logically distribute Swift source code for better project management.

odrobnik
v1.0.0
Mar 30, 2026
0
776
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install swiftbutler

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install swiftbutler using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is swiftbutler?

SwiftButler is a powerful utility designed to reduce the complexity of Swift source code into a more manageable working surface. It provides developers and AI agents with the ability to extract clean API overviews, validate syntax quickly, and maintain code consistency across large projects. By integrating this tool into your Openclaw Skills, you can automate the process of understanding project structures and cleaning up generated code.

The tool is particularly valuable for bridging the gap between raw source code and structured data. Whether you are performing a recursive analysis of a Swift package or normalizing indentation after an automated refactor, SwiftButler provides a robust interface for both human developers and automated systems to interact with Swift code bases efficiently.

swiftbutler Use Cases

  • Generating compact API overviews for AI agents to understand type definitions without implementation clutter.
  • Performing fast syntax validation loops to catch errors before triggering full Swift builds.
  • Normalizing code indentation across a repository using specific space or tab configurations.
  • Breaking down large, monolithic Swift files into smaller, declaration-based files for easier editing.
  • Exporting project metadata in JSON or YAML formats for custom tooling and documentation.

How swiftbutler Works

  1. The user installs the butler CLI, which serves as the core engine for processing Swift files.
  2. The tool scans specified Swift source files or directories recursively to build a syntax tree.
  3. Depending on the command (analyze, check, reindent, or distribute), the tool applies specific logic to the source code.
  4. For analysis, it filters declarations based on visibility and formats them into the desired output style like YAML or JSON.
  5. For distribution or reindenting, it modifies the file system structure or file contents based on defined rules.
  6. Users can then leverage these processed outputs within their wider Openclaw Skills workflows for automated development.

swiftbutler Setup

Install SwiftButler via Homebrew using the following commands:

brew install cocoanetics/tap/swiftbutler

To verify that the installation was successful and check the version:

butler --version

For developers working from a local checkout, you can build the tool using the Swift Package Manager:

swift build
.build/debug/butler --version

swiftbutler Data Schema & Taxonomy

SwiftButler organizes its output based on the selected format. It supports structured data exchange which is ideal for integration into automated pipelines.

Format Description
interface Standard Swift interface definition style.
json Highly structured machine-readable format.
yaml Recursive structured output preferred for CLI tooling.
markdown Documentation-friendly format for human review.

The tool allows for filtering by visibility (e.g., public, internal) and can target specific output directories for distributed files.

swiftbutler Advanced Features

  • Recursive processing support for handling nested directory structures in large Swift packages.
  • Dry-run capability for destructive operations like reindent and distribute to ensure safety.
  • Flexible indentation engine supporting 1 to 16 spaces or standard tabs.
  • Integrated syntax fix-it suggestions when performing fast validation checks.
  • Multi-format support allows the tool to function as a data provider for other Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*