用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill scala-string-processing命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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 | scala-string-processing |
| description | String manipulation, formatting, and regex patterns in Scala |
// f-string style (Scala 2.13+)
val value = 42
val formatted = f"Value: $value%d"
// String format (compatible)
String.format("%.2f", 3.14159)
// String interpolation
val name = "world"
s"Hello $name" // simple interpolation
f"Pi: ${3.14159}%.2f" // formatted interpolation
// For Double/Float
val d = 3.14159
String.format("%.2f", d) // "3.14"
// For BigDecimal
val bd: BigDecimal = BigDecimal("3.14159")
String.format("%.2f", bd.doubleValue)
// Using precision variable
val precision = 4
String.format(s"%.${precision}f", value)
// String to set of characters
val punctuation = ".,!?;:'\"()[]{}" .toSet
// Check if character is in set
if (punctuation.contains(c)) { ... }
// Strip leading/trailing punctuation
val stripped = word
.dropWhile(punctuation.contains)
.reverse
.dropWhile(punctuation.contains)
.reverse
// Or using regex
word.replaceAll("^[.,!?;:'\"]|[.,!?;:'\"']$", "")
// Split by whitespace
val words = "hello world test".split("\\s+").toVector
// Split with filter
text.split("\\s+").filter(_.nonEmpty)
// Preserve structure
val (first, rest) = words.splitAt(1)
// Check if all digits
if (part.forall(_.isDigit)) { ... }
// Check emptiness
if (str.nonEmpty) { ... }
if (str.isEmpty) { ... }
// Check length
if (str.length < minLength) { ... }
str.toLowerCase // → "hello"
str.toUpperCase // → "HELLO"