Borrowing it
Nothing to install: this file belongs to zexion7873/copilot-setting. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/zexion7873/copilot-setting/main/.github/instructions/java.instructions.mdgit clone --depth 1 https://github.com/zexion7873/copilot-settingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/zexion7873/copilot-setting/java)<a href="https://agentmods.dev/instructions/zexion7873/copilot-setting/java"><img src="https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/java/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/zexion7873/copilot-setting/java"><img src="https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.01160 | $0.01160 |
| Opus 5.5 | $0.00464 | $0.00464 |
| Sonnet 5.5 | $0.00232 | $0.00232 |
| Haiku 4.5 | $0.00116 | $0.00116 |
Grade A, and why
copilot-setting java.instructions.md 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 1mo ago.
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 — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Java 8 Conventions
This project is Java 8. AI models default to modern Java, and that pull is strong — treat it as a bias to correct, not a preference to follow. A newer-version symbol won't compile, but the convention and correctness rules below fail only at review or runtime — don't lean on the build to catch them. If you are not certain something exists in Java 8, verify against this file before writing it — never guess.
Language Boundary (Java 9+ Forbidden)
var, records, sealed classes, text blocks, pattern matchingList.of(),Map.of(),Set.of()— useArrays.asList()/Collections.unmodifiableMap()(note:Arrays.asListis fixed-size but element-mutable and allows nulls, unlikeList.of— wrap inCollections.unmodifiableListwhen true immutability matters)String.isBlank(),String.strip()— useStringUtilsor.trim().isEmpty()Optional.ifPresentOrElse(),Optional.stream()- Module system (
module-info.java) try-with-resourceson a pre-declared effectively-final variable (Java 9) — declare the resource inside thetry (...)parentheses instead; try-with-resources itself is Java 7 and stays mandatory for JDBC (instructions/sql.instructions.md)
Optional
- Return type only — never field, parameter, or collection element
orElseThrow(SomeException::new)over.get()—.get()throws crypticNoSuchElementException. Note: Java 8 requires the supplier formorElseThrow(() -> new ...)— the no-argorElseThrow()is Java 10+.orElse()for cheap defaults;orElseGet()for expensive computation
Streams
- One operation per line; break chain at
.collect() - Never modify external state inside
forEach/map/filter - Prefer
forloop for simple iterations with side effects
Date and Time
- Use
java.time(LocalDate,LocalDateTime,ZonedDateTime,Instant,Duration) for business logic, computation, and internal date handling — a Java 8 feature and the default for new code - Two hard exceptions on this stack — Hibernate 4.2 has no
java.timesupport (that arrived in Hibernate 5'shibernate-java8module) and JSTL 1.2<fmt:formatDate>accepts onlyjava.util.Date:- hbm.xml-mapped entity date fields stay
java.util.Date/java.sql.Timestamp— aLocalDateTimefield has no Hibernate 4.2 type mapping (fails, or silently persists as a serialized BLOB) - dates passed to a JSP for
<fmt:formatDate>stayjava.util.Date(instructions/jsp.instructions.md)
- hbm.xml-mapped entity date fields stay
- Convert at the service boundary with
Date.from(instant)/Date.toInstant()betweenjava.timelogic and the persistence / view layers - Still avoid
java.util.Calendar(mutable, error-prone) in new code
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.
- 1mo ago Changed · +9 lines · +97 tokens per session 7f84fcc10a34
- 1mo ago Changed · -17 lines · -263 tokens per session 10b8f622b416
- 2mo ago First seen · 77 lines · 1,326 tokens per session scan A e67f462e1e44
copilot-setting java.instructions.md is an instructions file published in the GitHub repository zexion7873/copilot-setting (1 stars, last pushed 1mo ago), licensed MIT. It adds 1,160 tokens to every session, about $0.0046 per session on Opus 5.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.
copilot-setting java.instructions.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| copilot-setting java.instructions.mdzexion7873/copilot-setting | Instructions file | 1 | 1mo ago | MIT | A | 1,160 | GitHub Copilot |
| ai-agent-rules-generator copilot.instructions.mdsavedpixel/ai-agent-rules-generator | Instructions file | 8 | 6mo ago | MIT | A | 3,431 | GitHub Copilot |
| ai-agent-rules-generator agent-observations.instructions.mdsavedpixel/ai-agent-rules-generator | Instructions file | 8 | 6mo ago | MIT | A | 1,787 | GitHub Copilot |
| ai-agent-rules-generator task.instructions.mdsavedpixel/ai-agent-rules-generator | Instructions file | 8 | 6mo ago | MIT | A | 1,703 | GitHub Copilot |
| ai-agent-rules-generator doc-sync.instructions.mdsavedpixel/ai-agent-rules-generator | Instructions file | 8 | 6mo ago | MIT | A | 1,652 | GitHub Copilot |
| ai-agent-rules-generator browsetools.instructions.mdsavedpixel/ai-agent-rules-generator | Instructions file | 8 | 6mo ago | MIT | A | 490 | GitHub Copilot |
| ai-agent-rules-generator devtools.instructions.mdsavedpixel/ai-agent-rules-generator | Instructions file | 8 | 6mo ago | MIT | A | 399 | GitHub Copilot |