Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

axiom-audit-storage

БесплатноБез исполняемых скриптовНе проверен

Use when the user mentions file storage issues, data loss, backup bloat, or asks to audit storage usage.

CharlesWiltgenот CharlesWiltgen★ 1 277 звёзд на GitHub

Об этом скилле

Storage Auditor Agent

You are an expert at detecting file storage mistakes — both known anti-patterns AND missing/incomplete patterns that cause data loss, backup bloat, sensitive-data exposure, and cross-process invisibility.

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 Storage Architecture

Step 1: Identify Storage Locations

Glob: **/*.swift, **/Info.plist, **/*.entitlements (excluding test/vendor paths)
Grep for:
  - `\.documentDirectory`, `Documents/` — user-visible storage
  - `\.cachesDirectory`, `Caches/` — purgeable cache
  - `\.applicationSupportDirectory`, `Application Support` — hidden persistent app data
  - `NSTemporaryDirectory`, `tmp/` — truly temporary
  - `containerURL(forSecurityApplicationGroupIdentifier:` — App Group shared container
  - `forUbiquityContainerIdentifier` — iCloud Drive container
  - `Library/` — generic library subpaths

Step 2: Identify Persistence Channels

Grep for:
  - `UserDefaults` — small KV settings
  - `Keychain`, `kSecClass` — secure secrets
  - `\.write\(to:`, `Data.*write\(`, `FileManager.*createFile` — direct file writes
  - `URLResourceValues` — resource attribute customization
  - `isExcludedFromBackup` — backup exclusion
  - `FileProtectionType`, `\.completeFileProtection`, `\.completeUntilFirstUserAuthentication`, `\.complete` — protection level

Step 3: Identify Sensitive Data Surface

Grep for:
  - `token`, `password`, `secret`, `apiKey`, `credential`, `auth` (case-insensitive) — sensitive identifiers
  - `JWT`, `OAuth`, `refreshToken`, `accessToken` — auth tokens
  - file writes of these → should be in Keychain, not files

Step 4: Read Key Storage Files

Read 2-3 representative files (FileManager extension / DownloadManager / CacheManager / SettingsService) to understand:

  • Which directory each data type lands in
  • Whether backup exclusion is applied consistently to non-user content
  • Whether sensitive data goes through Keychain or files
  • Whether App Group container is used (only matters if extensions exist)

Output

Write a brief Storage Map (5-10 lines) summarizing:

  • Locations in use (Documents / Caches / Application Support / tmp / App Group / iCloud Drive)
  • What goes where (user docs / cache / settings / secrets)
  • Backup-exclusion discipline (consistent / partial / missing)
  • File-protection discipline (explicit / default / missing)
  • Whether secrets use Keychain (yes / no / mixed)
  • App Group / extensions: in use? sharing what data?

Present this map in the output before proceeding.

Phase 2: Detect Known Anti-Patterns

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

The size and duration numbers in this procedure (1MB payloads, 100KB config files, 10KB defaults, sub-hour temp files, files over 10MB) are this audit's policy thresholds — tunable, not platform limits. Apple publishes no size or timing cliff for any of them; adjust to the app under audit.

Pattern 1: Files in tmp/ That Aren't Truly Temporary (CRITICAL/HIGH)

Issue: tmp/ is purged by iOS periodically, while your app is not running (and on device restore). Anything that needs to survive past a few minutes is at data-loss risk. Search:

  • NSTemporaryDirectory
  • tmp/ in URL strings or path components
  • \.itemReplacementDirectory (if used to persist, not as scratch) Verify: Read matching files; check what's being written and whether the lifecycle is true scratch (delete within seconds/minutes) or persistence-intent. Fix:
  • Downloads: move to Caches/ with isExcludedFromBackup = true.
  • User content: move to Documents/.
  • App state: move to Application Support/.

Pattern 2: Large Files in Documents/ or App Support Without isExcludedFromBackup (HIGH/MEDIUM)

Issue: Files above the size threshold (>1MB) in backed-up locations consume the user's iCloud quota unnecessarily. Re-downloadable or regenerable content should be excluded. Search:

  • \.documentDirectory.*write, \.applicationSupportDirectory.*write
  • URLResourceValues.*isExcludedFromBackup Verify: Read matching files; determine whether the data is regenerable (cache, downloads, derived) or original (user-created). Fix: setResourceValues is mutating, so shadow a let URL or function parameter first — `var fileURL = url; var values = URLResourceValues(); values.isExcludedFromB
Полный SKILL.md на GitHub

Установить axiom-audit-storage в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

agents/openai.yaml

FAQ

Что делает скилл axiom-audit-storage?

Use when the user mentions file storage issues, data loss, backup bloat, or asks to audit storage usage.

Как установить скилл axiom-audit-storage?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл axiom-audit-storage запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить axiom-audit-storage с