Agent skill · Audited from source
java-21
skill · gentleman-programming/gentleman-skillsMIT licenceAudited 22 Oct 2026 · source cfd30384f54c
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit cfd30384f54c and found no filesystem, network or shell access and no hard-coded secrets. What it does: Java 21 language and runtime patterns for modern, safe code. Trigger: When writing Java 21 code using records, sealed types, or virtual threads.
Cite
Cite this page
ModelsAtlas. “java-21 (gentleman-programming/gentleman-skills)”. Retrieved 22 Oct 2026. https://modelsatlas.com/skills/gentleman-programming/java-21
Trust audit
Audit 0.4.1 · source read 22 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 16,667 of 17,602 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha cfd30384f54c · 22 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publishergentleman-programming GitHub organizationOwner of the repository this skill is read from
- Source foldergentleman-programming/gentleman-skills/community/java-21The exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdictcfd30384f54cA new audit runs when the source changes
- Repository statusNot archivedLast push 207 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Java 21 language and runtime patterns for modern, safe code. Trigger: When writing Java 21 code using records, sealed types, or virtual threads.
---
name: java-21
description: >
Java 21 language and runtime patterns for modern, safe code.
Trigger: When writing Java 21 code using records, sealed types, or virtual threads.
metadata:
author: diegnghrmr
version: "1.0"
---
## When to Use
Load this skill when:
- Writing Java 21 application or library code
- Designing immutable DTOs or value objects
- Modeling closed hierarchies with sealed types
- Using virtual threads for blocking I/O
## Critical Patterns
### Pattern 1: Records for immutable data
Use records for DTOs and value objects, validate in compact constructors.
### Pattern 2: Sealed types + pattern matching
Use sealed interfaces/classes and switch pattern matching for exhaustiveness.
### Pattern 3: Virtual threads for I/O
Use virtual threads to handle blocking I/O without large thread pools.
## Code Examples
### Example 1: Record with validation
```java
package com.acme.user;
public record Email(String value) {
public Email {
if (value == null || !value.contains("@")) {
throw new IllegalArgumentException("Invalid email");
}
}
}
```
### Example 2: Sealed hierarchy + switch pattern matching
```java
package com.acme.payment;
public sealed interface Payment permits Card, BankTransfer { }
public record Card(String last4) implements Payment { }
public record BankTransfer(String iban) implements Payment { }
public final class PaymentPrinter {
public String describe(Payment payment) {
return switch (payment) {
case Card card -> "card-" + card.last4();
case BankTransfer bank -> "iban-" + bank.iban();
};
}
}
```
### Example 3: Virtual threads for blocking calls
```java
package com.acme.io;
import java.util.concurrent.Executors;
public final class Fetcher {
public void fetchAll(java.util.List<String> urls) throws Exception {
try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {
for (String url : urls) {
executor.submit(() -> blockingFetch(url));
}
}
}
private void blockingFetch(String url) {
// perform blocking I/O here
}
}
```
## Anti-Patterns
### Don't: Use mutable data carriers
```java
// BAD: mutable DTO
public class UserDto {
public String name;
public String email;
}
```
### Don't: Spin up raw platform threads per request
```java
// BAD: expensive and unbounded
new Thread(() -> blockingFetch("https://api" )).start();
```
## Quick Reference
| Task | Pattern |
|------|---------|
| Immutable DTOs | Use records with validation |
| Closed hierarchies | Use sealed interfaces + switch |
| Blocking I/O scale | Use virtual threads executor |
## Resources
- Java 21 Release Notes: https://www.oracle.com/java/technologies/javase/21-relnote-issues.html
- JEP Index: https://openjdk.org/jeps/0Excerpt, first 2,770 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit cfd3038
git clone https://github.com/gentleman-programming/gentleman-skills git -C gentleman-skills checkout cfd30384f54c
The author documents no install command, so this uses the repository directly. Our verdict covers commit cfd30384f54c only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
cfd30384f54c
Similar skills
All coding & review skills →obra/superpowers
Use when creating new skills, editing existing skills, or verifying skills work before deployment
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
Questions about java-21
What does the java-21 skill do?
Is java-21 safe to install?
What can java-21 access on my machine?
How current is this page?
Sources
- github.com/gentleman-programming/gentleman-skills/tree/main/comm — the audited source at commit cfd30384f54c and every finding aboveObserved · 22 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the java-21 skill do?
- Is java-21 safe to install?
- What can java-21 access on my machine?