aws
免费AWS best practices: IAM, secrets, networking, security, compute, IaC, ops. Use when building, reviewing, or modifying AWS resources.
中文简介正在准备中。当前显示原文说明。
Modern Java practices: design, errors, concurrency, security, testing, tooling. Targets Java 21 LTS baseline; Java 25 LTS features called out explicitly. Use when writing or reviewing Java code.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
final fields, no setters unless mutation requiredswitch expressions over theminstanceof (16+): if (obj instanceof String s) — no explicit castnull in public APIs. Optional<T> for absent values. Never Optional as field typeObjects.requireNonNull(param, "param") at method entry for non-null enforcementException or Throwable except at boundaries (HTTP handler, queue consumer)Closeable. No manual finally close blocksvar where type is obvious from right-hand side. Not to obscure typesStream.toList() (16+) over Collectors.toList()List.of(), Map.of(), Set.of() for immutable collections. List.copyOf() for defensive copySequencedCollection, getFirst(), getLast() over index hacksswitch expressions over statements. Pattern matching in switch (21+) with exhaustive coveragecatch (IOException _), case Point(int x, _)if (obj instanceof Point(int x, int y))stream.gather(...) for custom intermediate operationsinstanceof checks before casts eliminated — use pattern matching everywhereThread.ofVirtual().start(...) or Executors.newVirtualThreadPerTaskExecutor(). Use for I/O-bound worksynchronized or Object.wait/notify with virtual threads — use java.util.concurrent primitives or structured concurrencyStructuredTaskScope for fan-out with automatic cancellation and error propagationScopedValue over ThreadLocal for virtual thread-safe immutable contextCompletableFuture for async pipelines without virtual threads. Avoid get() without timeoutExecutorService always in try-with-resources (19+) or explicitly shut downvolatile only when you understand happens-beforeThread.sleep() in production logic. No busy-wait loops@NotNull, @Size, etc.) at API boundariesSecureRandom for tokens and secrets. Never java.util.RandomSSLException and continuegovulncheck equivalent: OWASP Dependency-Check or Snyk in CI. Fail on critical CVEsAES/GCM over AES/CBCML-KEM, ML-DSA) — evaluate for long-lived key materialSystem.out.println in productionERROR for actionable failures, WARN for degraded state, INFO for lifecycle events, DEBUG for dev onlylog.debug("user={}", userId) — never string concat in log argsWARN or INFO. Stack traces at ERROR only@ParameterizedTest for data-driven casesThread.sleep() in tests. Awaitility for async assertions@Nested for grouping related test cases within one classsrc/test, integration tests in src/integrationTest (Gradle) or profiles (Maven)libs.versions.toml)google-java-format or palantir-java-format enforced in CI. No style debatesSpotBugs + Find Security Bugs plugin. Checkstyle for style enforcementErrorProne compiler plugin for correctness checks at compile timeArchUnit for architectural rules: enforce layer boundaries, naming conventions in testssdkman or .sdkmanrc for team-consistent JDK version. Pin distribution (Temurin preferred)StringBuilder for string concat in loops. String.join() for fixed listsArrayList over LinkedList for most cases. ArrayDeque over Stack or LinkedList as queueList.copyOf() / Map.copyOf() create truly immutable snapshots. Use over Collections.unmodifiableList还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
AWS best practices: IAM, secrets, networking, security, compute, IaC, ops. Use when building, reviewing, or modifying AWS resources.
中文简介正在准备中。当前显示原文说明。
Docker best practices: image security, build efficiency, runtime hardening, Compose, local tooling (Colima, OrbStack). Use when writing or reviewing Dockerfiles and Compose files.
中文简介正在准备中。当前显示原文说明。
GCP best practices: IAM, secrets, networking, security, compute, IaC, ops. Use when building, reviewing, or modifying GCP resources.
中文简介正在准备中。当前显示原文说明。
Idiomatic Go 1.25 practices: errors, interfaces, concurrency, generics, testing, security, tooling. Use when writing or reviewing Go code.
中文简介正在准备中。当前显示原文说明。
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.
中文简介正在准备中。当前显示原文说明。
Kubernetes best practices: security, workloads, networking, config, operations, GitOps. Use when writing or reviewing K8s manifests and configurations.
中文简介正在准备中。当前显示原文说明。