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.
npx skills add cxcscmu/SkillLearnBench --skill python-scala-sealed-enumgit clone --depth 1 https://github.com/cxcscmu/SkillLearnBenchWrote 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.
[](https://agentmods.dev/skills/cxcscmu/skilllearnbench/python-scala-sealed-enum)<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/python-scala-sealed-enum"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/python-scala-sealed-enum.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.00476 |
| Opus 5 | $0.00017 | $0.00238 |
| Sonnet 5 | $0.00007 | $0.00095 |
| Haiku 4.5 | $0.00003 | $0.00048 |
Grade A, and why
python-scala-sealed-enum 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 3d 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.
What it actually says
Python Enum → Scala Sealed Traits
Python Pattern
class TokenType(Enum):
STRING = "string"
NUMERIC = "numeric"
NULL = "null"
Scala Idiomatic Translation
Use sealed abstract class (not Enum) with a companion object holding case object members:
sealed abstract class TokenType(val value: String)
object TokenType {
case object STRING extends TokenType("string")
case object NUMERIC extends TokenType("numeric")
case object NULL extends TokenType("null")
}
Why sealed abstract class over sealed trait?
- Use
sealed abstract classwhen members need constructor parameters (likevalue: String). - Use
sealed traitfor purely marker/tag types with no data.
Key Differences from Python
| Python | Scala |
|---|---|
TokenType.STRING.value |
TokenType.STRING.value (same API) |
isinstance(x, TokenType) |
Pattern match on sealed type |
Can iterate list(TokenType) |
Use Set(STRING, NUMERIC, ...) manually |
TokenType["STRING"] |
Not needed; use TokenType.STRING directly |
Exhaustive Pattern Matching (Bonus)
def describe(t: TokenType): String = t match {
case TokenType.STRING => "A string token"
case TokenType.NUMERIC => "A numeric token"
case TokenType.NULL => "A null token"
// Compiler warns if a case is missing (because sealed)
}
Companion Object values List (if needed)
object TokenType {
case object STRING extends TokenType("string")
case object NUMERIC extends TokenType("numeric")
case object NULL extends TokenType("null")
val values: List[TokenType] = List(STRING, NUMERIC, NULL)
def fromString(s: String): Option[TokenType] =
values.find(_.value == s)
}
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.
- 3d ago First seen · 65 lines · 34 tokens per session scan A 6d9c0e5697d4
python-scala-sealed-enum is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 476 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
rdkit
Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom…
pcap-analysis
Guidance for analyzing network packet captures (PCAP files) and computing network statistics using Python, with tested utility functions.
memory-optimization
Optimize Python code for reduced memory usage and improved memory efficiency. Use when asked to reduce memory footprint, fix memory leaks, optimize data structures for memory, handle large datasets efficiently, or diagnose memory issues. Covers object sizing, generator patterns, efficient data structures, and memory…
python-parallelization
Transform sequential Python code into parallel/concurrent implementations. Use when asked to parallelize Python code, improve code performance through concurrency, convert loops to parallel execution, or identify parallelization opportunities. Handles CPU-bound (multiprocessing), I/O-bound (asyncio, threading), and…
trl
Reference for the TRL (Transformer Reinforcement Learning) library codebase. Use proactively before reading or editing any file under trl/ so you have the intended contracts and invariants in mind, not just what the current code says. Covers trainer hierarchy (SFT, DPO, GRPO, KTO), shared utility functions…
parallel-processing
Parallel processing with joblib for grid search and batch computations. Use when speeding up computationally intensive tasks across multiple CPU cores.