agentsclimarketplace

Python scala libraries

Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-gemini-3-flash-preview/python-scala-translation/python-scala-libraries

Mapping standard and common libraries from Python to Scala, including datetime, decimal, and JSON.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill python-scala-libraries

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

SKILL.md

1.2 KB, 279 tokens by cl100k_base, as published. Nobody here has run it

Python to Scala Libraries and Specialized Types

This skill covers the translation of library-specific functionality.

Datetime

  • Python: datetime.datetime, datetime.date.
  • Scala: java.time.LocalDateTime, java.time.LocalDate.
  • Formatting: java.time.format.DateTimeFormatter.
PythonScala
dt.strftime("%Y-%m-%d")dt.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))
datetime.now()LocalDateTime.now()

Decimal

  • Python: decimal.Decimal.
  • Scala: BigDecimal.
  • Formatting: f"$decimal%.2f".

JSON (Circe)

  • Python: json.dumps(obj), json.loads(str).
  • Scala (Circe): obj.asJson.noSpaces, parse(str).
  • Recursive JSON: Use io.circe.Json for a safe representation.

Error Handling

  • Python: try...except, raise RuntimeError.
  • Scala: Try[T] (Success/Failure), Either[L, R].
  • Runtime Error: throw new RuntimeException("...").
import scala.util.Try
val result = Try(operation()) // Success(v) or Failure(e)

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.