# Axiom swift simplifier

> Axiom swift simplifier is an open-source agent skill for developer tools. Reviews Swift code for behavior-preserving readability and idiom cleanups. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/CharlesWiltgen/Axiom/tree/main/axiom-codex/skills/axiom-swift-simplifier
- **Repository:** https://github.com/charleswiltgen/axiom
- **GitHub stars:** 1,278
- **License:** MIT
- **Skill name:** axiom-swift-simplifier
- **Collection:** https://github.com/CharlesWiltgen/Axiom
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

This skill makes the agent act as a Swift simplification reviewer. It scans Swift files in a chosen file, subsystem or whole project, then reports clarity opportunities such as optional binding shorthand, redundant else and return, if or switch expressions, collection idioms and leftover boilerplate. Each finding is tagged by how safe it is to apply: safe as written, safe only under a stated condition, or advisory with a warning that behavior may change.

The workflow runs in phases. It gathers Swift files while skipping tests, previews, build output and dependency folders, runs a fixed set of detection searches, then reads the surrounding code of every match before reporting. A safety gate rejects changes that trade readability for fewer lines. The output is a structured report with before and after snippets, a reason for each change, and a section listing tempting changes that were rejected.

The agent reports findings and does not edit files; applying them is left to the developer or another tool. It works on Swift source and points larger concerns such as API modernization, performance and SwiftUI structure to other specialist agents. It has no bundled scripts and sets no tool restrictions in its metadata.

## When your agent uses it

> Use when the user wants to simplify Swift code, reduce boilerplate, or make Swift more readable and idiomatic without changing behavior.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/CharlesWiltgen/Axiom/tree/HEAD/axiom-codex/skills/axiom-swift-simplifier)
- [License: MIT](https://github.com/CharlesWiltgen/Axiom/tree/HEAD/axiom-codex/skills/axiom-swift-simplifier)

## Features

- **Optional handling cleanup:** Suggests shorter optional binding and nil-coalescing forms where they keep the code clear.
- **Control flow simplification:** Flags redundant else branches, unneeded returns and guard-style early exits.
- **Expression-based branching:** Proposes if or switch expressions in place of temporary variables assigned across branches.
- **Collection idiom suggestions:** Points out verbose emptiness checks and filter chains that have simpler equivalents.
- **Behavior-safety tagging:** Labels each finding as safe, conditional or advisory so the applier knows what to verify.
- **Rejected change reporting:** Lists tempting simplifications the gate turned down, with the reason.

## Good for

- Simplify this Swift file without changing what it does
- Reduce boilerplate in a view model
- Make the networking subsystem more idiomatic Swift
- Find nested if-let pyramids that could be flattened
- Review a Swift module for redundant self or type annotations

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/axiom-swift-simplifier` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/axiom-swift-simplifier &&
cp -R "$tmp/axiom-codex/skills/axiom-swift-simplifier" ~/.claude/skills/axiom-swift-simplifier &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/axiom-swift-simplifier` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/axiom-swift-simplifier` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/axiom-swift-simplifier &&
cp -R "$tmp/axiom-codex/skills/axiom-swift-simplifier" ~/.agents/skills/axiom-swift-simplifier &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/axiom-swift-simplifier` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/axiom-swift-simplifier` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/axiom-swift-simplifier &&
cp -R "$tmp/axiom-codex/skills/axiom-swift-simplifier" ~/.cursor/skills/axiom-swift-simplifier &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/axiom-swift-simplifier` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/CharlesWiltgen/Axiom.git --path axiom-codex/skills/axiom-swift-simplifier
```

Or copy the folder to `~/.gemini/skills/axiom-swift-simplifier` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/axiom-swift-simplifier`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/axiom-swift-simplifier &&
cp -R "$tmp/axiom-codex/skills/axiom-swift-simplifier" ~/.copilot/skills/axiom-swift-simplifier &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/axiom-swift-simplifier` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git
```

Then copy `Axiom/axiom-codex/skills/axiom-swift-simplifier` into your agent's skills folder as `axiom-swift-simplifier`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Axiom swift simplifier edit my Swift files?

No. The agent reports findings with before and after snippets, and applying them is left to the developer or another tool.

### What scope can Axiom swift simplifier scan?

It can scan a single file, a subsystem or directory, or the whole project, skipping tests, previews, build output and dependency folders.

### Which tools does Axiom swift simplifier need?

The skill's metadata does not set allowed tools. Its instructions call for file globbing, text search and reading files.

### Does Axiom swift simplifier handle API migration or performance rewrites?

No. The instructions route API modernization, performance work and SwiftUI structural changes to other specialist agents.

### How do I install Axiom swift simplifier in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/axiom-swift-simplifier to use it in all your projects, or to .claude/skills/axiom-swift-simplifier in one project.

### Does Axiom swift simplifier run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Axiom swift simplifier?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Axiom swift simplifier?

The closest alternatives to Axiom swift simplifier are Axiom analyze swiftui performance, Axiom analyze swift performance, Code simplifier, Axiom audit codable and Axiom audit swiftui architecture.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Axiom analyze swiftui performance](https://ai-powered.com/skills/axiom-analyze-swiftui-performance): Axiom analyze swiftui performance is an open-source agent skill for developer tools.
- [Axiom analyze swift performance](https://ai-powered.com/skills/axiom-analyze-swift-performance): Axiom analyze swift performance is an open-source agent skill for developer tools.
- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Axiom audit codable](https://ai-powered.com/skills/axiom-audit-codable): Axiom audit codable is an open-source agent skill for developer tools.
- [Axiom audit swiftui architecture](https://ai-powered.com/skills/axiom-audit-swiftui-architecture): Axiom audit swiftui architecture is an open-source agent skill for developer tools.
- [Axiom audit testing](https://ai-powered.com/skills/axiom-audit-testing): Axiom audit testing is an open-source agent skill for developer tools.
- [Axiom modernize](https://ai-powered.com/skills/axiom-modernize): Axiom modernize is an open-source agent skill for developer tools.
- [Axiom audit swiftui layout](https://ai-powered.com/skills/axiom-audit-swiftui-layout): Axiom audit swiftui layout is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/axiom-swift-simplifier
