creating-model

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

A scaffold for Swift data models, which are structures that represent app data. It creates Codable models for converting data to and from stored or transmitted formats, with coding keys, event parameters, and mock data; it supports database-synced, simple, and enum models.

In plain words
What is it for?
Use it to create a new Swift struct, data type, or enum for database records, local configuration, UI state, or API responses.
Why use it?
It avoids repeatedly writing the standard model code and helps place new models in the app's expected manager folder.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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.

agentmods
npx agentmods add skills/swiftfulthinking/swiftfulstarterproject/creating-model
Any agent
npx skills add SwiftfulThinking/SwiftfulStarterProject --skill creating-model
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-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/swiftfulthinking/swiftfulstarterproject/creating-model.svg)](https://agentmods.dev/skills/swiftfulthinking/swiftfulstarterproject/creating-model)
Your own site
<a href="https://agentmods.dev/skills/swiftfulthinking/swiftfulstarterproject/creating-model"><img src="https://agentmods.dev/badge/skills/swiftfulthinking/swiftfulstarterproject/creating-model.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 680 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00059 $0.00680
Opus 5 $0.00030 $0.00340
Sonnet 5 $0.00012 $0.00136
Haiku 4.5 $0.00006 $0.00068

Measured yesterday against content hash 72446abd8893, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

creating-model 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 yesterday.

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-model/SKILL.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating Model

Scaffold a data model with the correct conformances, CodingKeys, analytics parameters, and mock data.

Steps

  1. Get the model name from the user (PascalCase, e.g., "Post", "Message", "Avatar")
  2. Determine the model type (see below)
  3. Read references/templates.md for the templates
  4. Substitute {ModelName}, {modelName}, and {modelname} throughout
  5. Determine the folder location (see below)
  6. Create the file

Choosing the Model Type

Type When to Use Conformances
Data Sync Model Model will be synced to/from a database via DataManagers DataSyncModelProtocol (StringIdentifiable, Codable, Sendable)
Simple Model Local config, UI state, or API response that isn't database-synced StringIdentifiable, Codable, Hashable
Enum Model Fixed set of options (AB test variants, categories, status) String, Codable, CaseIterable

If unclear, ask the user whether the model will be synced to a database.

Folder Location

Models live under their related manager: Managers/{ManagerName}/Models/

  • Check existing managers in Managers/ to determine which manager owns this model
  • If the model belongs to a new manager, suggest creating the manager first
  • If unclear, ask the user which manager this model belongs to

Key Patterns

  • Naming: File and struct are {ModelName}Model.swift / {ModelName}Model — enum models omit the Model suffix
  • Data sync models must be public struct with public var id: String — required by DataSyncModelProtocol
  • CodingKeys always use snake_case raw values (e.g., case firstName = "first_name")
  • eventParameters — computed property mapping each property to a prefixed analytics key using CodingKeys raw values. Prefix with the model's lowercase name, max 8 characters (e.g., "user_\(CodingKeys.email.rawValue)"). Check existing models in Managers/**/Models/ to ensure no other model uses the same prefix — if there's a conflict, abbreviate (e.g., "avatar" → "avtr", "message" → "msg")
  • static var mock returns mocks[0]static var mocks returns an array of realistic test instances
  • All properties should be optional (with ?) unless truly required — models from a database may have missing fields
  • init with all properties as parameters — use default values of nil for optionals
  • import SwiftfulDataManagers only for data sync models — simple models just need import SwiftUI

Read the full file on GitHub · 47 lines

Files

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.

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. yesterday First seen · 47 lines · 59 tokens per session scan A 72446abd8893

Subscribe to this mod's changes

creating-model is a skill published in the GitHub repository SwiftfulThinking/SwiftfulStarterProject (74 stars, last pushed 5mo ago), licensed MIT. It adds 59 tokens to every session and 680 once invoked, about $0.0003 per session on Opus 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

Other skills, from other repositories

kotlin-specialist

Provides idiomatic Kotlin implementation patterns including coroutine concurrency, Flow stream handling, multiplatform architecture, Compose UI construction, Ktor server setup, and type-safe DSL design. Use when building Kotlin applications requiring coroutines, multiplatform development, or Android with Compose.…

Jeffallan/claude-skills · 86 tokens

swiftui-dev

Use this skill for SwiftUI development, architecture, structure, performance, and Apple native app profiling. It combines.

Orkas-AI/Orkas · 3 tokens

developing-genkit-dart

Generates code and provides documentation for the Genkit Dart SDK. Use when the user asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.

google/skills · 48 tokens

wax

Swift framework guidance for Wax on-device memory/RAG. Use when writing Swift code with the public Memory facade, experimental PhotoMemory / VideoMemory, BuiltInMultimodalEmbeddings, embedding providers, retrieval modes, or hybrid search. For agent operators using the Wax MCP server tools, use the separate wax-mcp…

christopherkarani/Wax · 68 tokens

mobiai-kmp

Use when working on a Kotlin Multiplatform project — shared code, expect/actual declarations, platform-specific implementations, building and testing.

ArisGuimera/MobiAI-Core · 32 tokens

kotlin-concurrency-expert

Kotlin Coroutines review and remediation for Android. Use when asked to review concurrency usage, fix coroutine-related bugs, improve thread safety, or resolve lifecycle issues in Kotlin/Android code.

new-silvermoon/awesome-android-agent-skills · 44 tokens