Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/maxtrezzi/java-best-practices-skills/java-best-practices-java11npx skills add maxtrezzi/java-best-practices-skills --skill java-best-practices-java11git clone --depth 1 https://github.com/maxtrezzi/java-best-practices-skillsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00277 | $0.04398 |
| Opus 5 | $0.00138 | $0.02199 |
| Sonnet 5 | $0.00055 | $0.00880 |
| Haiku 4.5 | $0.00028 | $0.00440 |
Grade A, and why
java-best-practices-java11 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 318 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Java Best Practices — Java 11 (LTS) Edition
TARGET: JAVA 11. Every construct in this skill must compile and run on a stock JDK 11 with no preview flags. The features below DO NOT EXIST in Java 11 and must never appear in generated code, nor be recommended in a review as the "modern" fix:
record(Java 16) — use afinalclass withfinalfields, an all-args constructor, explicitequals/hashCode/toString, and accessors.sealedinterfaces/classes (Java 17) — emulate a closed set with a package-private abstract base or anenum, and document the closed set.- Pattern matching for
instanceof(Java 16) — write the explicitinstanceoftest followed by a cast.- Pattern matching / arrow
switchexpressions (switchexpr Java 14, patterns Java 21) — use a classicswitchstatement or anif/else ifchain; assign the result to a variable explicitly.- Text blocks (
""", Java 15) — use ordinary quoted strings with explicit\nand concatenation, orString.join.- Virtual threads, Structured Concurrency, Scoped Values (Java 21+) — use a platform-thread
ExecutorServicesized to the workload.- Unnamed variables
_(Java 21+) — name the variable, prefix unused with a comment.What you DO have on Java 11 and should use:
varfor locals (Java 10),Optional, the full Streams API, unmodifiable factory methodsList.of/Map.of/Set.of(Java 9),Collectors.toUnmodifiableList(Java 10),String.strip/isBlank/repeat/lines(Java 11),Files.readString/writeString(Java 11), thejava.net.http.HttpClient(Java 11),Optional.isEmpty(Java 11), andCollection.toArray(IntFunction)(Java 11). If a reference file shows a record, sealed type, or pattern switch, mentally translate it to the Java 11 equivalent above before applying it.
You are a senior Java engineer. Your job in this skill is to make code that is correct, then clear, then fast — in that order — and to explain the reasoning when it is not obvious. Rules without reasons don't generalize; a junior memorizes rules, a senior knows why each exists and therefore when it bends. Carry that posture into every response.
Two modes. Infer which one applies:
- GENERATE — the user describes something to build. Write the code.
- REVIEW — the user shows existing code and asks about it. Audit it.
When both apply (e.g. "rewrite this"), generate the improved version first, then briefly justify the decisions that changed.
What ships with it
13 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- references/anti-patterns.md 9.7 KB
- references/collections-streams.md 6.9 KB
- references/concurrency.md 7.3 KB
- references/datetime.md 4.0 KB
- references/design-api.md 9.3 KB
- references/exceptions.md 8.7 KB
- references/generics.md 3.4 KB
- references/io-resources.md 3.4 KB
- references/language-features.md 5.7 KB
- references/performance.md 6.5 KB
- references/review-example.md 4.7 KB
- references/strings-text.md 5.7 KB
- references/testing.md 4.8 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 318 lines · 277 tokens per session scan A df2dc00d1c4b
java-best-practices-java11 is a skill published in the GitHub repository maxtrezzi/java-best-practices-skills (1 stars, last pushed 5d ago), licensed MIT. It adds 277 tokens to every session and 4,398 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
2slides-ppt-generator
AI-powered presentation generation via the 2slides API — create slides from text, match a reference image style, summarize documents into decks, add AI voice narration, and export pages/audio. Use for any "make slides", "create a deck", or "slides from this document" request.
agent-framework-azure-ai-py
Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.
agent-harness-fault-injection
Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.
aria
Designs the data model, API contracts, and structural foundation of the system.
max
Cleans up and improves existing code without changing behavior.
accint-commitments
Triage acc's open promises and close them with honest real-world verdicts via accact(runtime="outcome").