agentsclimarketplace

Scala data modeling

Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-gemini-3.1-flash-lite-preview/python-scala-translation/scala-data-modeling

Modeling domain entities and transformations using case classes, companion objects, and type-safe hierarchies.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill scala-data-modeling

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

0.9 KB, 183 tokens by cl100k_base, as published. Nobody here has run it

Modeling Strategies

  • Case Classes: Use case class for immutable data structures. They provide structural equality, pattern matching support, and a concise syntax.
  • Companion Objects: Place factory methods, default values, and related logic in a companion object.
  • ADT (Algebraic Data Types): Combine sealed trait with case class/case object for type-safe modeling of heterogeneous data.
  • Type Aliases: Use type for simplifying complex types.

Example

sealed trait TokenValue
case class StringVal(s: String) extends TokenValue
case class NumericVal(n: Double) extends TokenValue

case class Token(value: TokenValue, metadata: Map[String, String] = Map.empty)

object Token {
  def apply(s: String): Token = new Token(StringVal(s))
}

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.