Use when you need to apply functional programming principles in Java — including writing immutable objects and Records, pure functions, functional interfaces, lambda expressions, Stream API pipelines, Optional for null safety, function composition, higher-order functions, pattern matching for instanceof and switch, sealed classes/interfaces for controlled hierarchies, Stream Gatherers for custom operations, currying/partial application, effect boundary separation, and concurrent-safe functional
NewMaintained
Automatic
◆Coding pack
Last verified 8/20/2026
What it changes
Passed 14 of 18 test cases with the skill, and 16 of 18 without it.
Without skill86%
With skill77%
Checks it passed that the model alone missed
Specifies running a Maven compilation command before making changes
1 fixed16 passed either way2 still failing3 broke
Pass-rate lift
-9 pp
Tokens
+30%
Agent turns
0%
Response time
-20%
Model gemini-3.6-flashMeasured 8/20/2026v117 of 22 cases passed with skill · 18 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
Here is a code snippet for `OrderProcessor.java` where we want to convert imperatively nested for-loops to Java Stream pipelines. The workspace is available. What is the mandatory first command or step you must execute before editing any code?
What was checked, without and with the skill
Checked
Without skill
With skill
Specifies running a Maven compilation command before making changes
Missed
Passed
case-03 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md67 lines2 files
Java Functional Programming rules
Identify and apply functional programming principles in Java to improve immutability, expressiveness, and maintainability.
Scope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Constraints
Before applying any functional programming changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until the project compiles successfully. Verify that maven-compiler-plugin source/target supports the Java features being used.
MANDATORY: Run ./mvnw compile or mvn compile before applying any changes
SAFETY: If compilation fails, stop immediately — do not proceed until the project compiles successfully
VERIFY: Verify maven-compiler-plugin source/target supports the Java features being used
VERIFY: Run ./mvnw clean verify or mvn clean verify after applying improvements
BEFORE APPLYING: Read the reference for detailed good/bad examples, constraints, and safeguards for each functional programming pattern
EDGE CASE: If request scope is ambiguous, stop and ask a clarifying question before applying changes
EDGE CASE: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance
When to use this skill
Improve the code with Functional Programming
Apply Functional Programming
Refactor the code with Functional Programming
Refactor Java code to use streams or Optionals safely
Use when you need to set up Gatling performance testing for a Java Maven project — including adding Gatling dependencies and the Gatling Maven plugin, creating Java simulations, running gatling:test, configuring a simulation class, and reviewing generated reports. This should trigger for requests such as Add Gatling performance testing; Apply Gatling performance testing; Create a Gatling simulation; Add Gatling support; Review Gatling performance test assertions and feeders. Part of Plinth Toolk