swift-unit-test-instructions
CLAUDE.md4 starsChanged 9 months agoMITView on GitHub
Install in .claude/skills/ — they auto-trigger based on your request. Run with /command-name in Claude Code. Invoked by commands or directly by name.
In this repository7 other files it gives its agents.
- swift-architecture-auditSkill
- swift-code-reviewSkill
- swift-networkingSkill
- swift-persistenceSkill
- swift-project-setupSkill
- swift-testingSkill
- swiftui-componentSkill
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Never mark a task complete without running tests and verifying the build
- Very specific: line 17
After any user correction: update tasks/lessons.md to prevent the same mistake
- Distinctive: line 18
When given a bug: fix it autonomously — point at logs, errors, failing tests, then resolve
- Distinctive: line 26
If something is hard to test, the architecture needs improvement — not the test.
- Very specific: line 46
Run with /command-name in Claude Code.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — Swift / SwiftUI / UIKit Project
Project Configuration
<!-- Fill these in when starting or onboarding to a project -->- Project Name: [MyApp]
- Testing Mode: [enterprise | indie]
- UI Framework: [SwiftUI | UIKit | Both]
- Min iOS Version: [17.0]
- Architecture: MVVM
Workflow
- Enter plan mode for any non-trivial task (3+ steps or architectural decisions)
- Never mark a task complete without running tests and verifying the build
- After any user correction: update
tasks/lessons.mdto prevent the same mistake - When given a bug: fix it autonomously — point at logs, errors, failing tests, then resolve
Core Principles
- Simplicity first. Minimal code impact. One thing at a time.
- Thin UI layers. Business logic never belongs in Views or ViewControllers.
- If something is hard to test, the architecture needs improvement — not the test.
Available Skills
Install in .claude/skills/ — they auto-trigger based on your request.
| Skill | Triggers on |
swift-project-setup | "new project", "scaffold", "setup app" |
swift-testing | "write tests", "add unit tests", "test this" |
swift-architecture-audit | "audit codebase", "why is this untestable", "onboard" |
swiftui-component | "create view", "add screen", "build UI" |
swift-networking | "add networking", "create API layer" |
swift-persistence | "add CoreData", "set up SwiftData", "persist data" |
swift-code-review | "review this", "check this PR" |
Commands
Run with /command-name in Claude Code.
| Command | What it does |
/swift-feature | Full feature workflow: analysis → confirm → implement → build |
/swift-build | Build validation (xcodebuild or swift build) |
/swift-arch-check | Read-only architecture audit with structured report |
Agents
Invoked by commands or directly by name.
| Agent | Role |
swift-staff-engineer | Skeptical senior reviewer — finds issues before they ship |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

