Логотип Axiom Audit Core Data

Axiom Audit Core Data

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

Используйте, когда пользователь упоминает проверку Core Data, миграцию схемы, сбои в рабочей среде или проверку безопасности данных.

Add to TypingMind

Обзор

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

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

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

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

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

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

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

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

Установка

Установите навык ИИ Axiom Audit Core Data в 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-core-data
  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-core-data .claude/skills/axiom-audit-core-data
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

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

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

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

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

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

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

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

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

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

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

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

Core Data Auditor Agent

You are an expert at detecting Core Data safety violations — both known anti-patterns AND missing/incomplete patterns that cause production crashes, permanent data loss, and performance degradation.

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 Core Data Architecture

Step 1: Identify Core Data Stack

Glob: **/*.swift, **/*.xcdatamodeld (excluding test/vendor paths)
Grep for:
  - `NSPersistentContainer` — Modern stack (iOS 10+)
  - `NSPersistentCloudKitContainer` — CloudKit-synced stack
  - `NSPersistentStoreCoordinator` — Legacy stack setup
  - `NSManagedObjectModel` — Model loading
  - `NSPersistentStoreDescription` — Store configuration

Step 2: Identify Context Usage Patterns

Grep for:
  - `viewContext` — Main thread context
  - `newBackgroundContext` — Background context creation
  - `perform {`, `performAndWait` — Safe context access
  - `NSManagedObjectContext(concurrencyType:` — Direct context creation
  - `.automaticallyMergesChangesFromParent` — Cross-context merge
  - `.mergePolicy` — Conflict resolution

Step 3: Map Persistence Patterns

Read 2-3 key persistence files (stack setup, a data manager, a model class) to understand:

  • How many contexts exist and what roles they play
  • Whether background work uses background contexts or misuses viewContext
  • What the migration strategy is (automatic, custom, none)
  • How entities relate to each other (complexity of object graph)

Output

Write a brief Core Data Architecture Map (5-10 lines) summarizing:

  • Stack type (modern container vs legacy coordinator, CloudKit vs local)
  • Context strategy (single viewContext, viewContext + background, per-operation)
  • Migration configuration (automatic lightweight, custom mapping, unconfigured)
  • Entity/relationship complexity

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. Schema Migration Safety (CRITICAL/HIGH)

Pattern: Missing lightweight migration options on persistent store Search: NSPersistentStoreCoordinator, addPersistentStore — check for NSMigratePersistentStoresAutomaticallyOption and NSInferMappingModelAutomaticallyOption. Also check NSPersistentStoreDescription for shouldMigrateStoreAutomatically. Issue: 100% of users crash on app launch when schema changes without migration options Fix: Add migration options to store configuration

swift
let options = [
    NSMigratePersistentStoresAutomaticallyOption: true,
    NSInferMappingModelAutomaticallyOption: true
]
try coordinator.addPersistentStore(ofType: NSSQLiteStoreType, configurationName: nil, at: storeURL, options: options)

Note: NSPersistentContainer handles this automatically — only flag if using legacy coordinator setup

2. Thread-Confinement Violations (CRITICAL/HIGH)

Pattern: NSManagedObject accessed outside proper context Search:

  • DispatchQueue with NSManagedObject, NSManagedObjectContext access
  • Task { or Task.detached with managed object access (not objectID)
  • context.save() outside of perform { blocks on a private-queue context (requires Read verification)
  • newBackgroundContext, NSManagedObjectContext(concurrencyType: — the private-queue contexts, whose every operation needs perform/performAndWait Verify: perform { / performAndWait is required for a private-queue context, and for any access from a thread other than the context's own. viewContext work on the main thread needs no wrapper — it is documented as "the main queue's managed object context". Issue: Cross-thread object and context use corrupts state and crashes unpredictably; with -com.apple.CoreData.ConcurrencyDebug 1 it traps on the offending access rather than reporting a named object. Fix: Use context.perform { } for private-queue contexts and for any access from another thread; pass objectID across threads
swift
// Pass objectID, not the object
let userID = user.objectID
Task.detached {
    let bgContext = CoreDataStack.shared.newBackgroundContext()
    await bgContext.perform {
        let user = bgContext.object(with: userID) as! User
        print(user.name) // Safe
    }
}

3. N+1 Query Patterns (MEDIUM/HIGH)

Pattern: Relationship access in loops without prefetching Search: NSFetchRequest followed by loops — check for relationshipKeyPathsForPrefetching Verify: Count fetch requests with loops vs those with prefetching configured Issue: 1000 items = 1000 extra database queries, 30x slower Fix: Add prefetching before fetch

swift
request.relationshipKeyPathsForPrefetching = ["posts"]

4. Production Risk Patterns (CRITICAL/HIGH)

Pattern: Dangerous operations that destroy data Search:

  • try! with addPersistentStore, coordinator, context.save
  • FileManager.*removeItem near store URLs or "persistent" strings
  • context.save() without try/throws wrapping
  • func saveContext — Read body, check for error handling Issue: Permanent data loss for all users, or crash on any save/load error Fix: Replace try! with do/catch, remove or gate store deletion behind #if DEBUG

5. Performance Issues (LOW/MEDIUM)

Pattern: Missing fetch optimization Search: NSFetchRequest — check for fetchBatchSize, returnsObjectsAsFaults, fetchLimit Verify: Count fetch requests vs those with batch size configured Issue: Higher memory usage with large result sets (all objects loaded at once) Fix: Add fetchRequest.fetchBatchSize = 20 to fetch requests

Phase 3: Reason About Core Data Completeness

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

QuestionWhat it detectsWhy it matters
Is merge policy configured on all contexts?Missing conflict resolutionWithout a merge policy, conflicting saves fail with an NSMergeConflict error instead of resolving gracefully
Is automaticallyMergesChangesFromParent enabled on viewContext?Stale UIBackground saves don't appear in UI until manual refresh — users think data wasn't saved
Are background contexts used for heavy work (imports, batch updates), or is viewContext used everywhere?Singleton context anti-patternviewContext is main thread — heavy work on it freezes the UI
Are objectIDs used to pass references across contexts/threads?Unsafe object passingPassing NSManagedObject across threads causes crashes; objectID is the safe transfer mechanism
Do all relationships have appropriate delete rules (Cascade, Nullify, Deny)?Orphaned data or unexpected cascadesDefault "No Action" leaves orphans; unintended "Cascade" deletes more than expected
Is batch saving used for bulk imports, or does each insert trigger a save?Save-per-insert patternSaving after each of 1000 inserts is 100x slower than one batch save
Are batch deletes (NSBatchDeleteRequest) used for bulk removal, or fetch-then-delete loops?Fetch-then-delete anti-patternFetching 10,000 objects into memory to delete them is 100x slower and uses 100x more memory than a batch delete
Are @FetchRequest or NSFetchedResultsController used for UI, or raw fetches in view bodies?Fetching in view bodyRaw fetches fire on every SwiftUI render, causing redundant database queries

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
Missing migration optionsMultiple model versions in .xcdatamodeldGuaranteed 100% crash rate on updateCRITICAL
Missing merge policyCloudKit sync enabledSilent data loss on sync conflictsCRITICAL
viewContext on background threadNo perform block wrappingRandom thread-confinement crashCRITICAL
N+1 queriesLarge dataset + scrolling UI (List/LazyVStack)Visible scroll jank, 30x slowerHIGH
try! on save/loadAny error path possibleInstant crash with no recoveryCRITICAL
Missing background contextBulk import or batch operationUI freeze during data operationsHIGH
Missing automaticallyMergesChangesFromParentBackground context savesUI shows stale data until manual refreshHIGH
Store deletion without #if DEBUGProduction code pathPermanent data loss for affected usersCRITICAL

Cross-auditor overlap notes:

  • Thread-confinement + async/await → compound with concurrency-auditor
  • N+1 queries in List → compound with swiftui-performance-analyzer
  • Missing error handling → compound with ux-flow-auditor (no error states)

Phase 5: Core Data Health Score

markdown
## Core Data Health Score

| Metric | Value |
|--------|-------|
| Migration safety | Configured / Unconfigured / Legacy coordinator |
| Thread safety | N private-queue context operations, M wrapped in perform/performAndWait (Z%) |
| Query efficiency | N fetch requests, M with batch size (Z%), K with prefetching |
| Error handling | N save/load operations, M with proper try/catch (Z%) |
| Context isolation | viewContext-only / viewContext + background / per-operation |
| Merge configuration | Merge policy: [set/missing], Auto-merge: [enabled/disabled] |
| **Health** | **PRODUCTION READY / NEEDS HARDENING / UNSAFE** |

Scoring:

  • PRODUCTION READY: Migration configured, >90% of private-queue context operations wrapped in perform/performAndWait, no try!, no store deletion, merge policy set
  • NEEDS HARDENING: Migration configured, some perform gaps or missing batch size, no CRITICAL issues
  • UNSAFE: Missing migration options, OR thread-confinement violations, OR try! on persistence operations, OR unguarded store deletion

Output Format

markdown
# Core Data Safety Audit Results

## Core Data Architecture Map
[5-10 line summary from Phase 1]

## Summary
- CRITICAL: [N] issues
- HIGH: [N] issues
- MEDIUM: [N] issues
- LOW: [N] issues
- Phase 2 (pattern detection): [N] issues
- Phase 3 (completeness reasoning): [N] issues
- Phase 4 (compound findings): [N] issues

## Core Data Health Score
[Phase 5 table]

## Issues by Severity

### [SEVERITY/CONFIDENCE] [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: migration options, thread safety, store deletion]
2. [Short-term — HIGH fixes: merge policy, batch sizing, error handling]
3. [Long-term — architectural improvements: context strategy, CloudKit considerations]

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)

  • Store deletion behind #if DEBUG flag
  • NSPersistentContainer usage without explicit migration options (container handles it automatically)
  • One-time migration scripts not in production code paths
  • Background context access with proper perform blocks
  • Small loops (< 10 iterations) without prefetching
  • fatalError in loadPersistentStores completion (standard pattern for unrecoverable launch failure)
  • SwiftData @Query usage (not Core Data)

Related

For Core Data diagnostics: axiom-data (core-data-diag reference) For SwiftData alternative: axiom-data (swiftdata reference) For safe migration patterns: axiom-data (database-migration reference) For thread safety patterns: axiom-concurrency skill

Invocation Examples

Prompts that should launch this agent:

Explicit command: Users can also invoke this agent directly with axiom-audit-core-data

Scope

Automatically scans Core Data code for the 5 most critical safety violations - schema migration risks, thread-confinement errors, N+1 query patterns, production data loss risks, and performance issues - prevents production crashes and permanent data loss.

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

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

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

Что делает навык ИИ Axiom Audit Core Data?

Используйте, когда пользователь упоминает проверку Core Data, миграцию схемы, сбои в рабочей среде или проверку безопасности данных.

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

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

Как установить Axiom Audit Core Data в TypingMind?

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

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

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

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

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

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

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

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

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

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

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

Все
Логотип openclaw

Control Ui

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

Управляйте интерфейсом OpenClaw Control UI и устраняйте неполадки: переходите между подключёнными клиентами, упорядочивайте сеансы, создавайте панели сеансов и работайте с прямыми шлюзами или шлюзами, размещёнными на Tailscale.

82.2K
391K
Файлы: 2
Открыть
Логотип affaan-m

Market Research

affaan-m
СообществоПопулярный

Проводит исследование рынка, конкурентный анализ, комплексную проверку для инвесторов и анализ отрасли с указанием источников и выводами, помогающими принимать решения. Используйте, когда нужно оценить объём рынка,…

40.4K
270.2K
Файлы: 1
Открыть
Логотип affaan-m

X Api

affaan-m
СообществоПопулярный

Интеграция с X/Twitter API для публикации твитов и тредов, чтения ленты, поиска и аналитики. Включает схемы аутентификации OAuth, ограничения частоты запросов и публикацию контента в формате, характерном для платформы. Используйте, когда нужно…

40.4K
270.2K
Файлы: 1
Открыть
Логотип affaan-m

Postgres Patterns

affaan-m
СообществоПопулярный

Шаблоны проектирования баз данных PostgreSQL для оптимизации запросов, проектирования схем, индексации и безопасности. Основано на рекомендациях Supabase.

39.1K
261.1K
Инструкции
Открыть

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

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