用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill python-scala-oop命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
基于 SOC 职业分类
正在显示 SKILL.md
| name | python-scala-oop |
| description | Translating Python classes, inheritance, and generic variance to Scala equivalents. |
This skill covers the translation of object-oriented concepts from Python to Scala.
@dataclass(frozen=True)case class (immutable by default, comes with copy and structural equality).ABC and @abstractmethodabstract class or trait. Use trait when multiple inheritance is needed.def my_method(self, arg):def myMethod(arg: Type): ReturnType = { ... }class Color(Enum):object Color extends Enumeration { val Red, Green, Blue = Value } or (better) sealed trait Color.| Python | Scala | Notes |
|---|---|---|
Generic[T] | [T] | Invariant |
Generic[T_co] | [+T] | Covariant (can return subtypes) |
Generic[T_contra] | [-T] | Contravariant (can accept supertypes) |
+T)Useful for read-only containers (e.g., List[+A]).
class Container[+T](val item: T)
-T)Useful for consumers or sinks.
trait Sink[-T] { def consume(item: T): Unit }
@runtime_checkable class Protocol:trait or structural types type MyType = { def method(): Unit }. Usually, explicit traits are preferred.