python-scala-collections

python-scala-collections is a skill for Claude Code, Codex from xuansenpa1/skillrevise. It costs 47 tokens per session (1,951 once invoked), scanned A, a copy of python-scala-collections, MIT.

A translation guide for converting common Python collection operations into idiomatic Scala code. It covers lists, maps, sets, mapping, filtering, reducing, sorting, and aggregation.

In plain words
What is it for?
It helps rewrite Python code that works with lists, dictionaries, and sets as Scala code using transformations and aggregations.
Why use it?
Developers moving between Python and Scala can spend time looking up equivalent syntax and collection methods. The guide shows how to express familiar operations in Scala.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps rewrite Python code that works with lists, dictionaries, and sets as Scala code using transformations and aggregations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xuansenpa1/skillrevise/python-scala-collections
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add xuansenpa1/skillrevise --skill python-scala-collections
Clone the repo
git clone --depth 1 https://github.com/xuansenpa1/skillrevise

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-scala-collections

README.md
[![agentmods](https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/python-scala-collections/github.svg)](https://agentmods.dev/skills/xuansenpa1/skillrevise/python-scala-collections)
Your own site
<a href="https://agentmods.dev/skills/xuansenpa1/skillrevise/python-scala-collections"><img src="https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/python-scala-collections/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-scala-collections

Your own site · 80×15
<a href="https://agentmods.dev/skills/xuansenpa1/skillrevise/python-scala-collections"><img src="https://agentmods.dev/badge/skills/xuansenpa1/skillrevise/python-scala-collections.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,951 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01951
Opus 5 $0.00023 $0.00975
Sonnet 5 $0.00009 $0.00390
Haiku 4.5 $0.00005 $0.00195

Measured 9d ago against content hash bf8556252637, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

python-scala-collections scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to python-scala-collections — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

data/skillsbench/tasks/python-scala-translation/environment/skills/python-scala-collections/SKILL.md · 345 lines

How it starts

The opening of the file, as written. The whole thing — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python to Scala Collections Translation

Collection Creation

Lists

# Python
empty = []
nums = [1, 2, 3]
repeated = [0] * 5
from_range = list(range(1, 11))
// Scala
val empty = List.empty[Int]  // or List[Int]()
val nums = List(1, 2, 3)
val repeated = List.fill(5)(0)
val fromRange = (1 to 10).toList

Dictionaries → Maps

# Python
empty = {}
person = {"name": "Alice", "age": 30}
from_pairs = dict([("a", 1), ("b", 2)])
// Scala
val empty = Map.empty[String, Int]
val person = Map("name" -> "Alice", "age" -> 30)
val fromPairs = List(("a", 1), ("b", 2)).toMap

Sets

# Python
empty = set()
nums = {1, 2, 3}
from_list = set([1, 2, 2, 3])
// Scala
val empty = Set.empty[Int]
val nums = Set(1, 2, 3)
val fromList = List(1, 2, 2, 3).toSet

Transformation Operations

Map

# Python
doubled = [x * 2 for x in nums]
doubled = list(map(lambda x: x * 2, nums))
// Scala
val doubled = nums.map(_ * 2)
val doubled = nums.map(x => x * 2)

Filter

# Python
evens = [x for x in nums if x % 2 == 0]
evens = list(filter(lambda x: x % 2 == 0, nums))
// Scala
val evens = nums.filter(_ % 2 == 0)
val evens = nums.filter(x => x % 2 == 0)

Reduce/Fold

# Python
from functools import reduce
total = reduce(lambda a, b: a + b, nums)
total = sum(nums)
product = reduce(lambda a, b: a * b, nums, 1)
// Scala
val total = nums.reduce(_ + _)
val total = nums.sum
val product = nums.foldLeft(1)(_ * _)
// Use foldLeft when you need an initial value

FlatMap

# Python
nested = [[1, 2], [3, 4]]
flat = [x for sublist in nested for x in sublist]
// Scala
val nested = List(List(1, 2), List(3, 4))
val flat = nested.flatten
// or with transformation:
val flat = nested.flatMap(identity)

Common Operations

Length/Size

Python Scala
len(lst) lst.length or lst.size
len(dct) map.size

Read the full file on GitHub · 345 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 345 lines · 47 tokens per session scan A bf8556252637

Subscribe to this mod's changes

python-scala-collections is a skill published in the GitHub repository xuansenpa1/skillrevise (56 stars, last pushed 7d ago), licensed MIT. It adds 47 tokens to every session and 1,951 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to python-scala-collections, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

matlab

Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.

K-Dense-AI/scientific-agent-skills · 42 tokens

ast-grep

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for…

JanDeDobbeleer/oh-my-posh · 80 tokens

platform-detection

Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration.…

dotnet/skills · 146 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

omh-rust

This is a Hermes-native rust workflow skill.

rlaope/oh-my-hermes · 69 tokens

axiom-concurrency

Use when writing ANY async code, actors, threads, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 43 tokens