scala-expert

scala-expert is a skill for Claude Code from personamanagmentlayer/pcl. It costs 50 tokens per session (2,433 once invoked), scanned A, original, Apache-2.0.

A guide to Scala, a programming language commonly used for functional programming and systems that process events or data continuously. It covers Scala features, Akka, and reactive frameworks.

In plain words
What is it for?
Use it to write and review Scala code, model data with case classes, handle optional values, and build reactive services with Akka or related frameworks.
Why use it?
It helps developers handle Scala's advanced types and functional style while building concurrent or event-driven software.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to write and review Scala code, model data with case classes, handle optional values, and build reactive services with Akka or related frameworks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/personamanagmentlayer/pcl/scala-expert
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 personamanagmentlayer/pcl --skill scala-expert
Clone the repo
git clone --depth 1 https://github.com/personamanagmentlayer/pcl

Made for: Claude Code.

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 scala-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/scala-expert/github.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/scala-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/scala-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/scala-expert/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 scala-expert

Your own site · 80×15
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/scala-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/scala-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,433 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00050 $0.02433
Opus 5 $0.00025 $0.01216
Sonnet 5 $0.00010 $0.00487
Haiku 4.5 $0.00005 $0.00243

Measured 5d ago against content hash 32d30d3fbc95, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

scala-expert 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 5d 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.

stdlib/languages/scala-expert/SKILL.md · 425 lines

How it starts

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

Scala Expert

Expert guidance for Scala development, functional programming, Akka actors, and reactive systems.

Core Concepts

Scala Fundamentals

  • Immutability
  • Pattern matching
  • Case classes
  • Traits and mixins
  • Implicit conversions
  • For comprehensions

Functional Programming

  • Higher-order functions
  • Monads (Option, Either, Try)
  • Functors and Applicatives
  • Type classes
  • Pure functions
  • Referential transparency

Reactive Systems

  • Akka actors
  • Akka Streams
  • Akka HTTP
  • Play Framework
  • Cats Effect
  • ZIO

Scala Basics

// Case classes
case class User(id: String, name: String, email: String, age: Int)

// Pattern matching
def processUser(user: User): String = user match {
  case User(_, name, _, age) if age < 18 => s"$name is a minor"
  case User(_, name, _, age) if age >= 65 => s"$name is a senior"
  case User(_, name, _, _) => s"$name is an adult"
}

// Options instead of null
def findUser(id: String): Option[User] = {
  database.get(id)
}

val userName = findUser("123") match {
  case Some(user) => user.name
  case None => "Unknown"
}

// Or using map
val name = findUser("123").map(_.name).getOrElse("Unknown")

// For comprehensions
def getUserWithPosts(userId: String): Option[(User, List[Post])] = {
  for {
    user <- findUser(userId)
    posts <- findPosts(userId)
  } yield (user, posts)
}

// Traits and mixins
trait Serializable {
  def toJson: String
}

trait Loggable {
  def log(message: String): Unit = println(s"[LOG] $message")
}

case class Person(name: String, age: Int) extends Serializable with Loggable {
  def toJson: String = s"""{"name":"$name","age":$age}"""
}

// Implicit classes (extension methods)
implicit class StringOps(s: String) {
  def isValidEmail: Boolean = s.contains("@") && s.contains(".")
}

"[email protected]".isValidEmail // true

Functional Programming

import cats._
import cats.implicits._

// Functor
val numbers = List(1, 2, 3, 4, 5)
val doubled = numbers.map(_ * 2)

// Applicative
val result = (Option(1), Option(2), Option(3)).mapN { (a, b, c) =>
  a + b + c
}

// Monad (flatMap)
def fetchUser(id: String): Future[Option[User]] = ???
def fetchPosts(userId: String): Future[List[Post]] = ???

val userWithPosts: Future[Option[(User, List[Post])]] = {
  fetchUser("123").flatMap {
    case Some(user) =>
      fetchPosts(user.id).map(posts => Some((user, posts)))
    case None =>
      Future.successful(None)
  }
}

// Or with for-comprehension
val result: Future[Option[(User, List[Post])]] = for {
  userOpt <- fetchUser("123")
  posts <- fetchPosts(userOpt.map(_.id).getOrElse(""))
} yield userOpt.map(user => (user, posts))

// Either for error handling
sealed trait Error
case class NotFound(id: String) extends Error
case class ValidationError(message: String) extends Error

def validateUser(user: User): Either[Error, User] = {
  if (user.email.isValidEmail) Right(user)
  else Left(ValidationError("Invalid email"))
}

def saveUser(user: User): Either[Error, User] = {
  for {
    validated <- validateUser(user)
    saved <- database.save(validated)
  } yield saved
}

// Type classes
trait Show[A] {
  def show(a: A): String
}

object Show {
  def apply[A](implicit sh: Show[A]): Show[A] = sh

  implicit val stringShow: Show[String] = new Show[String] {
    def show(s: String): String = s
  }

  implicit val intShow: Show[Int] = new Show[Int] {
    def show(i: Int): String = i.toString
  }

  implicit def listShow[A: Show]: Show[List[A]] = new Show[List[A]] {
    def show(list: List[A]): String = {
      list.map(Show[A].show).mkString("[", ", ", "]")
    }
  }
}

def print[A: Show](a: A): Unit = {
  println(Show[A].show(a))
}

Read the full file on GitHub · 425 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. 5d ago Changed · +9 lines · +33 tokens per session 32d30d3fbc95
  2. 6d ago First seen · 416 lines · 17 tokens per session scan A 454cc8bf2cda

Subscribe to this mod's changes

scala-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (40 stars, last pushed 3d ago), licensed Apache-2.0. It adds 50 tokens to every session and 2,433 once invoked, about $0.0003 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.