All authors
robsonkades avatar

Claude Skills by robsonkades

github.com/robsonkades
275 skillsA× 2750 installs0 views
Java ImmutabilityA

Immutable objects in modern Java: records in depth, defensive copies, immutable collection factories versus unmodifiable views, deep versus shallow immutability, final-field semantics and safe publication (JMM), and the withers pattern. Use when designing a value object, when a record has a List, Map or array component, when an accessor returns internal mutable state, when an "immutable" object is observed changing, or when deciding whether immutability is worth its allocation cost. Does not ...

developmentjavaapi
0
2
Java Lambdas And Functional InterfacesA

Lambdas, method references and the functional interfaces they implement: what a lambda captures and what that costs, why its this differs from an anonymous class's, when a method reference is clearer, choosing among the standard java.util.function interfaces instead of inventing one, primitive specialisations that avoid boxing, checked exceptions inside lambdas, and the runtime shape (invokedynamic, capturing versus non-capturing, megamorphic call sites). Use when a lambda captures mutable st...

developmentjavaexpress
0
2
Java Law Of DemeterA

Navigation coupling: what the Law of Demeter actually constrains — structure exposure, not dot-counting — and how to tell a train wreck from a legitimate chain. Use when reviewing chains like order.getCustomer().getAddress().getCity(), when a change to one class's shape rippled through files that never mention it, when deciding whether a chain couples the caller to structure or merely reads data, or when a proposed fix would add forwarding methods to every intermediate class. Does not cover d...

developmentjavarefactoring
0
2
Java Legacy Code TestingA

Getting Java code under test before you change it, when you cannot construct the class or reach the method at all: seams and their enabling points, the dependency-breaking catalogue (Parameterize Constructor, Extract Interface, Extract and Override, Introduce Instance Delegator, Break Out Method Object, Expose Static Method), Sprout and Wrap when there is no time, approval testing when the output to pin is too large to assert on, and the disciplines that make a change safe while no test exist...

developmentgojava
0
2
Java Memory ModelA

Proving inter-thread visibility, ordering and atomicity under the Java Memory Model. Covers actions/executions, synchronization order, synchronizes-with and happens-before, data races, sequential consistency for correctly synchronized programs, volatile publication, monitor and lifecycle edges, final-field freeze semantics, safe publication, compound invariants, benign races, constructor escape, wait/notify, and architecture/JIT independence. Use for shared-state correctness reviews and inter...

developmentgojava
0
2
Java Null SafetyA

Null as a semantic problem, not a syntax problem: what each null means (absence, error, uninitialised), nullability as an API contract, JSpecify @NullMarked and @Nullable, where Objects.requireNonNull belongs, empty collections over null, and the boundaries where null leaks in (deserialisation, ORMs, Map.get, arrays). Use when an NPE surfaces far from its cause, when hardening a service or module boundary, when adopting nullability annotations, or when reviewing constructors and public entry ...

developmentrustjava
0
2
Java Numeric TypesA

Choosing and using Java's numeric types correctly: binary floating-point limits for exact decimal amounts, BigDecimal construction, scale, rounding and the equals/compareTo split, integer overflow and the exact-arithmetic methods, primitives versus boxed types, the boxed-value caching that makes == appear to work for some values, unboxing NPEs, boxing cost in bulk paths, and what happens to a numeric value when it crosses JSON, a database column or a JavaScript client. Use when money or any e...

developmentjavascriptrust
0
2
Java Object ConstructionA

Choosing how an object comes into existence in Java: static factory versus public constructor, the of/from/valueOf/getInstance naming conventions, instance control (caching, canonicalisation, value-based classes), enum and holder singletons, noninstantiable utility classes, and passing collaborators in rather than hardwiring them with new. Use when a class has several constructors distinguished only by parameter types, when a constructor does work beyond assigning fields, when a singleton or ...

developmentjavaexpress
0
2
Java Object ContractsA

The four contracts every Java object inherits or opts into — equals, hashCode, toString, Comparable — plus why clone is not one of them. The equals properties and how inheritance breaks symmetry, the hashCode obligation and what is stable across JVMs, records' generated implementations and their array and floating-point edges, entity identity under JPA and Hibernate proxies, total ordering and TimSort contract violations, and copying without Cloneable. Use when equals is overridden without ha...

developmentgojava
0
2
Java OptionalA

Optional as designed: a return type for "no result is a normal outcome". Covers orElse versus orElseGet (eager versus lazy), orElseThrow over get, map/flatMap/filter chains versus a plain conditional, or(), ifPresentOrElse, stream() integration, the costs of Optional in fields, parameters or collections, valid exceptions, and when Optional makes an API worse. Use when reviewing Optional.get() without a guard, orElse with a costly or side-effecting fallback, isPresent()+get() pairs, Optional-t...

developmentjavaexpress
0
2
Java PerformanceA

Evidence-first triage and routing for ambiguous Java/JVM performance symptoms: defining the affected population and work, separating latency/throughput/resource/error dimensions, checking measurement and recent-change validity, preserving live-incident evidence, mapping competing hypotheses to discriminating signals, and handing each bounded question to its owning skill. Use for “it is slow,” regressions, saturation, memory/RSS growth, startup, uneven instances, or post-JDK/deploy changes whe...

developmentrustgo
0
2
Java RefactoringA

Refactoring mechanics for Java: characterisation tests, small reversible steps, what behaviour preservation actually covers, risk classification, and the catalogue — Extract/Inline, Split Phase, guard clauses, Remove Flag Argument, Pull Up and Push Down, Replace Conditional with Polymorphism or sealed types. What to detect is java-code-smells; evolution rules for published APIs are java-api-design. Use when restructuring code without changing behaviour, when a change is needed in code that ha...

developmentrustgo
0
2
Java Reference Types And LeaksA

Reachability-driven memory in Java: strong/soft/weak/phantom contracts and notification limits, WeakHashMap and its value-holds-key trap, explicit Cleaner cleanup versus automatic fallback, finalization deprecation, and the leak catalogue — obsolete references in self-managed structures, listener registries, ThreadLocal on pooled threads, class-loader retention, non-static nested classes holding their enclosing instance, and caches that only grow. Use when heap grows with traffic and never re...

developmentrustgo
0
2
Java Reflection And Method HandlesA

Runtime access to code through dynamic names: what reflection costs beyond speed — weaker ordinary compile-time/refactoring checks, module access requirements, and closed-world native-image constraints — the alternatives that keep the checking (interfaces, ServiceLoader, annotation processing, code generation), MethodHandles and VarHandles for genuinely dynamic access, and the security boundary around resolving a name that came from outside. Use when reflection appears in application code, wh...

developmentrustgo
0
2
Java Resource ManagementA

Deterministic release of what a Java program holds open: try-with-resources and the exception semantics that make it non-optional, designing an AutoCloseable (ownership, idempotent close, close that fails), decorators and partially constructed resource chains, resources that cross an async or executor boundary, and the difference between closing a resource and returning one to a pool. Use when a close sits in a finally block, when a resource is created inside a try block or inside a lambda th...

developmentjavaapi
0
2
Java Serialization HardeningA

Java built-in serialization as an attack surface and a permanent API commitment: why readObject is an extra constructor that accepts arbitrary bytes, gadget chains and what deserialization filters (JEP 290/415) can and cannot do, the cost of implementing Serializable, serialVersionUID and the custom serialized form, validating and defensively copying in readObject, the serialization proxy pattern, why records are different, and the same risk in JSON polymorphic typing. Use when Serializable, ...

developmentrustgo
0
2
Java SolidA

The five SOLID principles as decision tools for evidence-based Java review, with depth on single responsibility, open-closed, Liskov substitution and interface segregation. Use when reviewing a design or pull request against SOLID, when a principle is being cited to justify a change, when deciding whether a class has too many responsibilities, or when an override breaks substitutability. Dependency inversion depth lives in java-dependency-inversion, contract formalism for LSP in java-design-b...

developmentjavarefactoring
0
2
Java StreamsA

Stream pipelines as a design decision: when a stream is clearer than a loop and when it is not, side-effect-free stages and mutable reduction with collectors, the toMap and groupingBy traps, Collection versus Stream as a return type, streams that hold an open resource, parallel streams and the shared common pool, and Gatherers for custom intermediate operations. Use when a pipeline mutates state outside itself or uses forEach to accumulate, when Collectors.toMap throws IllegalStateException o...

developmentjavaexpress
0
2
Java Strings And TextA

Text in Java as encoded data rather than a universal type: UTF-16 code units versus code points versus graphemes, charsets and why the platform default is not a policy, locale-sensitive case and formatting including the Turkish-I bug, concatenation cost in loops versus single expressions, text blocks, regex compilation and catastrophic backtracking on untrusted input, interning, and injection through SQL, shells, paths and logs. Use when a String stands in for a type or compound key, when tex...

developmentrustgo
0
2
Java Tell Dont AskA

Decision ownership: the type that owns an invariant or policy makes the decision. Use when a service reads state with getters, decides, and writes state back (if (acct.getBalance() > x) acct.setBalance(...)), when the same rule is re-derived from the same getters in several places, when an invariant exists but no type enforces it, when a domain model is all getters and setters with the logic in services, or when a getter has side effects. Covers command–query separation and when asking is cor...

developmentrustgo
0
2
Java Test DesignA

Writing a Java test that survives refactoring and says why it failed: naming the behaviour rather than the method, one reason to fail, test data builders over shared mutable setup, choosing the assertion that produces a readable failure, parameterised and nested tests, and controlling relevant inputs — clock, ordering, locale, randomness. Use when a test name does not say what broke, when a failure message has to be decoded by reading the test, when setup is shared across unrelated tests, whe...

developmentgojava
0
2
Java Test DoublesA

Choosing and using test doubles in Java: the stub/mock/fake distinction that actually changes what a test proves, selecting real collaborators, fakes or mocks for the needed evidence, verifying contractual interactions, Mockito's strict stubs, and deciding when a foreign API needs an owned boundary. Use when a test mocks every collaborator the class touches, when verify is asserted on a query, when a refactoring broke tests that still describe correct behaviour, when deep stubs or static mock...

developmentjavaspring
0
2
Java Testing StrategyA

Choosing which test level earns its cost for a given change: what a unit, integration, contract or end-to-end test can and cannot prove, pushing each test to the narrowest scope where the risk is actually real, what every mocked boundary obliges you to verify elsewhere, and coverage as a diagnostic rather than a target. Use when deciding where to test a change, when a suite is slow or nobody trusts it, when a bug escaped a green suite, when mocks make a test pass while production fails, when ...

developmentrustjava
0
2
Java Thread Safety ContractsA

Specifying and reviewing thread-safety as a caller-visible behavioral contract: ownership and confinement, immutability, atomic operations and compound invariants, consistency/iteration, lock identity and scope, callbacks/alien calls, deadlock ordering, progress/fairness, publication, lazy initialization, cancellation, and lifecycle. Use when a shared class has an ambiguous guarantee or a proposed lock/atomic/concurrent collection may preserve individual methods but violate multi-call semanti...

developmentgojava
0
2
Jdk Upgrade ImpactA

Moving a service between JDKs: what breaks, in what order to find it, and what should get faster — running unchanged on the new runtime with warnings visible, classifying each failure as a retired flag, strong encapsulation, a removed API, a changed default or a third-party agent, and measuring the gain claimed for the upgrade. Use when an LTS-to-LTS move is planned, when a build passes and the service will not start on the new JDK, when --add-opens is being added to make something work, when...

developmentgojava
0
2
Jfr AdvancedA

Engineering JDK Flight Recorder evidence beyond stock settings: discovering event schemas and settings on the target build, designing threshold/period/throttle/stack trade-offs, composing and validating JFC configurations, accounting for concurrent recordings, defining low-cost custom events and relational metadata, operating Recording/RecordingStream/MXBean consumers, and validating loss, parsing, retention, privacy, and Java 25 JFR features. Use when an event is absent, a field/parser is gu...

developmentjavabash
0
2
Jfr And Async ProfilerA

Selecting the least-perturbing JVM evidence source that matches the question: JFR events and timeline versus async-profiler sampling, CPU versus elapsed/off-CPU, allocation versus retention, lock versus queue/I/O, startup versus steady state, and one-off versus continuous capture. Covers adequacy, positive controls, target scope, version discovery, container access, overhead, artifact integrity, and cross-tool reconciliation. Use before a JVM profile is collected or when an empty/disagreeing ...

developmentgojava
0
2
Jhsdb And Core DumpsA

Post-mortem inspection of a dead or hung JVM: reading hs_err, producing a usable core dump, the jhsdb modes (jstack, jmap, jinfo, clhsdb, hsdb) against a core or a live process, and the build and symbol requirements that make a dump readable. Use when a process died and left an hs_err_pid file, when jstack or jcmd hangs against a wedged JVM, when a container disappeared with exit code 137 and no log, when a crash points at a J/V/C frame, when jhsdb reports DebuggerException or nonsensical poi...

developmentgojava
0
2
Jit CompilationA

HotSpot JIT compilation and warm-up: tiered policy, C1/C2 queues and profiling, OSR, deoptimization, code-cache pressure, compiler resources in containers, and warm-up as a workload-dependent curve rather than a clock delay. Use when p99 is bad for the first minutes after a deploy, when performance degrades permanently until a restart, when "CodeCache is full" appears, when a startup probe or traffic gate needs a warm-up criterion, when -XX:-TieredCompilation or -Xcomp is proposed, when scali...

developmentgojava
0
2
Jit Inlining And Escape AnalysisA

Inlining and escape analysis in C2: inlining as the multiplier, scalar replacement versus "stack allocation", flow-insensitivity, turning a PrintInlining verdict into a code change, and measuring with gc.alloc.rate.norm. Use when allocation rate is high on a hot path, when a hot call is refused inlining and the fix is unclear, when an object pool for small objects, @ForceInline on application code or a higher FreqInlineSize is proposed, when an interface gains a third implementation on a crit...

developmentgojava
0
2
Jmh AdvancedA

Designing advanced JMH experiments: shared and asymmetric state topologies, groups, parameter matrices, auxiliary counters, fixture arbitration, fork/JVM controls, profilers, hardware counters, annotated assembly, compiler controls, cold-state protocols, and multi-modal variance diagnosis. Uses runtime capability discovery and separates diagnostic profiled runs from decision runs. Use when a benchmark is concurrent, fork-dependent, profiler-sensitive, cold/startup-oriented, or produces unexpl...

developmentrustgo
0
2
Jmh MicrobenchmarksA

Designing and auditing JVM microbenchmarks whose workload, observation boundary, compiler context, state topology, lifecycle, units, and statistical comparison match the engineering question. Covers dead-code elimination, constant folding, Blackhole/return values, forks, warm-up, fixture levels, inputs, operations-per-invocation, allocation counters, experimental units, uncertainty, paired comparisons, negative controls, and production extrapolation. Use before trusting a JMH score or replaci...

developmentrustgo
0
2
Jni And FfmA

Crossing into native code: JNI call overhead, critical sections and what they block, the FFM downcall and upcall path, `Linker` and method handles, why a native frame pins a virtual thread, and measuring the boundary cost. Use when a native call sits inside a tight loop, when someone proposes migrating JNI to Panama to fix pinning, when `Linker.Option.critical()` is applied without a measured duration, when `jdk.VirtualThreadPinned` events point at a `native` method or `MethodHandle.invokeExa...

developmentgojava
0
2
Jvm BytecodeA

Reading and reasoning about JVM bytecode: javap -c -p -v, operand stack and local slots, the constant pool and resolution timing, descriptors versus Signature, the invoke* family with invokedynamic and inline caching, verification and the StackMapTable, the class-file limits, what javac desugars, and what bytecode does and does not say about performance. Use when a VerifyError appears after instrumentation by an agent, proxy or mock library, when UnsupportedClassVersionError names two class f...

developmentrustgo
0
2
Jvm Class LoadingA

Class loading, class identity and classloader leaks: parent-first delegation, {defining loader, binary name} identity, loading versus linking versus initialisation, Metaspace retention, and CDS/AOT cache for startup. Use when a ClassCastException reports identical type names on both sides, when Metaspace grows monotonically across redeploys or plugin reloads, when ClassNotFoundException and NoClassDefFoundError need to be told apart, when IllegalAccessError mentions "does not export" or Inacc...

developmentrustjava
0
2
Jvm Gc TuningA

Deciding whether GC is the actual bottleneck, then choosing a collector and sizing the heap. Use when GC pauses appear on the critical path of a latency profile, when full collections show up, when the heap grows toward its limit, when sizing a JVM for a container, or when a collector change is being proposed. Start from java-performance instead when the symptom is latency or CPU and GC has not been confirmed as the cause. Does not cover how collectors work internally (gc-fundamentals), confi...

developmentgojava
0
2
Jvm Memory RegionsA

The major memory-accounting domains of a JVM process — heap, Metaspace/class space, code cache, thread stacks, direct/native/JVM-internal memory and mapped/file-backed pages — and how to budget them against a container limit. Use when a pod is OOMKilled with no Java exception, when an OutOfMemoryError names something other than "Java heap space", when -Xmx is set equal to the container limit, when RSS exceeds the heap by more than expected, when a heap above 32 GB is proposed, or when sizing ...

developmentgojava
0
2
Jvm Ml InferenceA

Engineering CPU and accelerator-backed ML inference from JVM applications: choosing in-process versus remote serving, bounding native sessions and predictors, coordinating engine and request parallelism, batching under a latency deadline, reusing direct buffers, warming deployments and diagnosing native memory outside NMT. Use when DJL, ONNX Runtime or another native inference engine loses throughput as concurrency rises, leaks RSS, overloads a model pool or needs graceful degradation. Model ...

developmentgojava
0
2
Jvm Performance ReviewA

Auditing JVM configuration evidence across the supplied command, effective runtime flags, target JDK build, container/cgroup envelope, workload lifecycle, and stated SLO. Classifies flags by support and origin, detects masking, duplicates and ergonomic interactions, prices heap/non-heap/CPU/startup trade-offs, and emits prioritized falsifiable findings rather than folklore flag lists. Use for JVM options, Kubernetes manifests, JDK upgrades, collector/heap proposals, or claims that a flag fixe...

developmentrustgo
0
2
Kafka Consumers In JavaA

Operating a Kafka consumer from Java: the log-not-a-queue model where consumption removes nothing and position is an offset; the rebalance as the central operational event, with assignment and membership choices that can reduce disruption and where duplicates enter; processing-interval versus heartbeat/session failures; pause/resume for slow work; commit strategies; auto.offset.reset as a data-loss-or-reprocessing decision; and lag as record, byte, time and catch-up signals. Use when a group ...

developmentjavaspring
0
2
Kubernetes Service LifecycleA

A Java service at the edges of its life under Kubernetes: liveness, readiness and startup probes as three different questions, probe timing arithmetic, graceful shutdown as a sequence where endpoint removal races SIGTERM, terminationGracePeriodSeconds as a budget, draining non-HTTP work such as Kafka consumers and scheduled jobs, PodDisruptionBudgets, and limits as availability decisions. Use when 502s appear only during a rolling update, when a liveness probe checks a database and a blip res...

developmentgojava
0
2
Latency StatisticsA

The statistics of latency measurement: estimands, means and quantiles, histogram aggregation, uncertainty, censoring, dependence, and coordinated omission. Use when an SLO or dashboard reports mean latency, when p99 values are averaged across instances or time windows, when a percentile is quoted without its sample count, when Prometheus buckets are the default set, or when deciding whether two measurements actually differ. Does not cover generating the load (load-testing), sizing systems fro...

developmentjavarails
0
2
Layering And BoundariesA

Deciding where an enterprise application's boundaries go and which direction dependencies cross them: the classical presentation / domain / data-source split, the styles that reorganise it (hexagonal, clean, modular monolith, vertical slices), and how a boundary is enforced rather than documented. Use when a package structure is argued about, when a controller contains business rules, when an entity or DTO travels end to end, when a service layer only forwards, when hexagonal is adopted witho...

developmentrustgo
0
2
Leader ElectionA

Electing one active instance for work that must not run concurrently: the lease renewal model and the rule that failed renewal never extends the leader's conservative deadline; split-brain and resource-side fencing/idempotency; failover time as detection, election and warm-up; coordination-store leases, Kubernetes Lease objects and ShedLock rows, and what each is adequate for; and when not to elect. Use when a @Scheduled job runs once per replica after scaling out, when two instances both bel...

developmentjavareact
0
2
Legacy Enterprise ModernizationA

Modernising an enterprise application that is in production and cannot stop: understanding a system nobody fully knows, pinning behaviour before changing it, strangling functionality out incrementally, and defending a new model with an anti-corruption layer. Use when a rewrite is proposed for a system that still earns money, when a shared database has several writers, when business rules live in stored procedures and triggers, when there are no tests and no specification, when a strangler mig...

developmentgojava
0
2
Linux For JvmA

The Linux side of a JVM incident: RSS versus virtual memory, page faults and swap, AlwaysPreTouch, transparent huge pages, cgroup CPU throttling, the two OOM killers, file-descriptor and process limits, signals and graceful shutdown, and PSI as a direct stall signal. Use when a process dies with exit code 137 or no log at all, when a GC pause in the log does not match the pause the client felt, when "too many open files" or "unable to create native thread" appears, when THP or swappiness is b...

developmentgojava
0
2
Littles Law And QueueingA

Conservation checks from Little's Law (`L = λW`) and queueing decisions: measurement boundaries, service demand versus residence time, utilisation curves, thread pool and executor sizing, bounded queues and rejection policy. Use when choosing a pool size, when latency is high while CPU is low, when latency grows over the duration of a run, when someone proposes adding threads to a CPU-bound path, or when a ThreadPoolExecutor is not growing past its core size. Does not cover the statistics of ...

developmentjavaapi
0
2
Load Balancing And RoutingA

Getting a request to a replica that can serve it: L4 versus L7 by capability rather than layer number, why an L4 balancer in front of long-lived HTTP/2 or gRPC connections balances connections instead of requests and pins each flow to one replica, the balancing algorithms and what each optimises, power-of-two-choices, health checking and outlier ejection with the fleet-ejection hazard, and connection draining. Use when per-pod request rate is skewed while connection counts look even, when one...

developmentrustgo
0
2
Load Testing AdvancedA

Selecting and executing advanced load profiles—baseline, capacity-envelope, breakpoint, stress, spike, ramp, soak and recovery—using bracketed boundaries, scenario-specific validity, phase isolation and server-side evidence. Use when one steady run is presented as capacity, when overload and SLO boundaries are conflated, when burst/recovery or long-duration resource retention must be tested, or when automation parses generator output. Basic workload validity belongs to load-testing; coordinat...

developmentjavascriptgo
0
2
Load TestingA

Designing valid service load experiments: choosing open or closed workload models, defining offered, admitted and successful work, controlling generator and environment bias, representative workload and data, state-based warmup, run validity, uncertainty, and reproducible evidence. Use when designing or reviewing k6, Gatling, JMeter or similar tests, diagnosing a throughput plateau, validating a baseline, or deciding whether a run measured the target rather than the generator. Profile selecti...

developmentgojava
0
2