shared-model-designer

shared-model-designer is an agent for coding agents from ahmed3elshaer/everything-claude-code-mobile. It costs 35 tokens per session (1,882 once invoked), scanned A, original, MIT.

A guide for designing data models shared by Kotlin Multiplatform (KMP) apps, which reuse code across platforms such as Android and iOS.

In plain words
What is it for?
Creating serializable Kotlin data classes, platform-neutral types, validation rules, result hierarchies, and iOS interoperability annotations.
Why use it?
It helps keep shared data portable, validated, immutable, and usable from Swift code.

Agent

Part of the everything-claude-code-mobile plugin — 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers shipped together

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 agents/ahmed3elshaer/everything-claude-code-mobile/shared-model-designer
Clone the repo
git clone --depth 1 https://github.com/ahmed3elshaer/everything-claude-code-mobile

Or install everything-claude-code-mobile, the plugin that ships this one along with the rest of its 46 skills, 35 commands, 27 agents, 2 hooks, 3 MCP servers.

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 shared-model-designer

README.md
[![agentmods](https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/shared-model-designer.svg)](https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/shared-model-designer)
Your own site
<a href="https://agentmods.dev/agents/ahmed3elshaer/everything-claude-code-mobile/shared-model-designer"><img src="https://agentmods.dev/badge/agents/ahmed3elshaer/everything-claude-code-mobile/shared-model-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,882 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 $0.00035 $0.01882
Opus 5 $0.00017 $0.00941
Sonnet 5 $0.00007 $0.00376
Haiku 4.5 $0.00003 $0.00188

Measured 5d ago against content hash 2c8c05fd57b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

shared-model-designer 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 5d 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.

.opencode/agents/shared-model-designer.md · 360 lines

How it starts

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

Shared Model Designer

Design and implement cross-platform data models for Kotlin Multiplatform.

Core Principles

  1. Serialization - Use kotlinx.serialization for all shared models
  2. Immutability - Use val and data classes
  3. Platform Compatibility - Ensure Swift interop works
  4. Validation - Domain validation in models
  5. Type Safety - Avoid platform-specific types

Model Design Checklist

✅ DO

// ✅ Immutable data class
@Serializable
data class User(
    val id: String,
    val name: String,
    val email: String,
    val avatarUrl: String?,
    val createdAt: Instant,
    val metadata: Map<String, String> = emptyMap()
)

// ✅ Sealed hierarchy for state
@Serializable
sealed class Result<out T> {
    @Serializable
    data class Success<T>(val data: T) : Result<T>()

    @Serializable
    data class Error(val message: String, val code: String? = null) : Result<Nothing>()
}

// ✅ Platform-agnostic types
@Serializable
data class Timestamp(val value: Long) {
    fun toInstant(): Instant = Instant.fromEpochMilliseconds(value)
    companion object {
        fun now(): Timestamp = Timestamp(Clock.System.now().toEpochMilliseconds())
    }
}

❌ DON'T

// ❌ Platform-specific types (won't serialize)
@Serializable
data class Event(
    val date: Date,           // ❌ Use Instant/Long
    val file: File,           // ❌ Use String path
    val uuid: UUID            // ❌ Use String, or custom serializer
)

// ❌ Mutable collections
@Serializable
data class UsersResponse(
    val users: MutableList<User>  // ❌ Use List
)

// ❌ Complex nested nulls
@Serializable
data class Complex(
    val field: Map<String, List<String?>?>  // ❌ Simplify
)

// ❌ var in data classes
@Serializable
data class User(
    var name: String  // ❌ Use val
)

iOS Interop Annotations

@ObjCName for Swift

// ✅ Add @ObjCName for clean Swift API
@ObjCName("UserModel")
@Serializable
data class User(
    @ObjCName("userId")
    val id: String,

    @ObjCName("fullName")
    val name: String,

    @ObjCName("emailAddress")
    val email: String
)

// Swift usage:
// let user = UserModel(userId: "123", fullName: "John", emailAddress: "[email protected]")

Read the full file on GitHub · 360 lines

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. 5d ago First seen · 360 lines · 35 tokens per session scan A 2c8c05fd57b4

Subscribe to this mod's changes

shared-model-designer is an agent published in the GitHub repository ahmed3elshaer/everything-claude-code-mobile (65 stars, last pushed 2mo ago), licensed MIT. It adds 35 tokens to every session and 1,882 once invoked, about $0.0002 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-08-30.

Related

Other agents, from other repositories