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/jeremieb/swift-unit-test-instructionsWrote 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/commands/jeremieb/swift-unit-test-instructions/swift-arch-check)<a href="https://agentmods.dev/commands/jeremieb/swift-unit-test-instructions/swift-arch-check"><img src="https://agentmods.dev/badge/commands/jeremieb/swift-unit-test-instructions/swift-arch-check/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/commands/jeremieb/swift-unit-test-instructions/swift-arch-check"><img src="https://agentmods.dev/badge/commands/jeremieb/swift-unit-test-instructions/swift-arch-check.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.00000 | $0.00568 |
| Opus 5 | $0.00000 | $0.00284 |
| Sonnet 5 | $0.00000 | $0.00114 |
| Haiku 4.5 | $0.00000 | $0.00057 |
Grade A, and why
swift-arch-check 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 9d 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 — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Read-only architecture audit. Scans the project and produces a structured report. Makes NO changes to any file.
Rules
- Read files only — never edit, never write
- If a fix is obvious, describe it in the report but do not apply it
- Cover every layer: structure, MVVM compliance, persistence, networking, concurrency
Steps
1. Detect UI framework
Scan for @main, UIApplicationDelegate, UIHostingController. Determine: SwiftUI / UIKit / Mixed.
2. Check folder structure
Compare against the matching reference:
- SwiftUI →
skills/swift-project-setup/references/structure-swiftui.md - UIKit →
skills/swift-project-setup/references/structure-uikit.md - Mixed →
skills/swift-project-setup/references/structure-mixed.md
Note every deviation: missing folders, files in wrong locations, misnamed groups.
3. Check MVVM compliance
Read 3–5 representative feature files. Flag:
- Business logic inside
VieworViewController - Network or storage calls not behind a protocol
- Missing
ViewModelfor screens with non-trivial state @Stateholding data that belongs in aViewModel
4. Check persistence layer (if present)
Identify whether project uses SwiftData, CoreData, or neither. Flag:
ModelContextorNSManagedObjectContextused directly inViewModelorView- Missing repository abstraction over persistence
- Models not separated from UI layer
5. Check concurrency
Flag:
DispatchQueue.main.asyncinViewModelorServicelayer- Missing
@MainActoron types that update UI state sleep()anywhere- Completion handlers in new code where
async/awaitshould be used
6. Check testability
Flag:
- Dependencies instantiated inside types (
let service = NetworkService()) - No protocol abstraction for external dependencies
ViewModelthat importsSwiftUIorUIKit
7. Output report
# Architecture Audit: [ProjectName]
## Health: [Good / Needs Work / Critical Issues]
## Structure
- [deviation or ✓ Correct]
## MVVM Compliance
- [issue with file:line, or ✓ Compliant]
## Persistence Layer
- [issue with file:line, or ✓ Correct, or — Not used]
## Concurrency
- [issue with file:line, or ✓ Correct]
## Testability
- [issue, or ✓ Testable]
## Priority Fixes
1. [Most critical]
2. [Second]
3. [Third]
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.
- 9d ago First seen · 81 lines · 0 tokens per session scan A b3f64dd04345
swift-arch-check is a command published in the GitHub repository jeremieb/swift-unit-test-instructions (5 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 568 tokens. 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-08-31.
Other commands, from other repositories
reflect
Have an AI agent critique and improve its own work before delivering it, catching errors and gaps a first pass misses. Run like a /reflect command over a draft, plan, or answer.
critique
Get honest, useful critical feedback on any piece of work, with strengths, weaknesses, and how to fix them. A quick /critique command.
pr-description
Write a pull request description that helps reviewers: what changed, why, and how to verify, from a diff.
refactor-code
Suggest refactorings that improve readability and structure without changing behavior, ranked by payoff.
review-my-code
Review code for bugs, security issues, and clarity, with severity-ranked findings and concrete fixes.
review-security
Review code or a design for security weaknesses, ranked by real exploitability rather than by checklist coverage.