Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add flaqai/ios-application-development-skills --skill swiftui-view-refactorgit clone --depth 1 https://github.com/flaqai/ios-application-development-skillsWrote 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/flaqai/ios-application-development-skills/swiftui-view-refactor)<a href="https://agentmods.dev/skills/flaqai/ios-application-development-skills/swiftui-view-refactor"><img src="https://agentmods.dev/badge/skills/flaqai/ios-application-development-skills/swiftui-view-refactor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/flaqai/ios-application-development-skills/swiftui-view-refactor"><img src="https://agentmods.dev/badge/skills/flaqai/ios-application-development-skills/swiftui-view-refactor.svg" alt="Reviewed on agentmods" width="80" 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.00034 | $0.01723 |
| Opus 5.5 | $0.00014 | $0.00689 |
| Sonnet 5.5 | $0.00007 | $0.00345 |
| Haiku 4.5 | $0.00003 | $0.00172 |
Grade A, and why
swiftui-view-refactor 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 3mo 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.
This is a copy
89% identical to swiftui-view-refactor — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 204 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI View Refactor
Overview
Refactor SwiftUI views toward small, explicit, stable view types. Default to vanilla SwiftUI: local state in the view, shared dependencies in the environment, business logic in services/models, and view models only when the request or existing code clearly requires one.
Core Guidelines
1) View ordering (top → bottom)
- Enforce this ordering unless the existing file has a stronger local convention you must preserve.
- Environment
private/publiclet@State/ other stored properties- computed
var(non-view) initbody- computed view builders / other view helpers
- helper / async functions
2) Default to MV, not MVVM
- Views should be lightweight state expressions and orchestration points, not containers for business logic.
- Favor
@State,@Environment,@Query,.task,.task(id:), andonChangebefore reaching for a view model. - Inject services and shared models via
@Environment; keep domain logic in services/models, not in the view body. - Do not introduce a view model just to mirror local view state or wrap environment dependencies.
- If a screen is getting large, split the UI into subviews before inventing a new view model layer.
3) Strongly prefer dedicated subview types over computed some View helpers
- Flag
bodyproperties that are longer than roughly one screen or contain multiple logical sections. - Prefer extracting dedicated
Viewtypes for non-trivial sections, especially when they have state, async work, branching, or deserve their own preview. - Keep computed
some Viewhelpers rare and small. Do not build an entire screen out ofprivate var header: some View-style fragments. - Pass small, explicit inputs (data, bindings, callbacks) into extracted subviews instead of handing down the entire parent state.
- If an extracted subview becomes reusable or independently meaningful, move it to its own file.
Prefer:
var body: some View {
List {
HeaderSection(title: title, subtitle: subtitle)
FilterSection(
filterOptions: filterOptions,
selectedFilter: $selectedFilter
)
ResultsSection(items: filteredItems)
FooterSection()
}
}
private struct HeaderSection: View {
let title: String
let subtitle: String
var body: some View {
VStack(alignment: .leading, spacing: 6) {
Text(title).font(.title2)
Text(subtitle).font(.subheadline)
}
}
}
private struct FilterSection: View {
let filterOptions: [FilterOption]
@Binding var selectedFilter: FilterOption
var body: some View {
ScrollView(.horizontal, showsIndicators: false) {
HStack {
ForEach(filterOptions, id: \.self) { option in
FilterChip(option: option, isSelected: option == selectedFilter)
.onTapGesture { selectedFilter = option }
}
}
}
}
}
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3mo ago First seen · 204 lines · 34 tokens per session scan A 129cbb511987
swiftui-view-refactor is a skill published in the GitHub repository flaqai/ios-application-development-skills (5 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 1,723 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to swiftui-view-refactor, differing in 3 lines, and is treated as a copy.
swiftui-view-refactor compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| swiftui-view-refactorflaqai/ios-application-development-skills | Skill | 5 | 3mo ago | MIT | A | 34 | Codex |
| init-xcode-appglebis/claude-skills | Skill | 417 | today | MIT | A | 88 | Claude Code, Codex |
| kotlin-specialistJeffallan/claude-skills | Skill | 13k | today | MIT | A | 86 | Claude Code |
| swift-expertJeffallan/claude-skills | Skill | 13k | today | MIT | A | 98 | Claude Code |
| bootstrap-iosRayFernando1337/rayfernando-skills | Skill | 132 | yesterday | Apache-2.0 | A | 84 | Claude Code |
| android-developmentMindrally/skills | Skill | 322 | 1mo ago | Apache-2.0 | A | 27 | Claude Code |
| swiftnimadorostkar/Claude-Skills-collection | Skill | 41 | today | MIT | A | 97 | Claude Code |