agent-cli
Optional command line and MCP server for a macOS app, so Claude Code, Codex, and scripts can drive it (list, add, change, search,…
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
Claude Code
$ npx -y skills add daveebbelaar/bama --skill improve-architecture --agent claude-code
Codex
$ npx skills add daveebbelaar/bama --skill improve-architecture -a codex -y
Cursor
$ npx skills add daveebbelaar/bama --skill improve-architecture -a cursor -y
Gemini CLI
$ npx skills add daveebbelaar/bama --skill improve-architecture -a gemini-cli -y
GitHub Copilot
$ npx skills add daveebbelaar/bama --skill improve-architecture -a github-copilot -y
OpenCode
$ npx skills add daveebbelaar/bama --skill improve-architecture -a opencode -y
Windsurf
$ npx skills add daveebbelaar/bama --skill improve-architecture -a windsurf -y
name: improve-architecture description: 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.
Features pile up, and an app that was easy to change gets hard to change. A **check-in** catches that early: survey, propose, let the user pick, then refactor in small steps that keep behavior the same. The target shape for apps that grow is in [architecture.md](architecture.md).
Any one signal is enough:
feature easy?"
"unable to type-check this expression".
happens twice.
views observe.
Use these words exactly, so proposals stay comparable:
file group, a target).
error modes, threading, performance.
a lot behind a small interface. Shallow modules are pass-throughs.
hypothetical seam. Two (production and test) make it real.
for little.
Change no code in this step.
1. Read `CLAUDE.md`, `ARCHITECTURE.md`, `docs/adr/`, and `docs/FIXLOG.md` where they exist. 2. Find hot spots:
git log --since=30.days --name-only --format= | sort | uniq -c | sort -rn | head -20 find Sources -name '*.swift' | xargs wc -l | sort -n | tail -20
3. Map the structure: targets and their dependencies, protocols and their conformers, `@MainActor` types that do I/O, and what runs on which queue. 4. Look for Swift friction:
(`grep -rn 'private struct' Sources/ | awk '{print $3}' | sort | uniq -d`).
in the feature's folder.
alone. Move it into a plain type that takes plain values. 5. **Deletion test** for each candidate: if you deleted this module, would its complexity concentrate in one place (keep it) or spread to every caller (it earns its place)? Pass-throughs fail the test.
Write `docs/architecture-review-<YYYY-MM-DD>.md`, one card per candidate:
## <Title in domain nouns> [Strong | Worth exploring | Speculative] Files: Sources/App/EditorModel.swift (1,750 lines), ... Signal: <which trigger above> Problem: <what is hard to change today, with one example> Proposal: <the new module and its interface, 15 lines of Swift at most> Benefits: <locality and leverage; which tests get simpler> Proof of same behavior: <tests, golden files, snapshots, perf baseline> Plan: <one commit per step>
End with a **top recommendation** and a short "considered, not recommended" list. Saying "the code is fine" is a valid result: then every card is `Speculative` or there are none.
Stop and ask the user which candidate to do. In an unattended loop, do the top recommendation only if it is `Strong`. Leave the rest in the file.
(file bytes or hashes, snapshot PNGs, old files that must still load), and a performance baseline where speed matters.
The project builds after every step.
then delete it.
new interface tests cover.
interfaces under different constraints (fewest entry points, simplest common caller, ports and adapters) and pick one with a reason.
surprising without context, and a real trade-off.
ends with a `Rule:` line.
Done when the review file exists, the chosen refactor is committed in steps, the proof gives the same results before and after, and `ARCHITECTURE.md` matches the code.
BAMA: Build Any Mac App. Agent skills to research, clone, design, build, optimize, and test native macOS apps with Swift and SwiftUI.
Optional command line and MCP server for a macOS app, so Claude Code, Codex, and scripts can drive it (list, add, change, search,…
Deep macOS integrations for a native app, such as global hotkeys, menu bar items, floating panels, window control with…
Make a macOS app fast by measuring hangs, stutter, CPU, memory, and energy, then moving work off the main thread and onto the…
Swift 6 and SwiftUI code rules for macOS apps, including concurrency, state, SwiftData, AppKit bridges, and fixes for common…
Liquid Glass macOS app icon made as an Icon Composer file (Icon/AppIcon.icon, JSON plus SVG layers), compiled with actool, and…
Rebuild the look of an app the user likes as a native SwiftUI design kit, by measuring its screenshots (sizes, spacing, type,…
Decompile Android APK, XAPK, JAR, and AAR files using jadx or Fernflower/Vineflower. Reverse engineer Android apps, extract HTTP…