Updated
AGENTS.md · Swift

AGENTS.md and CLAUDE.md examples for Swift

Of 51 actively developed open-source products built with Swift, 37 (73%) keep instruction files for coding agents: AGENTS.md in 29, CLAUDE.md in 28. The typical file is 950 words, and most cover pointers to other docs (78%) and commands to build, run and test (70%).

Real files to read

From the best-known open-source Swift products whose file is a real one (not a pointer to another), 200 to 4,000 words, covering at least three of the usual topics, written mainly in Swift. Each opens on GitHub.

ProjectFileStarsWordsCovers
YunYouJun/cookCLAUDE.md6,542850CommandsTestingDoc pointersStructureCode style
openclaw/PeekabooAGENTS.md5,399653CommandsTestingDoc pointersStructureCode styleGit
moona3k/macparakeetAGENTS.md7391,301CommandsTestingDoc pointersGit
HMAKT99/UnTouchIDCLAUDE.md334306CommandsTestingStructure

What Swift projects put in them

Share of the 37 files that cover each topic, against all 731 files we read.

Pointers to other docs78% vs 69%
Commands to build, run and test70% vs 79%
Testing57% vs 67%
Git, commits and pull requests49% vs 46%
Project structure41% vs 57%
Code style35% vs 49%

How they talk to the agent: 84% say “never” or “do not” somewhere (all files: 80%), 24% shout a rule in capitals like IMPORTANT or MUST (23%), and 14% tell it to ask before some changes (20%).

The tools they name

Package managersnpm (9 files), pnpm (6 files), bun (6 files)

Tests and lintersVitest (6), Playwright (5), pytest (5), ESLint (5), Biome (2), Testing Library (1)

Named more than in files generallyBun (7), SwiftUI (7), Electron (6), FastAPI (5), Xcode (5), Anything (4), Capacitor (4), Cloudflare (4)

Questions

What should an AGENTS.md for a Swift project include?

In 37 files from open-source Swift products: pointers to other docs (78%), commands to build, run and test (70%), testing (57%), git, commits and pull requests (49%), project structure (41%), code style (35%). The package manager they name most is npm (9 files).

AGENTS.md or CLAUDE.md?

Among these Swift products, 29 keep an AGENTS.md and 28 a CLAUDE.md. Across every product we checked, 354 keep both, and in 189 of those the CLAUDE.md only points to the AGENTS.md (a symlink or a line like @AGENTS.md), so there's one file to maintain. Codex, Cursor, Copilot and others read AGENTS.md; Claude Code reads CLAUDE.md.

How long is a typical Swift AGENTS.md?

The median is 950 words in these 37 files; across all 731 files we read, half are between 444 and 1,727 words.

How this is counted: the GitHub repos of open-source products built with Swift, pushed to in the 180 days before 2026-10-28. We read each repo's AGENTS.md, CLAUDE.md and other agent files; what's published here is counts and links, not their text. All files, by the numbers.