axiom-auto-layout-debugging
БесплатноБез исполняемых скриптовНе проверенUse when encountering "Unable to simultaneously satisfy constraints" errors, constraint conflicts, ambiguous layout warnings, or views positioned incorrectly…
от ComeOnOliver★ 67 звёзд на GitHubОб этом скилле
Auto Layout Debugging
When to Use This Skill
Use when:
- Seeing "Unable to simultaneously satisfy constraints" errors in console
- Views positioned incorrectly or not appearing
- Constraint warnings during app launch or navigation
- Ambiguous layout errors
- Views appearing at unexpected sizes
- Debug View Hierarchy shows misaligned views
- Storyboard/XIB constraints behaving differently at runtime
Overview
Core Principle: Auto Layout constraint errors follow predictable patterns. Systematic debugging with proper tools identifies issues in minutes instead of hours.
Time Savings: Typical constraint debugging without this workflow: 30-60 minutes. With systematic approach: 5-10 minutes.
Quick Decision Tree
Constraint error in console?
├─ Can't identify which views?
│ └─ Use Symbolic Breakpoint + Memory Address Identification
├─ Constraint conflicts shown?
│ └─ Use Constraint Priority Resolution
├─ Ambiguous layout (multiple solutions)?
│ └─ Use _autolayoutTrace to find missing constraints
└─ Views positioned incorrectly but no errors?
└─ Use Debug View Hierarchy + Show Constraints
Understanding Constraint Error Messages
Anatomy of Error Message
Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list you don't need.
(
"<NSLayoutConstraint:0x7f8b9c6... 'UIView-Encapsulated-Layout-Width' ... (active)>",
"<NSLayoutConstraint:0x7f8b9c5... UILabel:0x7f8b9c4... .width == 300 (active)>",
"<NSLayoutConstraint:0x7f8b9c3... UILabel:0x7f8b9c4... .leading == ... + 20 (active)>",
"<NSLayoutConstraint:0x7f8b9c2... ... .trailing == UILabel:0x7f8b9c4... .trailing + 20 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7f8b9c5... UILabel:0x7f8b9c4... .width == 300 (active)>
Key Components:
- Memory addresses —
0x7f8b9c4...identifies views and constraints - Visual Format — Human-readable constraint description
(active)status — Constraint is currently enforced- Recovery action — Which constraint system will break (usually lowest priority)
System-Generated Constraints
UIView-Encapsulated-Layout-Width/Height:
- Created by UIKit for cells, system views
- Often source of conflicts
- Usually correct; your constraints are the problem
Autoresizing Mask Constraints:
- Format:
h=--&orv=&-- -= fixed dimension&= flexible dimension- Example:
h=--&= fixed left margin and width, flexible right margin
Debugging Workflow
Step 1: Set Up Symbolic Breakpoint (One-Time Setup)
Purpose: Break when constraint conflict occurs, before system breaks constraint.
Setup:
- Open Breakpoint Navigator (⌘+7 or ⌘+8)
- Click
+→ "Symbolic Breakpoint" - Symbol:
UIViewAlertForUnsatisfiableConstraints - (Optional) Add Action → "Sound" → select sound
- (Optional) Check "Automatically continue after evaluating actions"
Why this works: Pauses execution at exact moment of constraint conflict, giving you debugger access to all views and constraints.
Step 2: Identify Views from Memory Addresses
When breakpoint hits, console shows memory addresses like UILabel:0x7f8b9c4...
Technique 1: Use %rbx Register (When Breakpoint Hits)
# Print all involved views and constraints
po $arg1
# Or on older Xcode versions
po $rbx
Output: NSArray containing all conflicting constraints and affected views.
Technique 2: Set View Background Color
# Set background color on suspected view
expr ((UIView *)0x7f8b9c4...).backgroundColor = [UIColor redColor]
# Continue execution to see which view turned red
Result: Visually identifies which view corresponds to memory address.
Technique 3: Print View Hierarchy
Objective-C projects:
po [[UIWindow keyWindow] _autolayoutTrace]
Swift projects:
expr -l objc++ -O -- [[UIWindow keyWindow] _autolayoutTrace]
Output: Entire view hierarchy with * marking ambiguous layouts.
Example:
*<UIView:0x7f8b9c4...>
| <UILabel:0x7f8b9c3...>
The * indicates this UIView has ambiguous constraints.
Technique 4: Print Constraints for Specific View
# Horizontal constraints (axis: 0)
po [0x7f8b9c4... constraintsAffectingLayoutForAxis:0]
# Vertical constraints (axis: 1)
po [0x7f8b9c4... constraintsAffectingLayoutForAxis:1]
Output: All constraints affecting that view's layout.
Step 3: Use Debug View Hierarchy
When to use: Views positioned incorrectly, constraints not visible in code.
Workflow:
- Trigger the issue — Navigate to screen with constraint problems
- Pause execution — Click "Debug View Hierarchy" button in debug bar (or Debug → View Debugging → Capture View Hierarchy)
- Inspect 3D view — Rotate view hierarchy to see layering
- Enable "Show Constraints" — Shows all constraints as lines
- **Se
Установить axiom-auto-layout-debugging в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл axiom-auto-layout-debugging?
Use when encountering "Unable to simultaneously satisfy constraints" errors, constraint conflicts, ambiguous layout warnings, or views positioned incorrectly - systematic debugging workflow for Auto Layout issues in iOS
Как установить скилл axiom-auto-layout-debugging?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл axiom-auto-layout-debugging запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic