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 translating Python code to functional Scala style.
$ npx skills add benchflow-ai/skillsbench --skill python-scala-functional -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-functional --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-functional .claude/skills/python-scala-functional && 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-functional" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-functional into .claude/skills/python-scala-functional/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-functional", 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-functionalType 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-functional -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-functional --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-functional .agents/skills/python-scala-functional && 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-functional" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-functional into .agents/skills/python-scala-functional/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-functional", 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-functional -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-functional --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-functional .cursor/skills/python-scala-functional && 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-functional" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-functional into .cursor/skills/python-scala-functional/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-functional", 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-functional--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-functional -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install benchflow-ai/skillsbench python-scala-functional --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-functional .gemini/skills/python-scala-functional && 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-functional" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-functional into .gemini/skills/python-scala-functional/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-functional", 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-functionalInstalls 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-functional -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-functional .github/skills/python-scala-functional && 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-functional" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-functional into .github/skills/python-scala-functional/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-functional", 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-functional -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-functional --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-functional .opencode/skills/python-scala-functional && 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-functional" agent skill from https://github.com/benchflow-ai/skillsbench/tree/main/tasks/python-scala-translation/environment/skills/python-scala-functional into .opencode/skills/python-scala-functional/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "python-scala-functional", 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-functionalGuide for translating Python code to functional Scala style.
Python Scala Functional is an agent skill from benchflow-ai/skillsbench. Guide for translating Python code to functional Scala style. Use when converting Python code involving higher-order functions, decorators, closures, generators, or when aiming for idiomatic functional Scala with pattern matching, Option handling, and monadic operations.
Its SKILL.md is about 2k 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.
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 python and scala).
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 Functional loads about 2k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 36 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). 36 words, ~1,995 tokens.
.claude/skills/python-scala-functional/SKILL.md (or your agent's skills folder).# Python
def apply_twice(f, x):
return f(f(x))
def make_multiplier(n):
return lambda x: x * n
double = make_multiplier(2)
result = apply_twice(double, 5) # 20// Scala
def applyTwice[A](f: A => A, x: A): A = f(f(x))
def makeMultiplier(n: Int): Int => Int = x => x * n
val double = makeMultiplier(2)
val result = applyTwice(double, 5) // 20# Python
def log_calls(func):
def wrapper(*args, **kwargs):
print(f"Calling {func.__name__}")
result = func(*args, **kwargs)
print(f"Finished {func.__name__}")
return result
return wrapper
@log_calls
def add(a, b):
return a + b// Scala - function composition
def logCalls[A, B](f: A => B, name: String): A => B = { a =>
println(s"Calling $name")
val result = f(a)
println(s"Finished $name")
result
}
val add = (a: Int, b: Int) => a + b
val loggedAdd = logCalls(add.tupled, "add")
// Alternative: using by-name parameters
def withLogging[A](name: String)(block: => A): A = {
println(s"Calling $name")
val result = block
println(s"Finished $name")
result
}# Python (3.10+)
def describe(value):
match value:
case 0:
return "zero"
case int(x) if x > 0:
return "positive int"
case int(x):
return "negative int"
case [x, y]:
return f"pair: {x}, {y}"
case {"name": name, "age": age}:
return f"{name} is {age}"
case _:
return "unknown"// Scala - pattern matching is more powerful
def describe(value: Any): String = value match {
case 0 => "zero"
case x: Int if x > 0 => "positive int"
case _: Int => "negative int"
case (x, y) => s"pair: $x, $y"
case List(x, y) => s"list of two: $x, $y"
case m: Map[_, _] if m.contains("name") =>
s"${m("name")} is ${m("age")}"
case _ => "unknown"
}
// Case class pattern matching (preferred)
sealed trait Result
case class Success(value: Int) extends Result
case class Error(message: String) extends Result
def handle(result: Result): String = result match {
case Success(v) if v > 100 => s"Big success: $v"
case Success(v) => s"Success: $v"
case Error(msg) => s"Failed: $msg"
}# Python
def find_user(user_id: int) -> Optional[User]:
user = db.get(user_id)
return user if user else None
def get_user_email(user_id: int) -> Optional[str]:
user = find_user(user_id)
if user is None:
return None
return user.email
# Chained operations
def get_user_city(user_id: int) -> Optional[str]:
user = find_user(user_id)
if user is None:
return None
address = user.address
if address is None:
return None
return address.city// Scala - Option monad
def findUser(userId: Int): Option[User] = db.get(userId)
def getUserEmail(userId: Int): Option[String] =
findUser(userId).map(_.email)
// Chained operations with flatMap
def getUserCity(userId: Int): Option[String] =
findUser(userId)
.flatMap(_.address)
.map(_.city)
// For-comprehension (cleaner for multiple operations)
def getUserCity(userId: Int): Option[String] = for {
user <- findUser(userId)
address <- user.address
city <- Option(address.city)
} yield city
// Getting values out
val email = getUserEmail(1).getOrElse("no-email@example.com")
val emailOrThrow = getUserEmail(1).get // Throws if None# Python
def fibonacci():
a, b = 0, 1
while True:
yield a
a, b = b, a + b
# Take first 10
fibs = list(itertools.islice(fibonacci(), 10))// Scala - LazyList (was Stream in Scala 2.12)
def fibonacci: LazyList[BigInt] = {
def loop(a: BigInt, b: BigInt): LazyList[BigInt] =
a #:: loop(b, a + b)
loop(0, 1)
}
val fibs = fibonacci.take(10).toList
// Alternative: Iterator
def fibonacciIterator: Iterator[BigInt] = new Iterator[BigInt] {
private var (a, b) = (BigInt(0), BigInt(1))
def hasNext: Boolean = true
def next(): BigInt = {
val result = a
val newB = a + b
a = b
b = newB
result
}
}# Python - exceptions
def parse_int(s: str) -> int:
try:
return int(s)
except ValueError:
return 0
# Python - Optional for errors
def safe_parse_int(s: str) -> Optional[int]:
try:
return int(s)
except ValueError:
return None// Scala - Try monad
import scala.util.{Try, Success, Failure}
def parseInt(s: String): Try[Int] = Try(s.toInt)
val result = parseInt("123") match {
case Success(n) => s"Got: $n"
case Failure(e) => s"Error: ${e.getMessage}"
}
// Chaining Try operations
val doubled = parseInt("123").map(_ * 2)
// Either for custom error types
def parsePositive(s: String): Either[String, Int] = {
Try(s.toInt).toEither
.left.map(_ => "Not a number")
.flatMap { n =>
if (n > 0) Right(n)
else Left("Must be positive")
}
}# Python
def compose(f, g):
return lambda x: f(g(x))
def pipe(*functions):
def inner(x):
result = x
for f in functions:
result = f(result)
return result
return inner
# Usage
add_one = lambda x: x + 1
double = lambda x: x * 2
pipeline = pipe(add_one, double, add_one) # (x + 1) * 2 + 1// Scala - built-in composition
val addOne: Int => Int = _ + 1
val double: Int => Int = _ * 2
// compose: f.compose(g) = f(g(x))
val composed = addOne.compose(double) // addOne(double(x))
// andThen: f.andThen(g) = g(f(x))
val pipeline = addOne.andThen(double).andThen(addOne) // (x + 1) * 2 + 1# Python
from functools import partial
def add(a, b, c):
return a + b + c
add_5 = partial(add, 5)
result = add_5(3, 2) # 10// Scala - curried functions
def add(a: Int)(b: Int)(c: Int): Int = a + b + c
val add5 = add(5) _ // Partially applied
val result = add5(3)(2) // 10
// Converting between curried and uncurried
val uncurried = Function.uncurried(add _)
val curried = (uncurried _).curried
// Multiple parameter lists
def fold[A, B](init: B)(list: List[A])(f: (B, A) => B): B =
list.foldLeft(init)(f)
val sum = fold(0)(List(1, 2, 3))(_ + _)# Python - no tail call optimization
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
# Workaround: iterative
def factorial_iter(n):
result = 1
for i in range(2, n + 1):
result *= i
return result// Scala - tail recursion with annotation
import scala.annotation.tailrec
def factorial(n: Int): BigInt = {
@tailrec
def loop(n: Int, acc: BigInt): BigInt = {
if (n <= 1) acc
else loop(n - 1, n * acc)
}
loop(n, 1)
}# Python - no direct equivalent
# Duck typing provides flexibility// Scala - type classes via implicits (Scala 2) or given/using (Scala 3)
// Scala 3
trait Show[A]:
def show(a: A): String
given Show[Int] with
def show(a: Int): String = s"Int: $a"
def display[A](a: A)(using s: Show[A]): String = s.show(a)
// Scala 2
trait Show[A] {
def show(a: A): String
}
implicit val intShow: Show[Int] = new Show[Int] {
def show(a: Int): String = s"Int: $a"
}
def display[A](a: A)(implicit s: Show[A]): String = s.show(a)© 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-functional of benchflow-ai/skillsbench.
Open the folder on GitHubat commit 9a1f4dd
Python Scala Functional 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 Functional this skillbenchflow-ai/skillsbench | 1.8k | — | ~2k | 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 translating Python code to functional Scala style. Python Scala Functional is an agent skill from benchflow-ai/skillsbench. Guide for translating Python code to functional Scala style.
Python Scala Functional fits situations like: converting Python code involving higher-order functions; aiming for idiomatic functional Scala with pattern matching; option handling; monadic operations.
Run `npx skills add benchflow-ai/skillsbench --skill python-scala-functional -a claude-code`. Or copy the skill folder (tasks/python-scala-translation/environment/skills/python-scala-functional in benchflow-ai/skillsbench) into .claude/skills/python-scala-functional in your project. Claude Code loads it when a task matches its description.
Run `npx skills add benchflow-ai/skillsbench --skill python-scala-functional -a codex`. Or copy the skill folder (tasks/python-scala-translation/environment/skills/python-scala-functional in benchflow-ai/skillsbench) into .agents/skills/python-scala-functional 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-functional -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-functional, .gemini/skills/python-scala-functional, .github/skills/python-scala-functional and .opencode/skills/python-scala-functional in your project.
SKILL.md names no scripts, command-line tools or credentials: Python Scala Functional 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 Functional 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 2k tokens (SKILL.md is roughly 8k 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 Functional: 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.