Borrowing it
Nothing to install: this file belongs to bsreeram08/chowser. 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/bsreeram08/chowser/main/.agents/skills/swift-style/SKILL.mdgit clone --depth 1 https://github.com/bsreeram08/chowserWrote 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/bsreeram08/chowser/swift-style)<a href="https://agentmods.dev/skills/bsreeram08/chowser/swift-style"><img src="https://agentmods.dev/badge/skills/bsreeram08/chowser/swift-style/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/bsreeram08/chowser/swift-style"><img src="https://agentmods.dev/badge/skills/bsreeram08/chowser/swift-style.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.00032 | $0.00795 |
| Opus 5.5 | $0.00013 | $0.00318 |
| Sonnet 5.5 | $0.00006 | $0.00159 |
| Haiku 4.5 | $0.00003 | $0.00080 |
Grade B, and why
swift-style scanned grade B with 1 finding 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 4d 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.
Strips warnings and disclaimersmediumAnti-refusal
Omitting safety caveats hides risk from the user and is a common jailbreak preamble.
Code should compile without warnings. This is a copy
100% identical to swift-style — 0 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 — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Swift Style Guide
Code style conventions for clean, readable Swift code.
Core Principles
Clarity > Brevity > Consistency
Code should compile without warnings.
Naming
UpperCamelCase— Types, protocolslowerCamelCase— Everything else- Clarity at call site
- No abbreviations except universal (URL, ID)
// Preferred
let maximumWidgetCount = 100
func fetchUser(byID id: String) -> User
Golden Path
Left-hand margin is the happy path. Don't nest if statements.
// Preferred
func process(value: Int?) throws -> Result {
guard let value = value else {
throw ProcessError.nilValue
}
guard value > 0 else {
throw ProcessError.invalidValue
}
return compute(value)
}
Code Organization
Use extensions and MARK comments:
class MyViewController: UIViewController {
// Core implementation
}
// MARK: - UITableViewDataSource
extension MyViewController: UITableViewDataSource { }
Spacing
- Braces open on same line, close on new line
- One blank line between methods
- Colon: no space before, one space after
Self
Avoid self unless required by compiler.
// Preferred
func configure() {
backgroundColor = .systemBackground
}
Computed Properties
Omit get for read-only:
var diameter: Double {
radius * 2
}
Closures
Trailing closure only for single closure parameter.
Type Inference
Let compiler infer when clear. For empty collections, use type annotation:
var names: [String] = []
Syntactic Sugar
// Preferred
var items: [String]
var cache: [String: Int]
var name: String?
Access Control
privateoverfileprivate- Don't add
internal(it's the default) - Access control as leading specifier
Memory Management
resource.request().onComplete { [weak self] response in
guard let self else { return }
self.updateModel(response)
}
Comments
- Explain why, not what
- Use
//or///, avoid/* */ - Keep up-to-date or delete
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.
- 4d ago First seen · 149 lines · 32 tokens per session scan B 2bca6f774ac4
swift-style is a skill published in the GitHub repository bsreeram08/chowser (12 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 795 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). It is 100% identical to swift-style, differing in 0 lines, and is treated as a copy.
swift-style compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| swift-stylebsreeram08/chowser | Skill | 12 | 1mo ago | MIT | B | 32 | Claude Code, Codex |
| swift-testing-projacklandrin/OnlySwitch | Skill | 6.1k | 4d ago | MIT | A | 34 | Codex |
| boutique-best-practicesmergesort/Boutique | Skill | 1.1k | 18d ago | MIT | A | 56 | Claude Code |
| swift-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 76 | Claude Code |
| programming-swiftkylehughes/the-unofficial-swift-programming-language-skill | Skill | 46 | 1mo ago | MIT | A | 54 | Claude Code, Codex |
| macos-build-testmilisp/mcp-linker | Skill | 344 | 1mo ago | AGPL-3.0 | A | 66 | Claude Code |
| building-apple-platform-productsrhyean88/apple-platform-build-tools-claude-code-plugin | Skill | 4 | 1mo ago | MIT | A | 64 | Claude Code, Codex |