creating-extension

creating-extension is a skill for Claude Code from SwiftfulThinking/SwiftfulStarterProject. It costs 51 tokens per session (453 once invoked), scanned A, original, MIT.

A procedure for adding Swift extension code in the project's required folder and filename format. A Swift extension adds methods or related code to an existing type without changing its original declaration.

In plain words
What is it for?
Use it when adding convenience methods to types such as strings, colours, dates, arrays, models, or SwiftUI types in this project.
Why use it?
It prevents duplicate extension files and keeps related helpers together. It also sets the expected imports, visibility, and folder location.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when adding convenience methods to types such as strings, colours, dates, arrays, models, or SwiftUI types in this project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/swiftfulthinking/swiftfulstarterproject/creating-extension
Install

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.

Any agent
npx skills add SwiftfulThinking/SwiftfulStarterProject --skill creating-extension
Clone the repo
git clone --depth 1 https://github.com/SwiftfulThinking/SwiftfulStarterProject

Made for: Claude Code.

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 creating-extension

README.md
[![agentmods](https://agentmods.dev/badge/skills/swiftfulthinking/swiftfulstarterproject/creating-extension/github.svg)](https://agentmods.dev/skills/swiftfulthinking/swiftfulstarterproject/creating-extension)
Your own site
<a href="https://agentmods.dev/skills/swiftfulthinking/swiftfulstarterproject/creating-extension"><img src="https://agentmods.dev/badge/skills/swiftfulthinking/swiftfulstarterproject/creating-extension/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.

agentmods 80×15 button for creating-extension

Your own site · 80×15
<a href="https://agentmods.dev/skills/swiftfulthinking/swiftfulstarterproject/creating-extension"><img src="https://agentmods.dev/badge/skills/swiftfulthinking/swiftfulstarterproject/creating-extension.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 453 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.00051 $0.00453
Opus 5.5 $0.00020 $0.00181
Sonnet 5.5 $0.00010 $0.00091
Haiku 4.5 $0.00005 $0.00045

Measured 3mo ago against content hash 65ba7e798e0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

creating-extension 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.

.claude/skills/creating-extension/SKILL.md · 43 lines

What it actually says

Creating Extension

Create a Swift extension file following the project's naming and folder conventions.

Steps

  1. Identify the type being extended (e.g., String, Color, Array, a custom model type)
  2. Check if Extensions/{TypeName}+EXT.swift already exists — if so, add to that file instead of creating a new one
  3. If new, create the file in SwiftfulStarterProject/Extensions/

File Naming

All extension files follow: {TypeName}+EXT.swift

Examples: String+EXT.swift, Color+EXT.swift, Date+EXT.swift, UserModel+EXT.swift

Template

import SwiftUI

extension {TypeName} {

}

Key Patterns

  • Always check first if {TypeName}+EXT.swift already exists — add to it rather than creating a duplicate
  • One file per type — group all extensions for a type in a single +EXT file
  • Multiple extension blocks in the same file are fine for grouping related functionality
  • Import: use import SwiftUI (covers Foundation) unless the extension only needs import Foundation
  • Access level: use public only if the type itself is public (e.g., public extension Color), otherwise use default internal access
  • No business logic — extensions add convenience methods, computed properties, and static helpers, not app logic
  • Prefer after-object notation — myValue.doSomething() over DoSomething(myValue) (instance methods over free functions)
  • Prefer computed properties when there are no parameters — myValue.asString over myValue.asString()
  • Be explicit with naming — do NOT abbreviate or shorten names, clarity over brevity (e.g., replaceSpacesWithUnderscores not replaceSpaces)
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. 3mo ago First seen · 43 lines · 51 tokens per session scan A 65ba7e798e0c

Subscribe to this mod's changes

creating-extension is a skill published in the GitHub repository SwiftfulThinking/SwiftfulStarterProject (75 stars, last pushed 1mo ago), licensed MIT. It adds 51 tokens to every session and 453 once invoked, about $0.0002 per session on Opus 5.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-09-04.

Related

creating-extension compared with skills from other repositories

creating-extension next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
creating-extensionSwiftfulThinking/SwiftfulStarterProjectSkill751mo agoMITA51Claude Code
wear-compose-m3android/skillsSkill11k2d agoApache-2.0A112Claude Code
kotlin-specialistJeffallan/claude-skillsSkill13ktodayMITA86Claude Code
ink-custom-brush-builderandroid/skillsSkill11k2d agoApache-2.0A159Claude Code
swiftui-devOrkas-AI/OrkasSkill7.7ktodayMITA3Claude Code, Codex
build-android-binarymicrosoft/power-platform-skillsSkill1.2ktodayMITA150Claude Code
compose-multiplatformericrisco/rsc-harnessSkill7093d agoMITA80Claude Code, Codex