My-CODEX-Configuration: Skill for Codex

.codex/formatting-swiftui-code-style/SKILL.md

formatting-swiftui-code-style is a skill for Codex from Krusty84/My-CODEX-Configuration. It costs 73 tokens per session (1,543 once invoked), scanned A, original, MIT.

A style guide for editing SwiftUI code, Apple's framework for building app interfaces in Swift.

In plain words
What is it for?
Use it when formatting SwiftUI files, organizing MARK comments, improving modifier chains, editing logic safely, or refining previews.
Why use it?
It keeps existing code readable and protects its behavior while applying consistent formatting, organization, previews, and modifier chains.

Skill for Codex

Written for Codex: installed under .codex/. Also seen: mentions AGENTS.md.

This is Krusty84/My-CODEX-Configuration's own configuration. It tells Codex how to work on My-CODEX-Configuration itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything My-CODEX-Configuration configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/Krusty84/My-CODEX-Configuration/main/.codex/formatting-swiftui-code-style/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Krusty84/My-CODEX-Configuration

Made for: Codex.

Wrote 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.

agentmods badge for formatting-swiftui-code-style

README.md
[![agentmods](https://agentmods.dev/badge/skills/krusty84/my-codex-configuration/formatting-swiftui-code-style.svg)](https://agentmods.dev/skills/krusty84/my-codex-configuration/formatting-swiftui-code-style)
Your own site
<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>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,543 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash de6a8a7e658a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

.codex/formatting-swiftui-code-style/SKILL.md · 176 lines

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.md instructions
  • 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

  1. Read the full file being edited before changing it.
  2. Read direct callers, call sites, bindings, persistence references, and API references before changing logic.
  3. Decide whether the task is formatting-only, behavior-changing, logic improvement, or optimization.
  4. Preserve runtime behavior by default.
  5. Keep the diff small and directly related to the user request.
  6. Separate formatting cleanup from behavior changes where practical.
  7. Apply the project’s existing naming, indentation, spacing, and preview style first.
  8. Use the rules below only when they fit the existing project style.
  9. Make any intentional behavior change explicit in the final summary.
  10. 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 broad catch {} 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.

Read the full file on GitHub · 176 lines

Changes

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.

  1. 6d ago First seen · 176 lines · 73 tokens per session scan A de6a8a7e658a

Subscribe to this mod's changes

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.

Related

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…

haidrrrry/compose-kotlin-agent-skills · 149 tokens

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"…

haidrrrry/compose-kotlin-agent-skills · 90 tokens

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…

haidrrrry/compose-kotlin-agent-skills · 87 tokens

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.

Benknightdark/neo-skills · 57 tokens

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.

Benknightdark/neo-skills · 63 tokens

Jetpack Compose Conventions

State hoisting, remember/derivedStateOf patterns, modifier ordering, and preview annotations.

niels-emmer/myace · 24 tokens