agentsclimarketplace

Scala idioms ref

Skill cxcscmu/SkillLearnBench/skills/b4-skill-creator-gemini-3.1-flash-lite-preview/python-scala-translation/scala-idioms-ref

[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.From the repository description

Install
npx -y skills add cxcscmu/SkillLearnBench --skill scala-idioms-ref

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

SKILL.md

1.1 KB, 334 tokens by cl100k_base, as published. Nobody here has run it

name: scala-idioms-ref description: Idiomatic Scala patterns for common Python idioms. Use this to translate Pythonic code into idiomatic Scala 2.13. Covers case classes, Option/Either, pattern matching, collections, and higher-order functions.

Idiomatic Translations (Python -> Scala)

1. Data Structures

  • Python: @dataclass(frozen=True) -> Scala: case class Token(value: String, tokenType: TokenType, metadata: Map[String, Any] = Map.empty)
  • Python: Union[str, int] -> Scala: sealed trait ValueType; case class StringVal(v: String) extends ValueType; ... (ADT)
  • Python: list[T] -> Scala: List[T] or Seq[T] (immutable)

2. Control Flow

  • Python: if x is None: ... -> Scala: x match { case None => ... } or x.fold(...)
  • Python: for v in values: yield v -> Scala: values.iterator

3. Error Handling

  • Python: try...except / raise -> Scala: Try { ... } or Either[Error, Result]

4. Functional Programming

  • Python: Callable[[T], R] -> Scala: T => R
  • Python: list comprehension -> Scala: list.map(f) or for { x <- list } yield f(x)

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.