Swiftui Pro
twostraws/SwiftUI-Agent-Skill
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.
Enforce complexity and size limits on Swift code with SwiftLint threshold rules — cyclomatic complexity, function/type/file length, parameter count — adopted via a violations baseline so existing…
$ npx skills add rshankras/claude-code-apple-skills --skill code-size -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rshankras/claude-code-apple-skills code-size --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/swift/code-size .claude/skills/code-size && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "code-size" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swift/code-size into .claude/skills/code-size/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-size", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swift/code-sizeType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rshankras/claude-code-apple-skills --skill code-size -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rshankras/claude-code-apple-skills code-size --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/swift/code-size .agents/skills/code-size && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "code-size" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swift/code-size into .agents/skills/code-size/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-size", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill code-size -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rshankras/claude-code-apple-skills code-size --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/swift/code-size .cursor/skills/code-size && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "code-size" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swift/code-size into .cursor/skills/code-size/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-size", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rshankras/claude-code-apple-skills.git --path skills/swift/code-size--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rshankras/claude-code-apple-skills --skill code-size -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rshankras/claude-code-apple-skills code-size --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/swift/code-size .gemini/skills/code-size && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "code-size" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swift/code-size into .gemini/skills/code-size/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-size", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rshankras/claude-code-apple-skills code-sizeInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rshankras/claude-code-apple-skills --skill code-size -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/swift/code-size .github/skills/code-size && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "code-size" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swift/code-size into .github/skills/code-size/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-size", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill code-size -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rshankras/claude-code-apple-skills code-size --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/swift/code-size .opencode/skills/code-size && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "code-size" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swift/code-size into .opencode/skills/code-size/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-size", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
code-sizeEnforce complexity and size limits on Swift code with SwiftLint threshold rules — cyclomatic complexity, function/type/file length, parameter count — adopted via a violations baseline so existing…
Code Size is an agent skill from rshankras/claude-code-apple-skills. Enforce complexity and size limits on Swift code with SwiftLint threshold rules — cyclomatic complexity, function/type/file length, parameter count — adopted via a violations baseline so existing code never blocks. Use when agent-written code needs deterministic size constraints.
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `rules/swiftlint.yml`).
It sits in Mobile, covering iOS development. The repository describes itself as: Claude Code skills for Apple platform development (iOS, macOS, iPadOS) — product validation, code generation, App Store optimization, and more. The licence is MIT.
Read from SKILL.md and the folder at commit 9ffb831. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGlobGrepBashFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Code Size loads about 1.1k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 441 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Write, Edit, Glob, Grep, BashAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from rshankras/claude-code-apple-skills at commit 9ffb831, republished under its MIT licence (© rshankras). 441 words, ~1,082 tokens.
.claude/skills/code-size/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Complexity is the strongest single predictor of defect density, and code written by agents balloons fastest — an agent under pressure adds one more branch to an existing function far more readily than it extracts a new one. These five SwiftLint threshold rules are the deterministic cap: they keep functions small enough that tests can actually cover their branches, and they keep agents from wrangling with their own tangles.
Use this skill when:
testing/fitness-functions/)The fragment at rules/swiftlint.yml configures five built-in SwiftLint rules (all enabled by default in SwiftLint — this fragment sets the thresholds):
| Rule | Warning | Error | What it caps |
|---|---|---|---|
cyclomatic_complexity | 10 | 20 | Independent paths through one function |
function_body_length | 50 | 100 | Lines per function body |
type_body_length | 300 | 500 | Lines per type body |
file_length | 500 | 1000 | Lines per file |
function_parameter_count | 5 | 8 | Parameters per function |
Merge the fragment into the project's .swiftlint.yml (alongside any opt_in_rules/custom_rules fragments already adopted).
Turning these rules on in an existing codebase must not trigger a refactoring spree — bulk rewrites to satisfy a linter are how working code gets broken. Freeze today's violations and gate only new ones:
# One-time: record existing violations (SwiftLint 0.55+)
swiftlint lint --write-baseline .swiftlint-baseline.json
# The gate from then on — fails only on NEW violations
swiftlint lint --strict --baseline .swiftlint-baseline.jsonCommit .swiftlint-baseline.json. Shrink it opportunistically: when touching a baselined function for other reasons, fix its violation and regenerate the baseline in the same commit.
Fallback for older SwiftLint (before 0.55, no baseline support): record the violation count instead —
swiftlint lint --quiet | wc -l > .swiftlint-count
# Gate: current count must not exceed the committed countThe fix is structural, not suppressive:
cyclomatic_complexity / function_body_length → extract the branches into named functions, or replace the branch ladder with a table/enum dispatchtype_body_length / file_length → split by responsibility (extensions in separate files count separately)function_parameter_count → introduce a parameter struct// swiftlint:disable is not a fix. The rare legitimate exemption (a generated file, a big-but-flat data table) belongs in .swiftlint.yml's excluded: list with a comment — visible in one place, not scattered through source.
| Pitfall | Problem | Solution |
|---|---|---|
| Enabling without a baseline | Day-one wall of violations, gate ignored | --write-baseline first, gate on new only |
| Mass-refactoring to satisfy thresholds | Working code broken for a number | Freeze old violations; fix opportunistically |
Inline swiftlint:disable comments | Exemptions scattered and invisible | excluded: list in config, with reasons |
| Thresholds loosened per-project | Cap quietly stops capping | Change thresholds only with a written reason |
testing/fitness-functions/ — set/count invariants a per-line rule can't expresstesting/coverage-ratchet/ — the coverage half of the metrics gauntletios/coding-best-practices/ — iOS-specific lint fragment (style/API rules)generators/ci-cd-setup/ — base .swiftlint.yml template these fragments merge into© rshankras, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in skills/swift/code-size of rshankras/claude-code-apple-skills.
Open the folder on GitHubat commit 9ffb831
Code Size next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Code Size this skillrshankras/claude-code-apple-skills | 783 | — | ~1.1k | Automated safety check: Notes | MIT | |
| Swiftui Protwostraws/SwiftUI-Agent-Skill | 5.1k | 2 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Swiftui UI PatternsAFK-surf/OpenBridge | 430 | 4 repos | ~887 | Automated safety check: Pass | MIT | |
| Swiftui Performance Auditharperreed/dotfiles | 334 | 8 repos | ~1.4k | Automated safety check: Pass | None | |
| Swift Testing ExpertAvdLee/Swift-Testing-Agent-Skill | 469 | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Hig Project Contextraintree-technology/hig-doctor | 143 | 5 repos | ~1.2k | Automated safety check: Pass | MIT |
twostraws/SwiftUI-Agent-Skill
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.
AFK-surf/OpenBridge
Best practices and example-driven guidance for building SwiftUI views and components.
harperreed/dotfiles
Audit and improve SwiftUI runtime performance from code review and architecture.
AvdLee/Swift-Testing-Agent-Skill
Expert guidance for Swift Testing: test structure, expect/require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration.
raintree-technology/hig-doctor
Create or update a shared Apple design context document that other HIG skills use to tailor guidance.
twostraws/Swift-Testing-Agent-Skill
Writes, reviews, and improves Swift Testing code using modern APIs and best practices.
rshankras/claude-code-apple-skills
Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features.
rshankras/claude-code-apple-skills
SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects.
rshankras/claude-code-apple-skills
Generate compelling App Store descriptions that convert browsers into users.
rshankras/claude-code-apple-skills
Generates an app icon for macOS or iOS — a fast CoreGraphics placeholder and/or flat layered source art to finish in Icon Composer (the Liquid Glass / iOS 26+ standard).
rshankras/claude-code-apple-skills
Turn an app idea into validated, App-Store-ready name candidates.
rshankras/claude-code-apple-skills
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School &…
Categories
Enforce complexity and size limits on Swift code with SwiftLint threshold rules — cyclomatic complexity, function/type/file length, parameter count — adopted via a violations baseline so existing…. Code Size is an agent skill from rshankras/claude-code-apple-skills. Enforce complexity and size limits on Swift code with SwiftLint threshold rules — cyclomatic complexity, function/type/file length, parameter count — adopted via a violations baseline so existing code never blocks.
Code Size fits situations like: agent-written code needs deterministic size constraints; tasks that involve iOS development.
Run `npx skills add rshankras/claude-code-apple-skills --skill code-size -a claude-code`. Or copy the skill folder (skills/swift/code-size in rshankras/claude-code-apple-skills) into .claude/skills/code-size in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rshankras/claude-code-apple-skills --skill code-size -a codex`. Or copy the skill folder (skills/swift/code-size in rshankras/claude-code-apple-skills) into .agents/skills/code-size in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rshankras/claude-code-apple-skills --skill code-size -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-size, .gemini/skills/code-size, .github/skills/code-size and .opencode/skills/code-size in your project.
SKILL.md names no scripts, command-line tools or credentials: Code Size is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Code Size is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Code Size: Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5.1k stars), Swiftui UI Patterns (AFK-surf/OpenBridge, 430 stars), Swiftui Performance Audit (harperreed/dotfiles, 334 stars) and Swift Testing Expert (AvdLee/Swift-Testing-Agent-Skill, 469 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rshankras (a GitHub user) maintains it in rshankras/claude-code-apple-skills, which has 783 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on July 24, 2026.
Source: rshankras/claude-code-apple-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.