Skip to content
Development
Skill

/axiom-audit-resize

Use when the user mentions window resizing support, resizable-window readiness, iPhone Mirroring compatibility, scene-lifecycle migration checking, or preparing an app for the 27-cycle resizing model.

From plugin
axiom
1.1k66 skills1 MCP
Install
$ npx -y skills add charleswiltgen/axiom --skill axiom-audit-resize --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/axiom-audit-resize

Context preview

The summary Claude sees to decide when to auto-load this skill.

Use when the user mentions window resizing support, resizable-window readiness, iPhone Mirroring compatibility, scene-lifecycle migration checking, or preparing an app for the 27-cycle resizing model.

SKILL.md

axiom-audit-resize.SKILL.md
name: axiom-audit-resize
description: Use when the user mentions window resizing support, resizable-window readiness, iPhone Mirroring compatibility, scene-lifecycle migration checking, or preparing an app for the 27-cycle resizing model.
license: MIT
disable-model-invocation: true

Resize Readiness Auditor Agent

You are an expert at detecting resize-readiness violations across UIKit code, Info.plist, and the scene manifest. The 27 cycle makes every app resizable — iPhone apps included (iPhone Mirroring on the Mac, iPhone-only apps on iPad) — and makes the scene-based life cycle mandatory. This audit finds what breaks under that model, from launch-blocking configuration to layouts and rendering surfaces that assume a fixed canvas.

**Division of labor**: SwiftUI-side layout adaptivity (GeometryReader misuse, size-class misuse, identity loss, hardcoded breakpoints) is `swiftui-layout-auditor`'s territory. This auditor owns the UIKit, configuration, scene-lifecycle, rendering-surface, and Mirroring-input surface. Where a project mixes both, report the overlap in Cross-Auditor Notes rather than duplicating findings.

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.
  • If your grep lacks PCRE classes (`\s`, `\w`), translate them to POSIX (`[[:space:]]`, `[[:alnum:]_.]`) and verify the translation against a known-positive string before trusting empty results.
  • Run the Read verifications each section calls for.
  • "Build a mental model" 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 the App's Windowing Model

Step 1: Scene Lifecycle Adoption

Glob: **/Info.plist, **/*.swift
Grep for:
  - `UIApplicationSceneManifest` in plist files
  - `UISceneDelegate`, `UIWindowSceneDelegate` — scene adoption
  - `UIApplicationDelegate` — app-delegate-only apps
  - `@main` and `WindowGroup` (separate greps; confirm they belong to an `App` struct via Read) — SwiftUI lifecycle (satisfies the scene requirement)
  - `@UIApplicationDelegateAdaptor` — SwiftUI lifecycle with an adapted app delegate (NOT app-delegate-only)
  - `UIApplicationSupportsMultipleScenes` — multi-window opt-in
  - `sceneDidDisconnect`, `stateRestorationActivity` — lifecycle depth

Step 2: Geometry Sources

Grep for:
  - `UIScreen.main` — deprecated global screen
  - `windowScene` — scene-relative geometry (the good sign)
  - `effectiveGeometry` — modern scene geometry
  - `traitCollection.displayScale` — correct scale source
  - `interfaceOrientation`, `UIDevice.current.orientation` — orientation reads
  - `userInterfaceIdiom` — device-identity checks

Step 3: Rendering and Input Surfaces

Grep for:
  - `CAMetalLayer`, `MTKView`, `drawableSize` — GPU surfaces
  - `SKView`, `scaleMode` — SpriteKit scenes
  - `UIPanGestureRecognizer`, `allowedScrollTypesMask` — custom pan handling
  - `UIApplicationSupportsIndirectInputEvents` in plist files

Output

Write a brief **Windowing Model Map** (8-10 lines) summarizing:

  • Lifecycle: SwiftUI-lifecycle / scene-based / app-delegate-only / mixed
  • Multi-window: declared / single-scene
  • Geometry sources: scene-relative vs UIScreen.main counts
  • Orientation dependence: none / preference-level / layout-deriving
  • Rendering surfaces present (Metal, SpriteKit, none)
  • Custom gesture surface (pan/pinch/rotate recognizers present?)

Present this map in the output before proceeding.

Phase 2: Detect Known Anti-Patterns

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

1. App-Delegate-Only Lifecycle (CRITICAL — launch-blocking)

**Pattern**: `UIApplicationDelegate` present with no `UISceneDelegate`/`UIWindowSceneDelegate` and no `UIApplicationSceneManifest` **Search**: confirm the Phase 1 Step 1 greps together. A SwiftUI-lifecycle app (`@main` on an `App` struct) passes automatically — including one whose `UIApplicationDelegate` enters via `@UIApplicationDelegateAdaptor`; only flag when the app delegate is the *whole* lifecycle **Issue**: Built against the 27 SDK, an app with only an app delegate no longer launches — the scene-based life cycle is mandatory, not opt-in **Fix**: Adopt `UIWindowSceneDelegate` + `UIApplicationSceneManifest` (migration path in axiom-uikit skills/uikit-modernization.md)

2. UIScreen.main Family (CRITICAL)

**Pattern**: Global screen used for layout, scale, or bounds **Search**: `UIScreen\.main\.bounds`, `UIScreen\.main\.scale`, `UIScreen\.main\.nativeBounds`, `UIScreen\.main\b` **Issue**: Returns full-screen values that are wrong in any resized window, Mirroring, Split View, or on an external display **Fix**: `window.windowScene?.screen`, the view's own `bounds`, `traitCollection.displayScale`, or `windowScene.effectiveGeometry.coordinateSpace.bounds` **Cross-Auditor**: swiftui-layout-auditor also detects this in SwiftUI files — expect file:line-deduped overlap in mixed codebases

3. UIRequiresFullScreen (CRITICAL)

**Pattern**: `UIRequiresFullScreen` set to true in Info.plist **Search**: `UIRequiresFullScreen` in `*.plist` files **Issue**: Deprecated (TN3192) and no longer opts out of resizing — at 27 it only switches games to discrete snap-resizing. Fixed-canvas layouts break anyway. **Fix**: Remove the key; set `windowScene.sizeRestrictions?.minimumSize` as the usable floor; adapt to arbitrary scene sizes **Cross-Auditor**: also detected by swiftui-layout-auditor — expect file:line-deduped overlap

4. Orientation-Derived Layout (HIGH)

**Pattern**: `interfaceOrientation` or `UIDevice.current.orientation` feeding layout decisions **Search**: `interfaceOrient

Read more
Ships withaxiom

Battle-tested skills, agents, and tools for modern Apple OS development — Swift 6, SwiftUI, Liquid Glass, Apple Intelligence, and more. Supports Claude Code, Codex, and all other popular coding harnesses and AI-savvy IDEs.

Get the whole plugin