Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/moasq/ios-dev-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/moasq/ios-dev-agent/mvvm-architecture)<a href="https://agentmods.dev/rules/moasq/ios-dev-agent/mvvm-architecture"><img src="https://agentmods.dev/badge/rules/moasq/ios-dev-agent/mvvm-architecture/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/moasq/ios-dev-agent/mvvm-architecture"><img src="https://agentmods.dev/badge/rules/moasq/ios-dev-agent/mvvm-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01248 | $0.01248 |
| Opus 5 | $0.00624 | $0.00624 |
| Sonnet 5 | $0.00250 | $0.00250 |
| Haiku 4.5 | $0.00125 | $0.00125 |
Grade A, and why
mvvm-architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MVVM Architecture Rules
Loadable Enum (Required for Async State)
Every app that performs async operations MUST include this enum as Shared/Loadable.swift:
// Shared/Loadable.swift
enum Loadable<T> {
case notInitiated
case loading
case success(T)
case failure(Error)
var value: T? {
if case .success(let v) = self { return v }
return nil
}
var error: Error? {
if case .failure(let e) = self { return e }
return nil
}
var isLoading: Bool {
if case .loading = self { return true }
return false
}
}
Rule: All async operations MUST use Loadable<T> for state tracking — never use var isLoading: Bool + var errorMessage: String?.
ViewModel Pattern (In-Memory Default)
Every ViewModel follows this exact pattern:
import SwiftUI
@Observable
@MainActor
class NotesListViewModel {
var notes: [Note] = Note.sampleData
var searchText = ""
var filteredNotes: [Note] {
if searchText.isEmpty { return notes }
return notes.filter { $0.title.localizedCaseInsensitiveContains(searchText) }
}
func addNote(title: String) {
let note = Note(title: title)
notes.insert(note, at: 0)
}
func deleteNote(_ note: Note) {
notes.removeAll { $0.id == note.id }
}
}
ViewModel Pattern (Async Data)
When a ViewModel loads data asynchronously, use Loadable<T> and start loading in init():
import SwiftUI
@Observable
@MainActor
class NotesListViewModel {
var notes: Loadable<[Note]> = .loading // Start as .loading — init fires immediately
var searchText = ""
init() {
Task { await loadNotes() }
}
var filteredNotes: [Note] {
guard let allNotes = notes.value else { return [] }
if searchText.isEmpty { return allNotes }
return allNotes.filter { $0.title.localizedCaseInsensitiveContains(searchText) }
}
func loadNotes() async {
notes = .loading
do {
notes = .success(try await fetchNotes())
} catch {
notes = .failure(error)
}
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 164 lines · 1,248 tokens per session scan A 21a5cb29c8aa
mvvm-architecture is a cursor rule published in the GitHub repository moasq/ios-dev-agent (4 stars, last pushed 3mo ago), licensed MIT. It adds 1,248 tokens to every session, about $0.0062 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
nativescript
NativeScript best practices and patterns for mobile applications.
performance-optimization
// Use weak/unowned references appropriately class ViewController: UIViewController { private var timer: Timer?
webkit-browser
Cursor rule "webkit-browser" from duckduckgo/apple-browsers, covering webkit & browser development guidelines, webview configuration, basic webview setup, user scripts management and tab management.
maestro-device-selection
Maestro tests can run on either iPhone or iPad simulators based on tags in the test YAML files. This allows you to test iPad-specific UI layouts and features while maintaining a single test suite.
cursorrules
Kortix is a React Native + Expo app built with TypeScript, NativeWind (Tailwind CSS), and a custom design system.
gradle
Enforce modern Gradle build practices for Java and Android projects, focusing on Kotlin DSL, modularity, version catalogs, and performance optimizations.