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 agentmods add skills/cxcscmu/skilllearnbench/scala-genericsnpx skills add cxcscmu/SkillLearnBench --skill scala-genericsgit 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/scala-generics)<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/scala-generics"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/scala-generics.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 | $0.00022 | $0.01042 |
| Opus 5 | $0.00011 | $0.00521 |
| Sonnet 5 | $0.00004 | $0.00208 |
| Haiku 4.5 | $0.00002 | $0.00104 |
Grade A, and why
scala-generics 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Scala Generics and Type System for Python Developers
Core Concepts
Variance (Key Difference from Python)
Python has no explicit variance system. Scala requires explicit declarations:
Covariance (+T) - "out" position, can return subtypes:
class Container[+T](items: Seq[T]) {
def get: T = items.head // OK - returning subtype
// def set(t: T): Unit // ERROR - would be contravariant
}
Contravariance (-T) - "in" position, can accept supertypes:
class Consumer[-T] {
def consume(t: T): Unit // OK - accepting supertype
// def produce: T // ERROR - would be covariant
}
Invariance (T) - exact type, no variance:
class Handler[T] {
def get: T
def set(t: T): Unit // Both OK - invariant
}
Translation Pattern
| Python | Scala | Notes |
|---|---|---|
TypeVar("T") |
[T] |
Invariant by default |
TypeVar("T_co", covariant=True) |
[+T] |
Covariant, out-position only |
TypeVar("T_contra", contravariant=True) |
[-T] |
Contravariant, in-position only |
TypeVar("T", int, float) |
[T <: Int | Float] |
Upper bound (Scala 3) or sealed trait |
Generic[T] |
[T] |
Class definition |
Union[A, B] |
A | B (Scala 3) or sealed trait |
Use sealed traits for compatibility |
Type Bounds
// Upper bound - T must be subtype of Ordered
class Comparable[T <: Ordered[T]]
// Lower bound - T must be supertype of String
class Container[T >: String]
// Context bound (implicit evidence)
class Serializable[T: Format]
Higher-Kinded Types (Scala's advantage)
Python's TypeVar("F") for type constructors cannot express true HKTs.
Scala can use type lambdas:
// Scala 2.13 with kind-projector
type Functor[F[_]] = {
def map[A, B](fa: F[A], f: A => B): F[B]
}
// Or in Scala 3
def map[F[_], A, B](fa: F[A], f: A => B): F[B]
Translation Examples
Generic Container (Python)
class TokenContainer(Generic[T_co]):
def __init__(self, items: Sequence[T_co]) -> None:
self._items: tuple[T_co, ...] = tuple(items)
def get_all(self) -> tuple[T_co, ...]:
return self._items
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.
- 4d ago First seen · 131 lines · 22 tokens per session scan A 313cbb97c7e5
scala-generics is a skill published in the GitHub repository cxcscmu/SkillLearnBench (82 stars, last pushed 1mo ago), licensed MIT. It adds 22 tokens to every session and 1,042 once invoked, about $0.0001 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-08-30.
Other skills, from other repositories
Tradução para Espanhol Sul Americano
Traduz textos do português para o espanhol, especificamente utilizando o dialeto fluente sul americano.
logistics-rules-to-optimization
Translate logistics and operations rules into optimization variables and constraints. Use when an operations problem describes vehicles, routes, depots, pickups, dropoffs, inventory, capacity, assignments, time windows, service targets, penalties, resource limits, or other business rules that need to become an…
logistics-rules-to-optimization
Translate logistics and operations rules into optimization variables and constraints. Use when an operations problem describes vehicles, routes, depots, pickups, dropoffs, inventory, capacity, assignments, time windows, service targets, penalties, resource limits, or other business rules that need to become an…
translator
你是一个专业的中英翻译助手。请遵循以下规范:.
i18n-localization
Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.
portfolio
Cross-chain DeFi portfolio discovery, rebalancing suggestions, and NEAR Intent construction. Activates when the user pastes a wallet address or asks about yield/positions/rebalancing. Bootstraps a per-user "portfolio" project, aggregates positions across all the user's addresses inside one project, and offers a…