Skip to content
Skills Library
Programming · Building & coding

scala-code

/scala-code

Write and modify Scala code in SynapseML. Use when adding or changing Scala transformers, estimators, or params to follow repo patterns, keep scalastyle and compilation green, and cover behavior changes with tests.

Repository
synapseml ↗
Licence
MIT
Last repository change
23.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 23.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

Write and modify Scala code in SynapseML. Use when adding or changing Scala transformers, estimators, or params to follow repo patterns, keep scalastyle and compilation green, and cover behavior changes with tests.

Original author description

Write and modify Scala code in SynapseML. Use when adding or changing Scala transformers, estimators, or params to follow repo patterns, keep scalastyle and compilation green, and cover behavior changes with tests.

How it works

  1. Objectives
  2. Scala best practices
  3. Required validation steps (must run)
  4. Testing requirement for code changes
  5. Completion checklist
Original SKILL.md headings · 46 lines, 349 words
SKILL.md preview
---
name: scala-code
description: Write and modify Scala code in SynapseML. Use when adding or changing Scala transformers, estimators, or params to follow repo patterns, keep scalastyle and compilation green, and cover behavior changes with tests.
---

# Scala Code Skill

Use this skill for any Scala code change in this repository.

## Objectives
- Keep Scala changes correct, minimal, and production-safe.
- Prevent CI/CD breakage by validating style and compilation before completion.
- Ensure every behavior change is covered by tests.
- Scala code should be optimized to be efficient and maintainable, following existing patterns and practices in the codebase.

## Scala best practices
- Follow existing SynapseML patterns (`DefaultParamsReadable`, `DefaultParamsWritable`, `Wrappable`, `SynapseMLLogging`).
- Keep business logic in Scala (not generated Python wrappers).
- Do not edit generated files under `target/`.
- Preserve license headers and existing package structure.
- Prefer small, focused changes and reuse existing helpers/traits.
- Avoid introducing flaky tests or network-dependent behavior unless already required by the suite.
- To get around scalastyle issues, don't just use `// scalastyle:off` or `//scalastyle:ignore`, but instead fix the underlying issue or refactor to avoid it. Unless, the refactor results in a more complex code structure, in which case, it may be acceptable to disable the specific scalastyle rule for that line or block of code, but this should be done sparingly and with justification.

## Required validation steps (must run)
Run these commands before finishing Scala changes:

1. Scala style checks:
   - `sbt scalastyle "Test / scalastyle"`
2. Scala compile checks:
   - `sbt compile`
   - `sbt test:compile`
3. Relevant tests for touched modules/files:
   - Example: `sbt "core/testOnly *SuiteName*"` or `sbt "cognitive/testOnly *SuiteName*"`

If a command fails, fix the issue and rerun until passing.

## Testing requirement for code changes
- Any Scala code change must be accompanied by tests (new tests or updates to existing tests).
- Bug fixes must include a regression test that fails before the fix and passes after.
- New logic/branches should include coverage for success and failure/edge cases where practical.
- Keep tests deterministic and aligned with current module test conventions.

## Completion checklist
- [ ] Code follows existing Scala/SynapseML conventions.
- [ ] Style checks pass.
- [ ] Compile checks pass.
- [ ] Relevant tests pass.
- [ ] Scala code changes include corresponding tests.

Versions

The database has no other skills named scala-code.

Database snapshot: 13.11.2026 · package version 7fd0df7d623e (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

  • 100synapseml-local-setup
    Set up and validate SynapseML locally in WSL or Linux. Use when an agent needs SynapseML working locally, runs sbt compile/test, sees Java 21, Scala 2.12 compiler-bridge, bad constant pool index, Spark, or local validation failures.
  • 100synapseml-pr-loop
    Develop and make SynapseML features, bugs, tasks, issues, or pull requests evidence-based merge-ready with tests, fast review, CI, and the review-code six-round gauntlet. Use for "5/5 confidence", "200% ready", stale PR remediation, rebase-and-test requests, resolving all review…
  • 100python-scala-idioms
    Guide for writing idiomatic Scala when translating from Python. Use when the goal is not just syntactic translation but producing clean, idiomatic Scala code. Covers immutability, expression-based style, sealed hierarchies, and common Scala conventions.
  • 95scala-tokenizer-implementation-guide
    Use this skill when writing /root/Tokenizer.scala. It provides the concrete implementation strategy, Scala idioms, and compilation workflow for translating the Python Tokenizer to Scala 2.13.
  • 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
  • 100lang-scala
    Use when writing, reviewing, testing or setting up Scala backend code in a loops run (the scala language pack) - toolchain, layout, race policy, coverage, idioms and footguns.

Feedback and reports

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