top of page
How to Build an iOS App with Claude Code Using the CFA AI Toolkit

How to Build an iOS App with Claude Code Using the CFA AI Toolkit

Oct 14
7 min read

The short answer

Yes, you can build an iOS app with Claude Code. The trick is to give it a blueprint before you ask. Install the free, open-source CFA AI Toolkit into Claude Code's skills folder with one command, start a new conversation, and ask for your app. Claude Code can then follow Cooperative Feature Architecture (CFA): one clear home for every piece of code, one folder per feature, and a working first screen instead of empty placeholders.

node scripts/install.mjs --mode skills --skills-directory ~/.claude/skills

💡 What this article covers

What happens when you ask Claude Code for an iPhone app with no guidance, how to install the CFA skills for Claude Code, what the CFA App Creation skill asks Claude to do, and the follow-up prompts that keep the app tidy as it grows.


What goes wrong without a blueprint

Claude Code is an AI coding tool that works inside your project folder from the Terminal. It can create files, edit them and run commands. That makes it a strong partner for iOS work, but it also means it will happily invent a structure for you if you don't supply one.

Ask any AI for "an iPhone app that tracks my habits" with no other guidance and you often get something that runs on day one and fights you on day ten:

  • Screens that hold business rules, so changing a rule means editing a View.

  • One giant file, or many files with no obvious owner.

  • Background work started from anywhere, with nobody responsible for cancelling it.

  • A different layout every time you ask, because nothing tells the AI what "good" looks like.

The fix isn't a cleverer prompt. It's a set of instructions Claude Code reads every time, so it builds the same way on the first request and the fiftieth.


What the CFA AI Toolkit gives Claude Code

The CFA AI Toolkit is a free, MIT-licensed collection of eight AI skills and one local analysis tool. An AI skill is a small folder of instructions an AI coding tool can read. Claude Code reads skills from a skills folder on your Mac, so installing the toolkit simply copies eight folders there.

The skills cover the whole life of an app:

  • CFA App Creation: start a new iOS app with CFA from the first screen.

  • CFA Feature Work: add, change or remove a feature.

  • CFA Architecture Adoption: move an existing modern app into CFA, one feature at a time.

  • Legacy GCD migration: replace GCD, operation queues and callbacks with Swift Concurrency.

  • CFA Architecture Review: inspect structure and concurrency without changing the app.

  • CFA Codebase Tidy: simplify the project after feature work.

  • CFA Unit Tests: write and audit tests for real feature behaviour.

  • Swift Code Quality: apply a consistent Swift coding standard.

CFA itself is easy to picture. Every feature follows the same path:

View → dedicated ViewModel → Feature API → Feature Manager → Repository

The View says what the screen looks like. The ViewModel holds that screen's state. The Feature Manager owns the feature's rules. The Repository reads and writes data. AppModel creates the real managers and repositories in one place. Each feature gets its own named folder, so "Habits" or "Settings" is one place in the Xcode navigator, not a scavenger hunt.


How to set up Claude Code for iOS app building

What you need: a Mac with Xcode, Claude Code with your own account, and Node.js 20 or newer for the Terminal installer. No npm packages need installing.

1. Get the toolkit. Download or clone the repository and open a Terminal in its folder.

2. Install the skills for Claude Code. Run:

node scripts/install.mjs --mode skills --skills-directory ~/.claude/skills

This copies all eight skill folders into Claude Code's skills folder. Each one is self-contained, with the CFA specification and its references bundled inside. If you'd rather not use Node.js, you can copy the eight folders from the repo's skills folder by hand, without renaming them. The installer won't overwrite skills you've edited, and it doesn't touch Xcode or any existing app.

3. Restart and check. Restart Claude Code or open a new conversation, then ask:

I have installed the CFA Toolkit for iOS from
https://github.com/3DaysOfSwift/iOS-App-Development-CFA-AI-Toolkit.
Do you have access to create and maintain iOS projects with CFA?

Claude Code should confirm it can see the CFA skills.

4. Optional: pin CFA to one project. The installer also adds a small cfa command to ~/.local/bin. Inside an existing CFA project, this command appends marked CFA guidance to Claude Code's project instruction file, CLAUDE.md, without changing any Swift code:

cd /path/to/your-cfa-project
cfa enable-project --host claude

The installed skills already make CFA available across your Mac, so this step is extra reinforcement for one repository. If Terminal says command not found: cfa, the README shows how to add ~/.local/bin to your path.


Your first Claude Code prompt

Start your request with "Using CFA" so your intention is clear:

Using CFA, create a new iOS app that finds where I parked my car.

The CFA App Creation skill is written to switch on whenever you ask for a new iOS app, unless you ask for a different architecture. It tells Claude Code to:

  1. Define the first thing a user can actually do in the app, including its success and error states.

  2. Lay out the CFA folders and decide which code owns what.

  3. Add a ThemeManager with at least two complete colour themes and a Settings choice that's remembered.

  4. Connect View, ViewModel, feature API and implementation, with no empty tabs or placeholder managers.

  5. Give every cancellable task a clear owner.

  6. Build the iPhone target, try the first journey, and test the meaningful rules, reporting honestly on any checks it couldn't run.

That last step matters. You're asking for a small, complete, working slice, not a pile of files that only compiles.

Prefer to see the structure before you prompt anything? The toolkit also ships an Xcode template. Double-click Install Xcode Template.command (no Node.js needed), reopen Xcode, and choose File → New → Project → iOS → CFA App. You get a small runnable app with a tab bar, a real network request, a JSON file cache, retry and failure states, colour themes and tests. You can open that project in Claude Code and keep building from there.


Keep building: prompts for the next step

Once the first screen works, these prompts from the toolkit's own guide keep Claude Code on the same blueprint:

  • Using CFA, add a new feature to the tab bar but keep it locked under an IAP.

  • Using CFA, now that we added a new feature, tidy up the code.

  • Using CFA, make sure each exposed feature is unit tested, for all features.

  • Using CFA, add colour themes to the application.

  • Using CFA, remove the new feature and all IAP code too.

Already have an older app full of DispatchQueue code? Try Using CFA, migrate this legacy GCD codebase to Swift Concurrency. The migration skill records how the app behaves first, then moves one feature at a time, so it's not a blind search-and-replace.


Check Claude Code's work

AI-written code still deserves a second look. The toolkit gives you two read-only ways to look:

  • cfa inspect maps each screen to its ViewModel, its feature manager route and its named tests, and flags missing links. Add --json for machine-readable output.

  • The Xcode Project Dashboard creates a local HTML report showing where tasks are created, who owns them, possible suspension points and architecture notes. The simplest way to get one is to ask: Using CFA, analyse my Xcode project and produce a dashboard. You can also run cfa dashboard in the project folder.

Neither tool edits your app, and the toolkit is upfront that they can't prove an app is bug-free. You still build, test and try the app yourself. The difference is that you're now reviewing a project with a predictable shape.


Who's behind it

The CFA AI Toolkit was created by 3DaysOfSwiftConcurrency.com and grew out of a real app, Trend. The same blueprint runs through our open-source apps, including Cuentiva, Trend, Personal API, RocketLaunch and Metro Mate. You can read every file to see what Claude Code is being asked to build.


What to Remember

💡 What to Remember

  1. You can build an iOS app with Claude Code, and it does far better with a blueprint to follow.

  2. Install the CFA skills with node scripts/install.mjs --mode skills --skills-directory ~/.claude/skills, then open a new conversation.

  3. Start prompts with "Using CFA" until Claude Code reliably picks up the skills.

  4. The App Creation skill asks for a small, complete, tested first feature, not empty placeholders.

  5. cfa enable-project --host claude adds CFA guidance to one project's CLAUDE.md without touching Swift code.

  6. Use cfa inspect or the dashboard to review the result, then build and test it yourself.


Do I need to know Swift to build an iOS app with Claude Code?

It helps, but you don't need to be an expert to start. CFA's fixed layout makes the project easier to read, because each feature lives in one folder and each screen has one ViewModel. You'll still need Xcode on a Mac to build and run the app.


Does the toolkit change Claude Code or Xcode?

No. Installing the skills only copies instruction folders into ~/.claude/skills. The optional Xcode template adds a "CFA App" choice to Xcode's new-project menu and never changes an existing app.


Is the CFA AI Toolkit free?

Yes. It's open source under the MIT licence, so you can use, change and share it, including in commercial apps.


About Us

3 Days of Swift Concurrency

3 Days of Swift Concurrency is created by Matthew Thomas, an iOS developer building in public since 2022. He publishes the free, MIT-licensed CFA AI Toolkit and reference apps on GitHub. The paid training programme is still being built: a soft launch is targeted for 1 December 2026, but that date depends on deadlines being met and isn't guaranteed.

Comments


Commenting on this post isn't available anymore. Contact the site owner for more info.
bottom of page