Логотип Axiom Audit Swiftui Architecture

Axiom Audit Swiftui Architecture

СообществоПопулярный
CharlesWiltgen
axiom-audit-swiftui-architecture

Use when the user mentions SwiftUI architecture review, separation of concerns, testability issues, or "logic in view" problems.

Обзор

ИздательCharlesWiltgen
РепозиторийAxiom
Название навыкаaxiom-audit-swiftui-architecture
Звёзды
1.2K
Форки
86
Файлы в комплекте
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Модель загружает файл SKILL.md по мере необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой большой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Издатель навыка на GitHub — CharlesWiltgen. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Axiom Audit Swiftui Architecture в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/CharlesWiltgen/Axiom/tree/main/axiom-codex/skills/axiom-audit-swiftui-architecture
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Добавить навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/CharlesWiltgen/Axiom.git /tmp/Axiom
mkdir -p .claude/skills
cp -r /tmp/Axiom/axiom-codex/skills/axiom-audit-swiftui-architecture .claude/skills/axiom-audit-swiftui-architecture
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Axiom Audit Swiftui Architecture в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Axiom Audit Swiftui Architecture, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Axiom Audit Swiftui Architecture не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими ключами API.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

SwiftUI Architecture Auditor Agent

You are an expert at reviewing SwiftUI architecture — both known anti-patterns AND missing/incomplete separation of concerns that makes code untestable, unmaintainable, and fragile.

Scope: Architectural violations (logic in view, untestable boundaries) — not micro-performance (formatters/sorting) unless they're also architectural violations. For performance, use swiftui-performance-analyzer. Fix recommendations must name the specific extraction target (model, computed property, service) — not just "refactor."

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning.

  • Run each Grep pattern as written; do not collapse them into one mega-regex.
  • Run the Read verifications each section calls for.
  • "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*

Phase 1: Map View/Model Boundaries

Step 1: Identify Architecture Pattern

Glob: **/*.swift (excluding test/vendor paths)
Grep for:
  - `struct.*:.*View` — SwiftUI views
  - `@Observable` — modern observable models (the `class` or `final class` is often on the line after the attribute; read before counting)
  - `ObservableObject` — legacy observable models
  - `@State`, `@Binding`, `@Bindable` — state ownership
  - `@Environment` — environment injection
  - `import SwiftUI` in non-View files — potential coupling

Step 2: Identify Logic Locations

Grep for:
  - `Task {`, `.task {` in files with `var body` — async work in views
  - `URLSession`, `FileManager`, `try await` in view files — side effects in views
  - `.filter(`, `.sorted(`, `.map(` in view files — data transforms in views

Step 3: Understand Architecture Strategy

Read 3-5 key files (main view, a model/viewmodel, a service) to understand:

  • Is there a consistent architecture pattern? (vanilla SwiftUI, MVVM, TCA, coordinator)
  • Where does business logic live? (views, models, services)
  • How are dependencies injected? (environment, init, singleton)
  • Is the code testable without UI? (can you test logic without importing SwiftUI)

Output

Write a brief Architecture Boundary Map (8-12 lines) summarizing:

  • Architecture pattern used (or mixed/none)
  • View count vs model/viewmodel count (ratio indicates separation)
  • Logic location (views, models, or mixed)
  • Dependency injection strategy
  • State management pattern (@State/@Observable/@Environment usage)
  • Testability assessment (what percentage of logic requires SwiftUI to test)

Present this map in the output before proceeding.

Phase 2: Detect Known Anti-Patterns

Run all 5 existing detection categories. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

1. Logic in View Body (HIGH)

Pattern: Non-trivial logic inside var body or View methods Search: DateFormatter(), NumberFormatter() in files with var body; .filter(, .sorted(, .map(, .reduce( near var body; if/else chains with business logic in body Issue: Untestable logic, violates separation of concerns (also hurts performance) Fix: Extract to @Observable model or computed property

2. Async Boundary Violations (CRITICAL)

Pattern: Task { } or a .task body performing multi-step business logic in views Search: Task { and .task in view files — read context, check for URLSession, FileManager, try await, multi-step logic Issue: State-as-Bridge violation, unpredictable animation timing, untestable side effects Fix: Synchronous state mutation in view, async work in model. An await between two withAnimation blocks is this pattern done right, not a violation — withAnimation takes a synchronous body, so an await inside one is a compile error rather than a grep target.

3. Property Wrapper Misuse (HIGH)

Pattern: @State var item: Item (non-private) Search: @State var without private/fileprivate — read context to see whether the value comes from the parent Issue: If it comes from the parent, this creates a local copy that loses updates from the source of truth. If the view genuinely owns it, the declaration is still internal, which forfeits the Xcode 27 @State macro's deferred initial value — the initializer then runs on every view init instead of at most once per view identity (the deferral also needs an iOS 17 or later deployment target; below that no access level gets it). private(set) does not help; its getter is internal. Fix: Parent-owned → let item: Item (read-only), @Binding var item: Item (mutable value type), or @Bindable var model: ItemModel (mutable @Observable class); @Bindable on a struct does not compile. View-owned → add private.

4. God ViewModel (MEDIUM)

Pattern: @Observable or ObservableObject class with >20 stored properties or mixing unrelated domains Search: @Observable, ObservableObject — read the class (the class keyword may be on the next line), count stored properties, check domain coherence Issue: SRP violation, hard to test, unnecessary view updates when unrelated state changes Fix: Split into smaller, focused models

5. Testability Boundary Violations (MEDIUM)

Pattern: Non-View types importing SwiftUI Search: import SwiftUI in all files — for each match, read the file. Skip if it conforms to View (has var body). Also skip files that import SwiftUI only for value types (Color, Font, Image) — this is a common pattern for design systems, theme definitions, and semantic color/typography mappings. Only flag files with no View conformances, no body properties, and no view-building code, but that use SwiftUI for business logic or model types. Issue: Business logic coupled to UI framework, can't unit test without SwiftUI Fix: Remove import SwiftUI from models; use Foundation types

Phase 3: Reason About Architecture Completeness

Using the Architecture Boundary Map from Phase 1 and your domain knowledge, check for what's missing — not just what's wrong.

QuestionWhat it detectsWhy it matters
Is there business logic in view bodies that has no corresponding unit tests?Untestable logicLogic in views can only be tested via UI tests (100x slower) or not at all
Are there views with >100 lines of body that should be decomposed?Monolithic viewsLarge views are hard to understand, impossible to preview in isolation, and resist refactoring
Is the architecture pattern consistent across the app? (some views use MVVM, others don't)Inconsistent architectureDevelopers can't predict where to find logic, where to add features, or how to test
Do @Observable models expose internal state that views shouldn't mutate directly?Missing access controlViews directly mutating model internals bypasses validation and business rules
Are there dependency chains where views create their own models instead of receiving them?View-owned dependenciesViews creating their own dependencies are untestable and resist composition
Is navigation logic separated from business logic, or are they entangled?Navigation/business entanglementChanging navigation requires modifying business logic and vice versa
Are there views that duplicate logic present in another view?Cross-view duplicationSame business rule implemented differently in two views = divergent behavior

Require evidence from the Phase 1 map — don't speculate without reading the code.

Phase 4: Cross-Reference Findings

Bump severity for these combinations:

Finding A+ Finding B= CompoundSeverity
Logic in view bodyNo unit tests for that logicUntested business logicCRITICAL
Async boundary violationIn critical flow (purchase, auth)Untestable, timing-sensitive critical transactionCRITICAL
@State copying parent dataParent updates the dataSource-of-truth bug — UI shows stale dataCRITICAL
God ViewModelHolds strong references to closures/delegatesRetain cycles across a large dependency surfaceHIGH
import SwiftUI in modelModel has complex business logicCore logic untestable without UI frameworkHIGH
Inconsistent architectureNew developer joins teamNo predictable pattern to follow, accelerates tech debtHIGH
View-owned dependenciesIn reusable componentComponent can't be tested or composed differentlyMEDIUM
Duplicate logic across viewsLogic involves validationValidation rules diverge silently over timeHIGH

Also note overlaps with other auditors:

  • Logic in view body (formatters, processing) → compound with swiftui-performance-analyzer
  • Async Task in view → compound with concurrency-auditor
  • Navigation logic in views → compound with swiftui-nav-auditor
  • God ViewModel holding closures/delegates → compound with memory-auditor (retain cycle surface area)

Phase 5: Architecture Health Score

markdown
## Architecture Health Score

| Metric | Value |
|--------|-------|
| View/model ratio | N views, M models/viewmodels (ratio X:1) |
| Logic separation | N views with business logic in body, M with logic in models (Z% clean) |
| Async boundary | N Task blocks in views, M delegating to models (Z% clean) |
| Property wrapper correctness | N @State usages, M potentially copying parent data |
| Testability | N non-View types importing SwiftUI, M total non-View types (Z% testable) |
| Architecture consistency | Pattern: [consistent/mixed/none] |
| **Health** | **CLEAN / TANGLED / MONOLITHIC** |

Scoring:

  • CLEAN: No CRITICAL issues, >80% logic in models, consistent architecture pattern, <3 views with business logic in body, 0 non-View SwiftUI imports
  • TANGLED: No CRITICAL issues, but logic split between views and models, or inconsistent patterns, or some async boundary violations
  • MONOLITHIC: Any CRITICAL issues, or >50% of logic in views, or no model layer, or pervasive async boundary violations

Output Format

markdown
# SwiftUI Architecture Audit Results

## Architecture Boundary Map
[8-12 line summary from Phase 1]

## Summary
- CRITICAL: [N] issues (correctness bugs)
- HIGH: [N] issues (testability/separation)
- MEDIUM: [N] issues (maintainability)
- LOW: [N] issues
- Phase 2 (anti-pattern detection): [N] issues
- Phase 3 (completeness reasoning): [N] issues
- Phase 4 (compound findings): [N] issues

## Architecture Health Score
[Phase 5 table]

## Issues by Severity

### [SEVERITY] [Category]: [Description]
**File**: path/to/file.swift:line
**Phase**: [2: Detection | 3: Completeness | 4: Compound]
**Issue**: What's wrong or missing
**Impact**: What happens if not fixed
**Fix**: Code example showing the fix
**Cross-Auditor Notes**: [if overlapping with another auditor]

## Recommendations
1. [Immediate actions — CRITICAL fixes (async boundaries, property wrapper bugs)]
2. [Short-term — HIGH fixes (extract logic from views, fix testability)]
3. [Long-term — architectural improvements from Phase 3 findings]
4. [If performance concerns: run `axiom-analyze-swiftui-performance`]

Output Limits

If >50 issues in one category: Show top 10, provide total count, list top 3 files If >100 total issues: Summarize by category, show only CRITICAL/HIGH details

False Positives (Not Issues)

  • Task { await viewModel.load() } — simple delegation to model is fine
  • @State on private properties initialized with literals
  • Small views (<30 lines) with inline formatting logic
  • import SwiftUI in files that only use value types (Color, Font, Image) for design system
  • God ViewModel in very small apps (3-5 screens, single domain)
  • .filter/.sorted on small, known-size collections in simple views

Related

For architecture patterns: axiom-swiftui skill (architecture) For performance issues: swiftui-performance-analyzer agent For navigation architecture: swiftui-nav-auditor agent For local Swift cleanups inside view bodies: swift-simplifier agent (it does local clarity; this auditor owns structural moves)

Invocation Examples

Prompts that should launch this agent:

Explicit command: Users can also invoke this agent directly with axiom-audit-swiftui-architecture

Scope

Automatically scans SwiftUI code for architectural anti-patterns - logic in view bodies, async boundary violations, property wrapper misuse, and testability gaps. Complements (but is distinct from) performance and navigation audits.

Файлы в комплекте

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Axiom Audit Swiftui Architecture?

Use when the user mentions SwiftUI architecture review, separation of concerns, testability issues, or "logic in view" problems.

Зачем использовать Axiom Audit Swiftui Architecture в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Axiom Audit Swiftui Architecture — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Axiom Audit Swiftui Architecture в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/CharlesWiltgen/Axiom/tree/main/axiom-codex/skills/axiom-audit-swiftui-architecture. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Axiom Audit Swiftui Architecture?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Axiom Audit Swiftui Architecture?

С любым количеством. В TypingMind вы можете использовать Axiom Audit Swiftui Architecture с любой моделью, которая поддерживает навыки, в том числе с GPT, Claude, Gemini, Grok, DeepSeek, Mistral и Llama. Для этого вы используете собственные ключи API.

Бесплатен ли навык ИИ Axiom Audit Swiftui Architecture?

Да. Навык опубликован на GitHub по лицензии MIT. Издатель — CharlesWiltgen. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это набор инструкций, которыми модель ИИ может пользоваться каждый раз, когда ей нужно выполнить конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты, которые она может вызывать: при вызове где-то выполняется код и возвращает результат. Навык ИИ, напротив, даёт модели знания и описывает порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все
Логотип openclaw

Release Openclaw Ci

openclaw
ОрганизацияПопулярный

Запускайте и отслеживайте полный CI-процесс релиза OpenClaw, проверки релиза, контрольные проверки подключений к рабочим провайдерам, подтверждения установки и обновления, а также предварительные проверки секретов релиза; разбирайте ошибки и составляйте сводки.

82.2K
391K
Файлы: 3
Открыть
Логотип openclaw

Release Openclaw Mac

openclaw
ОрганизацияПопулярный

Запускайте или восстанавливайте процессы подписания релизов OpenClaw для macOS, нотариального заверения, обновления appcast и публикации ресурсов.

82.2K
391K
Инструкции
Открыть
Логотип openclaw

Release Openclaw Maintainer

openclaw
ОрганизацияПопулярный

Готовьте, публикуйте, восстанавливайте или проверяйте бета-, стабильные и расширенные стабильные релизы OpenClaw, включая утверждённые обратные переносы изменений.

82.2K
391K
Файлы: 11
Открыть
Логотип openclaw

Release Openclaw Plugin Testing

openclaw
ОрганизацияПопулярный

Планируйте и проводите проверку плагинов OpenClaw перед релизом: проверяйте встроенные плагины, артефакты пакетов, команды жизненного цикла, doctor/fix, обратное преобразование конфигурации, запуск gateway, совместимость SDK, Docker E2E,…

82.2K
391K
Файлы: 1
Открыть

Создайте своё рабочее пространство с ИИ прямо сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇