agentleFS
jeremiebjeremieb/swift-unit-test-instructions/CLAUDE.md

swift-unit-test-instructions

CLAUDE.md5 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.

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
  1. Distinctive:

    Never mark a task complete without running tests and verifying the build

    line 16
  2. Very specific:

    After any user correction: update tasks/lessons.md to prevent the same mistake

    line 17
  3. Distinctive:

    When given a bug: fix it autonomously — point at logs, errors, failing tests, then resolve

    line 18
  4. Distinctive:

    If something is hard to test, the architecture needs improvement — not the test.

    line 26
  5. Very specific:

    Run with /command-name in Claude Code.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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.md to 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.

SkillTriggers 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.

CommandWhat it does
/swift-featureFull feature workflow: analysis → confirm → implement → build
/swift-buildBuild validation (xcodebuild or swift build)
/swift-arch-checkRead-only architecture audit with structured report

Agents

Invoked by commands or directly by name.

AgentRole
swift-staff-engineerSkeptical senior reviewer — finds issues before they ship

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.