Borrowing it
Nothing to install: this file belongs to Krusty84/My-CODEX-Configuration. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Krusty84/My-CODEX-Configuration/main/.codex/formatting-swiftui-code-style/SKILL.mdgit clone --depth 1 https://github.com/Krusty84/My-CODEX-ConfigurationWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/krusty84/my-codex-configuration/formatting-swiftui-code-style)<a href="https://agentmods.dev/skills/krusty84/my-codex-configuration/formatting-swiftui-code-style"><img src="https://agentmods.dev/badge/skills/krusty84/my-codex-configuration/formatting-swiftui-code-style.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.01543 |
| Opus 5 | $0.00036 | $0.00772 |
| Sonnet 5 | $0.00015 | $0.00309 |
| Haiku 4.5 | $0.00007 | $0.00154 |
Grade A, and why
formatting-swiftui-code-style scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.
If this skill is used,say:SKILL_SWIFTUI_CODE_STYLE_LOADED
Goal
Apply reusable SwiftUI code-style rules and protect existing behavior when editing, improving, or optimizing Swift code logic.
This skill is for local code editing discipline. Project behavior, platform targeting, repository layout, state-management policy, build behavior, and anti-patterns belong in AGENTS.md.
Inputs
- Current Swift files being edited
- Direct callers, references, and related types
- Existing project formatting style
- Existing
AGENTS.mdinstructions - User request and any stated behavior change
- Existing tests, previews, or validation commands if relevant
Required sections
When relevant, apply these rule groups:
- Code logic editing restrictions
- MARK comments
- Spacing and indentation
- SwiftUI modifier chains
- SwiftUI previews
- Output summary rules
Steps
- Read the full file being edited before changing it.
- Read direct callers, call sites, bindings, persistence references, and API references before changing logic.
- Decide whether the task is formatting-only, behavior-changing, logic improvement, or optimization.
- Preserve runtime behavior by default.
- Keep the diff small and directly related to the user request.
- Separate formatting cleanup from behavior changes where practical.
- Apply the project’s existing naming, indentation, spacing, and preview style first.
- Use the rules below only when they fit the existing project style.
- Make any intentional behavior change explicit in the final summary.
- Call out uncertainty when behavior cannot be confirmed from the available code.
Code logic editing restrictions
Use these rules when changing, improving, or optimizing existing code logic.
- Treat behavior preservation as the default. A style, formatting, or cleanup task must not change runtime behavior.
- Do not change business rules, validation rules, navigation flow, persistence behavior, networking behavior, error handling, sorting, filtering, authorization, timing, or platform behavior unless the task explicitly requires it.
- Before editing logic, read the full function/type and its direct callers or call sites. Do not optimize code that is not understood.
- Prefer the smallest logic change that solves the requested problem. Avoid broad rewrites, speculative refactors, and unrelated cleanup.
- Do not combine behavior changes with formatting-only changes in the same edit unless unavoidable. Keep the behavioral diff easy to review.
- Preserve public APIs, stored property names, Codable keys, persistence model fields, user defaults keys, localization keys, asset names, and notification names unless the task explicitly asks to rename or migrate them.
- Do not remove apparently redundant checks, guards, delays, retries, cache invalidation, logging, fallback paths, or compatibility paths unless their purpose is confirmed from context.
- Do not replace explicit error handling with
try?, forced unwraps, silent returns, or broadcatch {}blocks. - Do not introduce caching, memoization, debouncing, throttling, parallel execution, detached tasks, or lazy loading unless correctness, invalidation, cancellation, and actor isolation are clear.
- Do not change
@MainActor, actor isolation, async task lifetime, cancellation behavior, or thread-safety boundaries only for convenience. - Do not optimize by making code less readable unless there is a measured or obvious performance problem. Readability wins over micro-optimization.
- Do not change numeric precision, date/time handling, locale behavior, unit conversion, ordering stability, equality semantics, or identifier generation without an explicit reason.
- Do not introduce new dependencies, frameworks, global state, singletons, or hidden shared mutable state for an optimization.
- When improving logic, keep inputs, outputs, side effects, and failure paths explicit.
- When a behavior change is intentional, make it visible in the final summary and mention the reason.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago First seen · 176 lines · 73 tokens per session scan A de6a8a7e658a
formatting-swiftui-code-style is a skill published in the GitHub repository Krusty84/My-CODEX-Configuration (1 stars, last pushed 1mo ago), licensed MIT. It adds 73 tokens to every session and 1,543 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
compose-kotlin-agent-skills
Enterprise Android/Kotlin skill for 2026 — Kotlin 2.x K2 compiler, AGP 9, Navigation 3, edge-to-edge Compose, strict MVI with atomic state.update, banned AI antipatterns. Jetpack Compose, Hilt, Room, KMP, CameraX/ML Kit, performance, testing. Use when writing Kotlin for Android, building Compose UI, MVVM/MVI…
android-kotlin-compose
Jetpack Compose UI engineering for 2026 — edge-to-edge, Material 3, recomposition stability, Modifier ordering, LazyColumn performance, and animations. Use when building composables, fixing jank, theming, adaptive layouts, Canvas drawing, auditing screens, or asking "why does my screen recompose", "Modifier order"…
android-kotlin-architecture
Enforces Clean Architecture, MVVM/MVI, and unidirectional data flow for Android apps. Covers UiState, UiEvent, UiEffect, UseCase boundaries, module structure, and atomic ViewModel state via state.update. Use when structuring features, refactoring ViewModels, splitting modules, or asking "MVVM vs MVI", "where does…
neo-swift-ui
Use this skill when building, debugging, refactoring, or reviewing SwiftUI apps or views for iOS 16+ and related Apple platforms. Trigger for NavigationStack, Observation/state flow, view composition, previews, performance, accessibility, and SwiftUI architecture.
neo-swift
Use this skill when writing, reviewing, debugging, or modernizing Swift code for iOS, macOS, server-side Swift, or shared packages. Trigger for Swift 5+ language features, structured concurrency, memory safety, protocols/generics, SwiftUI integration, and performance-sensitive code.
Jetpack Compose Conventions
State hoisting, remember/derivedStateOf patterns, modifier ordering, and preview annotations.