China Travel Kit
tczyliu/china-travel-kit
Research and plan first-time independent trips in China with bilingual, source-aware city data and official live-check entry points.
Guide for writing idiomatic Scala when translating from Python.
$ npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-idioms --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/python-scala-translation/environment/skills/python-scala-idioms .claude/skills/python-scala-idioms && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "python-scala-idioms" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-idioms into .claude/skills/python-scala-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-idioms", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-idiomsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-idioms --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .agents/skills && cp -r skills-src/tasks/python-scala-translation/environment/skills/python-scala-idioms .agents/skills/python-scala-idioms && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "python-scala-idioms" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-idioms into .agents/skills/python-scala-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-idioms", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-idioms --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/tasks/python-scala-translation/environment/skills/python-scala-idioms .cursor/skills/python-scala-idioms && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "python-scala-idioms" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-idioms into .cursor/skills/python-scala-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-idioms", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/benchflow-ai/skillsbench.git --path tasks/python-scala-translation/environment/skills/python-scala-idioms--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-idioms --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/tasks/python-scala-translation/environment/skills/python-scala-idioms .gemini/skills/python-scala-idioms && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "python-scala-idioms" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-idioms into .gemini/skills/python-scala-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-idioms", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install benchflow-ai/skillsbench python-scala-idiomsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .github/skills && cp -r skills-src/tasks/python-scala-translation/environment/skills/python-scala-idioms .github/skills/python-scala-idioms && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "python-scala-idioms" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-idioms into .github/skills/python-scala-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-idioms", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-idioms --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/tasks/python-scala-translation/environment/skills/python-scala-idioms .opencode/skills/python-scala-idioms && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "python-scala-idioms" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-idioms into .opencode/skills/python-scala-idioms/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-idioms", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
python-scala-idiomsGuide for writing idiomatic Scala when translating from Python.
Python Scala Idioms is an agent skill from benchflow-ai/skillsbench. Guide for writing idiomatic Scala when translating from Python. Use when the goal is not just syntactic translation but producing clean, idiomatic Scala code. Covers immutability, expression-based style, sealed hierarchies, and common Scala conventions.
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Writing & Content, covering Translation. It works with Python. The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are scala and python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Python Scala Idioms loads about 1.9k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 212 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 212 words, ~1,878 tokens.
.claude/skills/python-scala-idioms/SKILL.md (or your agent's skills folder).When translating Python to Scala, aim for idiomatic Scala, not literal translation:
val over var, immutable collectionsAnyOption, Either, Try# Python - mutable by default
class Counter:
def __init__(self):
self.count = 0
def increment(self):
self.count += 1
return self.count// Scala - immutable approach
case class Counter(count: Int = 0) {
def increment: Counter = copy(count = count + 1)
}
// Usage
val c1 = Counter()
val c2 = c1.increment // Counter(1)
val c3 = c2.increment // Counter(2)
// c1 is still Counter(0)# Python - statement-based
def get_status(code):
if code == 200:
status = "OK"
elif code == 404:
status = "Not Found"
else:
status = "Unknown"
return status// Scala - expression-based
def getStatus(code: Int): String = code match {
case 200 => "OK"
case 404 => "Not Found"
case _ => "Unknown"
}
// No intermediate variable, match is an expression# Python - loose typing
def process_payment(method: str, amount: float):
if method == "credit":
# process credit
pass
elif method == "debit":
# process debit
pass
elif method == "crypto":
# process crypto
pass// Scala - sealed trait for exhaustive matching
sealed trait PaymentMethod
case class CreditCard(number: String, expiry: String) extends PaymentMethod
case class DebitCard(number: String) extends PaymentMethod
case class Crypto(walletAddress: String) extends PaymentMethod
def processPayment(method: PaymentMethod, amount: Double): Unit = method match {
case CreditCard(num, exp) => // process credit
case DebitCard(num) => // process debit
case Crypto(addr) => // process crypto
}
// Compiler warns if you miss a case!# Python
def find_user(id):
user = db.get(id)
if user is None:
return None
profile = user.get("profile")
if profile is None:
return None
return profile.get("email")// Scala - Option chaining
def findUser(id: Int): Option[String] = for {
user <- db.get(id)
profile <- user.profile
email <- profile.email
} yield email
// Or with flatMap
def findUser(id: Int): Option[String] =
db.get(id)
.flatMap(_.profile)
.flatMap(_.email)# Python
result = []
for item in items:
if item.active:
result.append(item.value * 2)// Scala - use collection methods
val result = items
.filter(_.active)
.map(_.value * 2)# Python
items = []
for x in range(10):
items.append(x * 2)
print(f"Added {x * 2}")// Scala - separate side effects
val items = (0 until 10).map(_ * 2).toList
items.foreach(x => println(s"Value: $x"))
// Or use tap for debugging
val items = (0 until 10)
.map(_ * 2)
.tapEach(x => println(s"Value: $x"))
.toList# Python
def create_user(name, email, admin=False, active=True):
pass
user = create_user("Alice", "alice@example.com", admin=True)// Scala - named parameters work the same
def createUser(
name: String,
email: String,
admin: Boolean = false,
active: Boolean = true
): User = ???
val user = createUser("Alice", "alice@example.com", admin = true)
// Case class with defaults is often better
case class User(
name: String,
email: String,
admin: Boolean = false,
active: Boolean = true
)
val user = User("Alice", "alice@example.com", admin = true)| Python | Scala |
|---|---|
snake_case (variables, functions) | camelCase |
SCREAMING_SNAKE (constants) | CamelCase or PascalCase |
PascalCase (classes) | PascalCase |
_private | private keyword |
__very_private | private[this] |
# Python
MAX_RETRY_COUNT = 3
def calculate_total_price(items):
pass
class ShoppingCart:
def __init__(self):
self._items = []// Scala
val MaxRetryCount = 3 // or final val MAX_RETRY_COUNT
def calculateTotalPrice(items: List[Item]): Double = ???
class ShoppingCart {
private var items: List[Item] = Nil
}# Python - None return is common
def save_user(user):
db.save(user)
# implicit None return// Scala - consider returning useful information
def saveUser(user: User): Either[Error, UserId] = {
db.save(user) match {
case Right(id) => Right(id)
case Left(err) => Left(err)
}
}
// Or at minimum, use Try
def saveUser(user: User): Try[Unit] = Try {
db.save(user)
}# Python
class Parser:
def __init__(self, config):
self.config = config
@classmethod
def default(cls):
return cls(Config())// Scala - companion object with apply
class Parser(config: Config)
object Parser {
def apply(config: Config): Parser = new Parser(config)
def apply(): Parser = new Parser(Config())
}
// Usage
val parser = Parser() // Calls apply()
val parser = Parser(customConfig)| Python Pattern | Idiomatic Scala |
|---|---|
if x is None | x.isEmpty or pattern match |
if x is not None | x.isDefined or x.nonEmpty |
x if x else default | x.getOrElse(default) |
[x for x in xs if p(x)] | xs.filter(p) |
[f(x) for x in xs] | xs.map(f) |
any(p(x) for x in xs) | xs.exists(p) |
all(p(x) for x in xs) | xs.forall(p) |
next(x for x in xs if p(x), None) | xs.find(p) |
dict(zip(keys, values)) | keys.zip(values).toMap |
isinstance(x, Type) | x.isInstanceOf[Type] or pattern match |
try: ... except: ... | Try { ... } or pattern match |
| Mutable accumulator loop | foldLeft / foldRight |
for i, x in enumerate(xs) | xs.zipWithIndex |
// DON'T: Use null
val name: String = null // Bad!
// DO: Use Option
val name: Option[String] = None
// DON'T: Use Any or type casts
val data: Any = getData()
val name = data.asInstanceOf[String]
// DO: Use proper types and pattern matching
sealed trait Data
case class UserData(name: String) extends Data
val data: Data = getData()
data match {
case UserData(name) => // use name
}
// DON'T: Nested if-else chains
if (x == 1) ... else if (x == 2) ... else if (x == 3) ...
// DO: Pattern matching
x match {
case 1 => ...
case 2 => ...
case 3 => ...
}
// DON'T: var with mutation
var total = 0
for (x <- items) total += x
// DO: fold
val total = items.sum
// or
val total = items.foldLeft(0)(_ + _)© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in tasks/python-scala-translation/environment/skills/python-scala-idioms of benchflow-ai/skillsbench.
Open the folder on GitHubat commit 9a1f4dd
Python Scala Idioms next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Python Scala Idioms this skillbenchflow-ai/skillsbench | 1.8k | — | ~1.9k | Automated safety check: Pass | Apache-2.0 | |
| China Travel Kittczyliu/china-travel-kit | 194 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Technology Searchfreestylefly/wesight | 943 | — | ~3.3k | Automated safety check: Pass | MIT | |
| Translate Popython/python-docs-zh-tw | 284 | — | ~793 | Automated safety check: Pass | Custom licence | |
| Obs Build LogsNuitka/Nuitka | 15k | — | ~849 | Automated safety check: Pass | AGPL-3.0 | |
| Update Gui TranslationsArduPilot/MethodicConfigurator | 163 | — | ~1.5k | Automated safety check: Pass | GPL-3.0 |
tczyliu/china-travel-kit
Research and plan first-time independent trips in China with bilingual, source-aware city data and official live-check entry points.
freestylefly/wesight
Search tech blogs, developer forums, and IT media (TechCrunch, Hacker News, 36氪, etc.) for software and hardware industry updates with heat ranking and EN↔CN translation.
python/python-docs-zh-tw
Translates PO file entries from English to Traditional Chinese (zhTW) following project conventions.
Nuitka/Nuitka
Access and diagnose openSUSE Build Service (OBS) package build logs.
ArduPilot/MethodicConfigurator
Update existing GUI translations using AI assistance. An agent skill from ArduPilot/MethodicConfigurator.
python/python-docs-zh-tw
Checks terminology consistency against project glossary and identifies zhCN terms that need conversion to zhTW.
benchflow-ai/skillsbench
This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…
benchflow-ai/skillsbench
World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.
benchflow-ai/skillsbench
AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.
benchflow-ai/skillsbench
Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.
benchflow-ai/skillsbench
Build deterministic, verifiable data visualizations with D3.js (v6).
benchflow-ai/skillsbench
DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.
Works with
Categories
Guide for writing idiomatic Scala when translating from Python. Python Scala Idioms is an agent skill from benchflow-ai/skillsbench. Guide for writing idiomatic Scala when translating from Python.
Python Scala Idioms fits situations like: the goal is not just syntactic translation but producing clean; idiomatic Scala code.
Run `npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a claude-code`. Or copy the skill folder (tasks/python-scala-translation/environment/skills/python-scala-idioms in benchflow-ai/skillsbench) into .claude/skills/python-scala-idioms in your project. Claude Code loads it when a task matches its description.
Run `npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a codex`. Or copy the skill folder (tasks/python-scala-translation/environment/skills/python-scala-idioms in benchflow-ai/skillsbench) into .agents/skills/python-scala-idioms in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill python-scala-idioms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/python-scala-idioms, .gemini/skills/python-scala-idioms, .github/skills/python-scala-idioms and .opencode/skills/python-scala-idioms in your project.
SKILL.md names no scripts, command-line tools or credentials: Python Scala Idioms is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Python Scala Idioms is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Python Scala Idioms: China Travel Kit (tczyliu/china-travel-kit, 194 stars), Technology Search (freestylefly/wesight, 943 stars), Translate Po (python/python-docs-zh-tw, 284 stars) and Obs Build Logs (Nuitka/Nuitka, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 178 skills in this directory. The repository was last updated on July 23, 2026.
Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.