Skip to main content

Swiftui Audit

v1.0.0New

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, then copy.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install claude-codex-settings-swiftui-audit

What this does: This skill should be used when the user asks to "audit SwiftUI code", "scan a SwiftUI project for deprecated API", "find SwiftUI anti-patterns", or run a static SwiftUI check before a review or release.

Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/claude-codex-settings-swiftui-audit/SKILL.md

Setup guide →
0Save

Instructions

SwiftUI audit

Run the bundled auditor first. It finds a small set of patterns that can be recognized from source text alone, then the swiftui-best-practices skill covers everything that needs judgment.

node scripts/swiftui-audit.mjs <app-or-package-dir> [--json] [--target ios=17,macos=14] [--include-tests]
  • Node with no dependencies. The tests pass on Node 24 (Linux) and Node 22 (macOS).
  • The deployment target comes from platforms: in Package.swift or *_DEPLOYMENT_TARGET in project.pbxproj, inside the scan root or its nearest parent that has one. With several targets, the lowest per platform wins. --target overrides it. The output names the source, or says the target is unknown.
  • Comments and string contents are masked before matching, so commented-out code and text in literals never match.
  • .build, DerivedData, Pods, Carthage, SourcePackages, checkouts, node_modules, *.xcodeproj, directories ending in Tests and files ending in Tests.swift are skipped. --include-tests scans tests too.
  • Exit code 1 means findings were printed, 0 means none, 2 means a usage error.

Rules

Each finding gives the file, line, rule, the code, the problem and the next action. fix means the replacement is mechanical. review means the next action starts with "Needs human context" and names the fact to check before changing anything.

RuleLevelFlagsKept off when
index-identityreviewForEach(x.indices, ...), ForEach(0..<x.count, ...) or enumerated() with id: \.offsetelement IDs, literal ranges, for loops
text-concatenationreviewText + Text chains (one finding per chain) and Text("a" + b)+ inside interpolation, Text(verbatim:), + not next to a literal
foreground-colorfix.foregroundColor() modifierinside a reported Text + chain, target below iOS 15 / macOS 12
view-argument-overloadfix.background(Circle()), .overlay(MyView()), .mask(...) with a built-in or project-declared View or Shapestyle arguments, in: shapes, closures, unknown types
onchange-single-parameterfix.onChange(of:) { value in } and perform:zero or two parameters, initial:, target below iOS 17 / macOS 14
animation-without-valuefix.animation(x) modifier without value:TimelineView(.animation...), $binding.animation(), transitions, the .animation(x) { } body form
corner-radius-modifierfix.cornerRadius() modifierRoundedRectangle(cornerRadius:) and other labels
state-not-privatereview@State or @StateObject without privateprivate and private(set)

Next actions follow the deployment target. corner-radius-modifier suggests .rect(cornerRadius:) from iOS 17 / macOS 14 and RoundedRectangle below. index-identity keeps Array(x.enumerated()) below iOS 26 / macOS 26.

Acting on findings

  1. Apply fix findings in small batches and build after each one. Change only the reported expression.
  2. For each review finding, read the collection or property it names. Leave it as is when the stated condition does not hold, and say so in the review.
  3. Report the rest with swiftui-best-practices. Do not rewrite code that the auditor did not report only because a pattern exists. Examples are ObservableObject, GeometryReader and compatibility code for older targets.

Limits

  • Matching is lexical. It does not resolve types, so view-argument-overload recognizes only built-in views and View or Shape types declared in the scanned files, and skips variables.
  • Binding(get:set:) is not a rule. Most real setters have side effects or roll back on failure, so a safe replacement always needs a person.
  • Regex literals are not masked, and a + between two values that are both stored Text variables is missed.
  • A clean run proves only that these eight patterns are absent. It is not a SwiftUI review.

Tests

node --test plugins/swift-skills/skills/swiftui-audit/tests/swiftui-audit.test.mjs
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
schemaUse when adding, fixing, or reviewing structured data: JSON-LD for articles, products, FAQs, breadcrumbs, organizations, and local businesses, and what to do when markup doesn't earn a rich result.1 installsderive-clientReverse-engineer a website's internal API by recording browser traffic into a HAR file, then generate a standalone client or CLI that calls the endpoints directly, with no browser needed after the first recording. Use when asked to "derive a client", "build a CLI for <site>", "reverse engineer this site's API", "record network requests", "turn this site into an API", or when the same site will be automated repeatedly and direct HTTP calls would beat driving the browser every time.1 installscloudflare-deployDiscover and choose Cloudflare products for apps, APIs, AI agents, storage, networking, and security. Use for architecture and product selection, including when the user describes a need without naming a Cloudflare product; then find the relevant skill or documentation.1 installsvercel-react-best-practicesReact and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.1 installsxlsxUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.1 installslivekit-skillsBuild voice AI agents with LiveKit Agents SDK. Use when the user asks to "build a voice agent", "create a LiveKit agent", "add voice AI", "implement handoffs", "structure agent workflows", or is working with LiveKit Agents SDK. Covers both LiveKit Cloud and self-hosted deployments using lk CLI.1 installs

More from claude-codex-settings

View source →
dokploy-deployThis skill should be used when user asks to "deploy with Dokploy", "use Dokploy Cloud", "manage self-hosted Dokploy", "deploy Docker Compose on Dokploy", "manage Dokploy databases", "configure Dokploy domains", or "look up Dokploy CLI commands".3 installsopenai-frontend-designThis skill should be used when the user asks for "visual concepts", "image-led website design", or "concept fidelity". Create visual concepts and implement accepted art direction. Use product-ui-design for everyday product screens and controls.2 installsweb-design-guidelinesReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".1 installsk2Build and troubleshoot Cloudflare K2 or K2 Streams durable logs. Use for stream setup, producing from Workers or HTTP, configuring retention and inputs, and consuming through subscriptions.1 installspptxUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.1 installsreview-prThis skill should be used when user asks to "review a PR", "review pull request", "review this pr", "code review this PR", "check PR1 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.651 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.551 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.362 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.264 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.183 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions147 installs

Frequently asked questions about swiftui-audit

What does the swiftui-audit skill do?

This skill should be used when the user asks to "audit SwiftUI code", "scan a SwiftUI project for deprecated API", "find SwiftUI anti-patterns", or run a static SwiftUI check before a review or release. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the swiftui-audit skill?

Run `npx @skills-hub-ai/cli install claude-codex-settings-swiftui-audit` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/claude-codex-settings-swiftui-audit/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does swiftui-audit work with?

swiftui-audit runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the swiftui-audit skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use swiftui-audit after installing it?

In Claude Code, type `/claude-codex-settings-swiftui-audit` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the swiftui-audit skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.