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 heyAyushh/stacc --skill swiftui-view-refactorgit clone --depth 1 https://github.com/heyAyushh/staccWrote 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/heyayushh/stacc/swiftui-view-refactor)<a href="https://agentmods.dev/skills/heyayushh/stacc/swiftui-view-refactor"><img src="https://agentmods.dev/badge/skills/heyayushh/stacc/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/heyayushh/stacc/swiftui-view-refactor"><img src="https://agentmods.dev/badge/skills/heyayushh/stacc/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.00065 | $0.01212 |
| Opus 5.5 | $0.00026 | $0.00485 |
| Sonnet 5.5 | $0.00013 | $0.00242 |
| Haiku 4.5 | $0.00006 | $0.00121 |
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
97% identical to swiftui-view-refactor — 2 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 — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI View Refactor
Overview
Apply a consistent structure and dependency pattern to SwiftUI views, with a focus on ordering, Model-View (MV) patterns, careful view model handling, and correct Observation usage.
Core Guidelines
1) View ordering (top → bottom)
- Environment
private/publiclet@State/ other stored properties- computed
var(non-view) initbody- computed view builders / other view helpers
- helper / async functions
2) Prefer MV (Model-View) patterns
- Default to MV: Views are lightweight state expressions; models/services own business logic.
- Favor
@State,@Environment,@Query, andtask/onChangefor orchestration. - Inject services and shared models via
@Environment; keep views small and composable. - Split large views into subviews rather than introducing a view model.
3) Split large bodies and view properties
- If
bodygrows beyond a screen or has multiple logical sections, split it into smaller subviews. - Extract large computed view properties (
var header: some View { ... }) into dedicatedViewtypes when they carry state or complex branching. - It's fine to keep related subviews as computed view properties in the same file; extract to a standalone
Viewstruct only when it structurally makes sense or when reuse is intended. - Prefer passing small inputs (data, bindings, callbacks) over reusing the entire parent view state.
Example (extracting a section):
var body: some View {
VStack(alignment: .leading, spacing: 16) {
HeaderSection(title: title, isPinned: isPinned)
DetailsSection(details: details)
ActionsSection(onSave: onSave, onCancel: onCancel)
}
}
Example (long body → shorter body + computed views in the same file):
var body: some View {
List {
header
filters
results
footer
}
}
private var header: some View {
VStack(alignment: .leading, spacing: 6) {
Text(title).font(.title2)
Text(subtitle).font(.subheadline)
}
}
private var filters: 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
1 file 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 · 139 lines · 65 tokens per session scan A 18e726bb1ea9
swiftui-view-refactor is a skill published in the GitHub repository heyAyushh/stacc (3 stars, last pushed 2mo ago), licensed MIT. It adds 65 tokens to every session and 1,212 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 97% identical to swiftui-view-refactor, differing in 2 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-refactorheyAyushh/stacc | Skill | 3 | 2mo ago | MIT | A | 65 | Claude Code, Codex |
| orca-emulator-androidstablyai/orca | Skill | 159k | today | MIT | A | 102 | Claude Code, Codex |
| nitro-ui-native-codepingdotgg/t3code | Skill | 90k | today | MIT | A | 32 | Claude Code, Codex |
| glance-canonical-layoutsandroid/skills | Skill | 11k | yesterday | Apache-2.0 | A | 56 | Claude Code |
| android-multiprofilechromium/chromium | Skill | 26k | today | BSD-3-Clause | A | 73 | Claude Code, Codex |
| android-tombstone-symbolicationdotnet/skills | Skill | 6.5k | today | MIT | A | 176 | Claude Code |
| dogfoodcallstack/agent-device | Skill | 5.6k | today | MIT | A | 55 | Claude Code |