Scala language server (Metals) and workflow skills for Claude Code: type errors after every edit, symbol-true navigation, and a compile-fix loop that keeps the build warm.
Claude Code:
/plugin marketplace add brianshepardpss/plugin-creator /plugin install grounded-scala@plugin-creator
Needs scala-cli (cs install scala-cli). In an empty folder:
/grounded-scala:fix sample
Claude copies samples/ce-broken (a cats-effect app with three seeded errors), compiles it once, fixes the errors root-cause first using Metals diagnostics, recompiles to green and reports each fix. One of the errors is a trap: the compiler suggests importing the global ExecutionContext; the plugin fixes it with IO instead. The first compile downloads cats-effect and the Scala compiler; later compiles take seconds.
| Piece | What it gives you |
|---|---|
.lsp.json (Metals) | Diagnostics after each edit and LSP navigation for .scala .sc .sbt .mill. Auto-imports the build headlessly (no "Import build?" prompt). |
skill fix-compile | Warm compile (sbt --client, scala-cli, ./mill), grouped root-cause fixes, never clean, never silences errors. Command: /grounded-scala:fix. |
skill scala-doctor | Read-only setup check (java, metals, cs, build tool, .gitignore, Metals logs) with exact install commands. |
skill scala-build | Dependencies with the right %% / :: per tool, version lookup via cs complete-dep, targeted test runs, cross-building, sbt 1 -> 2 checklist. |
skill scala3-migrate | Staged 2.13 -> 3 migration: scala3-migrate or -source:3.0-migration -rewrite, then implicits -> given/using/extension. Sample: samples/sbt-213. |
skill effects-idioms | Detects cats-effect / ZIO / Ox and keeps one style: no Future/Await mixing, scoped resources, typed errors. |
agent scala-navigator | Read-only "who calls X / where is this given defined" through Metals, returned as a short file:line list. |
command /grounded-scala:metals-mcp | Opt-in: adds the official metals-mcp server (compile, test, inspect, find-dep tools) to this project after asking. Not bundled, since it starts a second JVM. |
Nothing leaves your machine beyond your normal Claude conversation. Metals, sbt, Mill and scala-cli download libraries from Maven repositories when they build. The plugin has no telemetry and no keys.
MIT licensed, with its design brief and eval suite: github.com/brianshepardpss/grounded-scala. Ideas or problems? Open an issue there, or ask the plugin's request skill to draft one for you.
Not affiliated with or endorsed by the Scala Center or EPFL. Not affiliated with or endorsed by Scalameta (Metals). Not affiliated with or endorsed by VirtusLab, Typelevel, the ZIO project, SoftwareMill or com-lihaoyi (Mill).