Skip to content
Skills Library
Programming · Building & coding

scala-functional-object-programming

/scala-functional-object-programming

Use this skill when authoring robust Scala 3 applications using case classes, pattern matching, type classes, and pure functions.

Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use this skill when authoring robust Scala 3 applications using case classes, pattern matching, type classes, and pure functions.

Original author description

Use this skill when authoring robust Scala 3 applications using case classes, pattern matching, type classes, and pure functions.

How it works

  1. When to use
  2. Prerequisites
  3. Step-by-step workflow
  4. Commands / code examples
  5. Common mistakes & pitfalls
  6. Verification checklist
  7. Related skills
Original SKILL.md headings · 47 lines, 295 words
SKILL.md preview
---
name: scala-functional-object-programming
description: Use this skill when authoring robust Scala 3 applications using case classes, pattern matching, type classes, and pure functions.
---
# Scala Functional & Object-Oriented Programming

## When to use
Use this skill when you need to authoring robust Scala 3 applications using case classes, pattern matching, type classes, and pure functions.

## Prerequisites
- Working knowledge of relevant programming language or database fundamentals.
- Access to testing environment or local runtime instance.

## Step-by-step workflow
1. **Analyze operational requirements**: Review performance boundaries, data integrity constraints, and query patterns.
2. **Design schema / interface**: Define explicit data contracts, types, or indexes supporting planned operations.
3. **Implement core routines**: Construct declarative, type-safe, or parameterized queries and functions.
4. **Validate performance**: Verify execution metrics using profilers, EXPLAIN plans, or benchmark test suites.
5. **Implement defensive controls**: Enforce timeout boundaries, connection pooling limits, and transaction safety.

## Commands / code examples
```scala
sealed trait PipelineEvent
case class Ingested(id: String, payload: String) extends PipelineEvent
case class Processed(id: String, bytesCount: Int) extends PipelineEvent
case class Failed(id: String, reason: String) extends PipelineEvent

object EventAuditor:
  def audit(event: PipelineEvent): String = event match
    case Ingested(id, _) => s"Event $id successfully ingested into raw stream"
    case Processed(id, count) => s"Event $id processed: $count bytes transformed"
    case Failed(id, reason) => s"ALERT: Event $id failed due to $reason"
```

## Common mistakes & pitfalls
- Overlooking indexing strategies on foreign keys and frequently queried filter columns.
- Running unparameterized dynamic queries, creating severe SQL injection vulnerabilities.
- Holding open long-running database transactions during slow external network calls.

## Verification checklist
- [ ] Schema contracts and type signatures are strictly enforced.
- [ ] Queries are fully parameterized against injection vulnerabilities.
- [ ] Profiling or execution plans show optimal resource consumption.
- [ ] Error handling safely releases locks and rolls back aborted transactions.

## Related skills
- postgresql-query-optimization-explain
- sql-anti-patterns-remediation
- acid-transactions-isolation-levels
- secure-code-review-static-analysis-sast

Versions

The database has no other skills named scala-functional-object-programming.

Database snapshot: 13.11.2026 · package version 96ffb0bc60c6 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 85Scala Functional Patterns
    Use when functional programming patterns in Scala including higher-order functions, immutability, pattern matching, algebraic data types, monads, for-comprehensions, and functional composition for building robust, type-safe applications.
  • 95scala2
    Scala 2.12/2.13 programming language coding conventions and best practices following Databricks style guide for functional programming, type safety, and production code quality. Triggers on: **.scala, **/build.sbt, **/build.sc
  • 85Scala Type System
    Use when scala's advanced type system including generics, variance, type bounds, implicit conversions, type classes, higher-kinded types, path-dependent types, and abstract type members for building type-safe, flexible APIs.
  • 100haskell-expert
    Expert knowledge in Haskell functional programming, advanced type system, monads, lazy evaluation, and purely functional design. Use when the user mentions functional programming, monads, type system, lazy evaluation, pure functions, or category theory, or when the task involves…
  • 100scala-traits-protocols
    How to convert Python Protocol classes (structural typing) to Scala traits and type classes. Use when translating Python's @runtime_checkable Protocol patterns to Scala's nominal typing with traits. Covers trait-based abstraction, implicit type classes, and structural type emulation.
  • 95python-scala-sealed-traits
    Guide for translating Python Enum, Protocol, and abstract class hierarchies to Scala sealed trait hierarchies. Use this skill whenever converting Python Enum classes, runtime-checkable Protocol types, abstract base classes (ABC), or Union type aliases to idiomatic Scala sealed…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.