Skip to content
Skill

Improve architecture

Runs a架构 check-in on a growing Swift app and refactors it in proven steps

Improve architecture is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
2K
Last commit
License
MIT
Listing updated

Similar skills

About Improve architecture

This skill guides an agent through an architecture review of a macOS Swift codebase that has grown hard to change. It starts with a read-only survey: it checks project notes and decision records, ranks hot spots by recent git churn and file size, maps targets and dependencies, and looks for recurring Swift problems such as god models, pass-through wrappers and state published to every view.

The agent then writes a dated review file with one card per candidate module, each rated Strong, Worth exploring or Speculative, along with a top recommendation. It is told to stop and ask which candidate to pursue, and to act on its own only when the top pick is rated Strong. The workflow relies on a shared vocabulary of modules, seams, adapters and depth so that proposals stay comparable.

For the refactor, the skill requires recording proof of unchanged behavior first (interface tests, golden outputs, snapshots or performance baselines), then making one change per commit with the project building after each step. It also covers updating ARCHITECTURE.md and adding fix-log or decision records where the content calls for them. It expects a Swift project with git history and does not ship scripts, relying on shell commands the agent runs itself.

When your agent uses it

Architecture check-in for a growing macOS Swift codebase. Finds hot spots, proposes deeper modules, and refactors one step per commit with behavior proven unchanged. Use at the end of a milestone, before a big feature, when a file passes 600 lines, when one feature touches many files, when bugs repeat in one area, or when the user asks to refactor or clean up the code.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 3 files (10 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the bama plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add daveebbelaar/bama
/plugin install bama@bama

Or copy only this skill to ~/.claude/skills/improve-architecture:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/improve-architecture &&
cp -R "$tmp/skills/code/improve-architecture" ~/.claude/skills/improve-architecture &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/improve-architecture inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/improve-architecture to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/improve-architecture &&
cp -R "$tmp/skills/code/improve-architecture" ~/.agents/skills/improve-architecture &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/improve-architecture inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/improve-architecture to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/improve-architecture &&
cp -R "$tmp/skills/code/improve-architecture" ~/.cursor/skills/improve-architecture &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/improve-architecture inside it instead.

Cursor docs on skills

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

gemini skills install https://github.com/daveebbelaar/bama.git --path skills/code/improve-architecture

Or copy the folder to ~/.gemini/skills/improve-architecture yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/improve-architecture:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/daveebbelaar/bama.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/improve-architecture &&
cp -R "$tmp/skills/code/improve-architecture" ~/.copilot/skills/improve-architecture &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/improve-architecture inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/daveebbelaar/bama.git

Then copy bama/skills/code/improve-architecture into your agent's skills folder as improve-architecture. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Hot spot survey
Ranks files by recent git churn and size, and maps targets, protocols and threading.
Swift friction checklist
Checks for god models, forwarding wrappers, drifted duplicate types and main-thread work.
Deletion test
Judges whether each candidate module earns its place by where its complexity would move.
Ranked architecture review
Writes a dated review file with rated candidate cards and a top recommendation.
Stepwise refactoring
Applies one behavior-preserving change per commit, with the build passing after each step.
Behavior proof first
Requires interface tests, golden outputs or baselines before any code moves.
Architecture records
Updates the architecture document, decision records and fix log to match the code.

Good for

  • Review my Swift app for hot spots before starting a big feature
  • Split a 1,200-line view model into smaller modules without changing behavior
  • Find duplicate private types across my macOS app's source files
  • Plan a refactor of a feature that touches too many files
  • Clean up repeated bugs in one area of my Swift codebase

Improve architecture FAQ

When does Improve architecture trigger?

It applies at the end of a milestone, before a large feature, when a Swift file passes 600 lines, when one feature touches many files or targets, when bugs repeat in one area, or when the user asks for a refactor or cleanup.

Does Improve architecture change code during the survey?

No. The survey step explicitly changes no code; the agent writes a review file and asks which candidate to pursue before refactoring.

What does Improve architecture need from my project?

It is written for macOS Swift projects with git history and a Sources folder. It reads CLAUDE.md, ARCHITECTURE.md, docs/adr and docs/FIXLOG.md where they exist.

Does Improve architecture ship scripts?

No scripts are included; it uses git and find/wc style shell commands that the agent runs during the survey.

How do I install Improve architecture in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/improve-architecture to use it in all your projects, or to .claude/skills/improve-architecture in one project. Or install the bama plugin, which includes it: /plugin marketplace add daveebbelaar/bama, then /plugin install bama@bama.

Does Improve architecture 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 Improve architecture?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Improve architecture?

The closest alternatives to Improve architecture are Improve codebase architecture, Build swiftui interface, Architecture reasoning, Arch review and Refactor seams.

Where this comes from

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

More from daveebbelaar/bama

  1. Gives a macOS app a CLI and optional MCP server so agents can drive it

    • Open source
    • 2K GitHub stars
    • Developer tools
  2. Guides a native macOS app through system entry points and their required permissions

    • Open source
    • 2K GitHub stars
    • Developer tools
  3. Measure and speed up a macOS app's hangs, stutter, memory and energy use

    • Open source
    • 2K GitHub stars
    • Developer tools
  4. Swift 6 and SwiftUI rules for macOS apps: concurrency, state, SwiftData and fixes

    • Open source
    • 2K GitHub stars
    • Developer tools
  5. Guides an agent to build a Liquid Glass macOS app icon as an Icon Composer file

    • Open source
    • 2K GitHub stars
    • Design and media
  6. Rebuilds a reference app's look as a native SwiftUI design kit, measured from screenshots

    • Open source
    • 2K GitHub stars
    • Design and media