Skip to content
Automation
Skill

/app-resizability

Use when an app's layout must adapt to a window that changes size while the app runs, or when an app must support more than one window. That includes being asked to make an app resizable or support a resizable window, a layout that breaks or does not adapt as the window resizes,

From plugin
homeclaw
17120 skills7 agents4 commands
Install
$ npx -y skills add omarshahine/HomeClaw --skill app-resizability --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/app-resizability

Context preview

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

Use when an app's layout must adapt to a window that changes size while the app runs, or when an app must support more than one window. That includes being asked to make an app resizable or support a resizable window, a layout that breaks or does not adapt as the window resizes,

SKILL.md

app-resizability.SKILL.md
name: app-resizability
description: Use when an app's layout must adapt to a window that changes size while the app runs, or when an app must support more than one window. That includes being asked to make an app resizable or support a resizable window, a layout that breaks or does not adapt as the window resizes, and preparing or optimizing an app for the foldable iPhone Duo, split-screen multitasking, or Stage Manager. Modernizes the app by replacing legacy shared-state APIs with context-appropriate alternatives: mainScreen, interfaceOrientation, userInterfaceIdiom, application and scene lifecycle, and safe area insets.

App Resizability Skill

When to Use

Use this skill whenever the request is about any of the following, whether or not it names an API:

  • Getting an app ready for, or optimizing it for, the foldable iPhone Duo.
  • An app that must adapt when its window changes size while it runs.
  • Split-screen multitasking, Stage Manager, or a resizable scene.
  • Any deprecated API named in the Scope section below.

The request does not have to be technical. "Get my app ready for the iPhone Duo", "optimize this app for the foldable iPhone", and "make this app resize properly" all activate this skill. iPhone Duo is the foldable iPhone, so treat questions about iPhone Duo or the foldable iPhone as the same request. Treat a request about the foldable iPhone Duo as a request for every task in the Task Registry, because a screen that changes size exposes all of them at once.

Purpose

Modernize UIKit apps to behave correctly on modern iOS by:

  • Eliminating references to legacy shared-state APIs
  • Migrating from application lifecycle to scene lifecycle
  • Supporting dynamic scene sizing and multi-window environments

Scope

This skill performs **specific, targeted modernizations** in both **Swift and Objective-C** codebases:

  • Replace legacy shared-state APIs with context-appropriate modern APIs
  • Migrate to scene-based lifecycle
  • Update apps to support a resizable user interface by removing usage of:
  • main screen (`UIScreen.mainScreen`, `UIScreen.main`)
  • interface orientation (`interfaceOrientation`)
  • user interface idiom (`userInterfaceIdiom`, `UI_USER_INTERFACE_IDIOM()`)
  • assumptions of symmetric safe areas (`safeAreaLayoutGuide`, `safeAreaInsets`)
  • application lifecycle in place of scene lifecycle (`UIApplicationDelegate`)

Core Principles

1. **Closest to consumer** — Prefer information nearest the point of use (e.g., view's trait collection over window's). 2. **Always apply a replacement when the target API is present.** A TODO alone is a failure. **An empty diff for a file containing the target API is also a failure.** If the file contains the target deprecated API and a concrete replacement is feasible under any pattern in the active task's reference file, apply it. Only skip when the target API appears exclusively inside dead code (`#if 0`/`#endif`). When uncertain between two valid replacements, pick the one that best fits the user's request rather than producing an empty diff. **Never silently skip a file**: if you are unwilling to apply a change, talk to the user about possible options — never produce no output for it. **Do not get stuck weighing edge cases on simple files; when the substitution is obvious, apply it and move on.** 3. **TODOs must be actionable.** State why the change is needed, what the replacement would look like, and any lifecycle or threading concerns. Place the TODO on its own line above the unchanged code, never inline. A vague TODO ("fix this later") is worse than none, because it consumes review attention and informs nobody.

**Indent every line of an inserted comment to match the line it precedes.** A continuation line at a different indent leaves the block misaligned. Re-emitting the following line to realign it edits a line you were not asked to touch. 4. **Don't add a redundant TODO when an existing annotation already covers the migration.** If the call site already has a `#pragma clang diagnostic ignored` paired with a bug-report reference, an existing `// TODO`, or a deprecation comment that points at the migration, do not add another one. Only add a new TODO when it provides additional migration guidance not present in the existing annotation. 5. **Ask the user before making a risky code change; fall back to a TODO only when interactive guidance is unavailable.** When a replacement risks breaking callers or changing observable behavior (e.g., changing a method signature in a header that other modules import; substituting `width > height` for orientation when left-vs-right matters), the first move is to ask the user how to proceed. Only when the skill is running non-interactively, or when the user explicitly declines to provide guidance, drop a TODO and move on. This does **not** apply to standard, drop-in safe replacements specified by the active task's reference file — those must be applied per Core Principle 2. 6. **Honor explicit user instructions; otherwise apply the defaults from the task reference file.** When the user asks for a specific approach — a particular attribute, parameter name, parameter position, trait source, or fallback behavior — use that exactly. Don't silently substitute what you consider the modern equivalent. When the user is general ("modernize this app", "fix `UIScreen.main` usages"), apply the defaults from the active task's reference file. 7. **Never replace dynamic values with literals** — Always keep replacements dynamic. 8. **Preserve control flow** — Prefer drop-in replacements that maintain the original code structure. Only add guard/early-return patterns when a direct substitution does not work. **When editing code around control flow (`if`/`else`, `switch`/`case`/`default`, `do`/`catch`), verify that the branching structure is preserved after your edit. Never collapse an `if`/`else` into sequential execution: both bodies then run unconditionally, which is a critical bug. Kee

Read more
Ships withhomeclaw

HomeKit smart home control via MCP — lights, locks, thermostats, and scenes for Claude Desktop, Claude Code, and OpenClaw

Get the whole plugin

Other skills on homeclaw.