SwiftUI debugging falls into three categories, each with a different diagnostic approach:
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionaxiom-swiftui-debuggingExecute the skills CLI command in your project's root directory to begin installation:
Fetches axiom-swiftui-debugging from charleswiltgen/axiom and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate axiom-swiftui-debugging. Access via /axiom-swiftui-debugging in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
767
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
767
stars
SwiftUI debugging falls into three categories, each with a different diagnostic approach:
Core principle: Start with observable symptoms, test systematically, eliminate causes one by one. Don't guess.
Requires: Xcode 26+, iOS 17+ (iOS 14-16 patterns still valid, see notes)
Related skills: axiom-xcode-debugging (cache corruption diagnosis), axiom-swift-concurrency (observer patterns), axiom-swiftui-performance (profiling with Instruments), axiom-swiftui-layout (adaptive layout patterns)
These are real questions developers ask that this skill is designed to answer:
→ The skill walks through the decision tree to identify struct mutation vs lost binding vs missing observer
→ The skill shows how to provide missing dependencies with .environment() or .environmentObject()
→ The skill identifies accidental view recreation from conditionals and shows .opacity() fix
→ The skill explains when to use @State vs plain properties with @Observable objects
→ The skill identifies ForEach identity issues and shows how to use stable IDs
axiom-xcode-debugging instead whenaxiom-swift-concurrency instead whenSwiftUI provides a debug-only method to understand why a view's body was called.
Usage in LLDB:
// Set breakpoint in view's body
// In LLDB console:
(lldb) expression Self._printChanges()
Temporary in code (remove before shipping):
var body: some View {
let _ = Self._printChanges() // Debug only
Text("Hello")
}
Output interpretation:
MyView: @self changed
- Means the view value itself changed (parameters passed to view)
MyView: count changed
- Means @State property "count" triggered the update
MyView: (no output)
- Body not being called; view not updating at all
⚠️ Important:
When to use:
Cross-reference: For complex update patterns, use SwiftUI Instrument → see axiom-swiftui-performance skill
The most common frustration: you changed @State but the view didn't redraw. The root cause is always one of four things.
#Preview {
YourView()
}
YES → The problem is in your code. Continue to Step 2.
NO → It's likely Xcode state or cache corruption. Skip to Preview Crashes section.
Symptom: You modify a @State value directly, but the view doesn't update.
Why it happens: SwiftUI doesn't see direct mutations on structs. You need to reassign the entire value.
// ❌ WRONG: Direct mutation doesn't trigger update
@State var items: [String] = []
func addItem(_ item: String) {
items.append(item) // SwiftUI doesn't see this change
}
// ✅ RIGHT: Reassignment triggers update
@State var items: [String] = []
func addItem(_ item: String) {
var newItems = items
newItems.append(item)
self.items = newItems // Full reassignment
}
// ✅ ALSO RIGHT: Use a binding
@State var items: [String] = []
var itemsBinding: Binding<[String]> {
Binding(
get: { items },
set: { items = $0 }
)
}
Fix it: Always reassign the entire struct value, not pieces of it.
Symptom: You pass a binding to a child view, but changes in the child don't update the parent.
Why it happens: You're passing .constant() or creating a new binding each time, breaking the two-way connection.
// ❌ WRONG: Constant binding is read-only
@State var isOn = false
ToggleChild(value: .constant(isOn)) // Changes ignored
// ❌ WRONG: New binding created each render
@State var name = ""
TextField("Name", text: Binding(
get: { name },
set: { name = $0 }
)) // New binding object each time parent renders
// ✅ RIGHT: Pass the actual binding
@State var isOn = false
ToggleChild(value: $isOn)
// ✅ RIGHT (iOS 17+): Use @Bindable for @Observable objects
@Observable class Book {
var title = "Sample"
var isAvailable = true
}
struct EditView: View {
@Bindable var book: Book // Enables $book.title syntax
var body: some View {
TextField("Title", text: $book.title)
Toggle("Available", isOn: $book.isAvailable)
}
}
// ✅ ALSO RIGHT (iOS 17+): @Bindable as local variable
struct ListView: View {
@State private var books = [Book(), Book()]
var body: some View {
List(books) { book in
@Bindable var book = book // Inline binding
TextField("Title", text: $book.title)
}
}
}
// ✅ RIGHT (pre-iOS 17): Create binding once, not in body
@State var name = ""
@State var nameBinding: Binding<String>?
var body: some View {
if nameBinding == nil {
nameBinding = Binding(
get: { name },
set: { name = $0 }
)
}
return TextField("Name", text: nameBinding!)
}
Fix it: Pass $state directly when possible. For @Observable objects (iOS 17+), use @Bindable. If creating custom bindings (pre-iOS 17), create them in init or cache them, not in body.
Symptom: The view updates, but @State values reset to initial state. You see brief flashes of initial values.
Why it happens: The view got a new identity (removed from a conditional, moved in a container, or the container itself was recreated), causing SwiftUI to treat it as a new view.
// ❌ WRONG: View identity changes when condition flips
@State var count = Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
frontend-design
669anthropics/claude-code
Frontendsame categoryui-animation
244mblode/agent-skills
Frontendsame categorypremium-frontend-ui
238github/awesome-copilot
Frontendsame categoryantigravity-design-expert
211sickn33/antigravity-awesome-skills
Frontendsame categoryhigh-end-visual-design
193leonxlnx/taste-skill
Frontendsame categoryinterior-design-expert
147erichowens/some_claude_skills
Frontendsame categoryReviews
4.5★★★★★57 reviews- CChinedu Choi★★★★★Dec 28, 2024
Keeps context tight: axiom-swiftui-debugging is the kind of skill you can hand to a new teammate without a long onboarding doc.
- HHassan Martin★★★★★Dec 20, 2024
Solid pick for teams standardizing on skills: axiom-swiftui-debugging is focused, and the summary matches what you get after install.
- AAma Sanchez★★★★★Dec 20, 2024
axiom-swiftui-debugging reduced setup friction for our internal harness; good balance of opinion and flexibility.
- GGanesh Mohane★★★★★Dec 16, 2024
axiom-swiftui-debugging has been reliable in day-to-day use. Documentation quality is above average for community skills.
- DDev Rahman★★★★★Dec 16, 2024
Registry listing for axiom-swiftui-debugging matched our evaluation — installs cleanly and behaves as described in the markdown.
- MMia Shah★★★★★Dec 8, 2024
I recommend axiom-swiftui-debugging for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- DDiego Thompson★★★★★Nov 27, 2024
Useful defaults in axiom-swiftui-debugging — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- AAma Lopez★★★★★Nov 27, 2024
axiom-swiftui-debugging reduced setup friction for our internal harness; good balance of opinion and flexibility.
- KKabir Flores★★★★★Nov 19, 2024
axiom-swiftui-debugging has been reliable in day-to-day use. Documentation quality is above average for community skills.
- AAma Ndlovu★★★★★Nov 11, 2024
Registry listing for axiom-swiftui-debugging matched our evaluation — installs cleanly and behaves as described in the markdown.
showing 1-10 of 57
1 / 6Discussion
Comments — not star reviews- No comments yet — start the thread.