All authors

Claude Skills by robsonkades
github.com/robsonkades305 skills0 installs424 views
- Gof CommandCommand in modern Java: turning an invocation into an object so it can be queued, logged, scheduled, retried or undone — and the distinction from an event, which is a fact rather than a request. Covers when reifying a call earns its cost and when a method reference is enough, undo through inverses versus mementos versus compensation, what changes when a command is persisted or sent to a broker (versioning, at-least-once delivery, idempotency), and the captured-state hazard when a command exec...Votes: 0GitHub stars: 2
- Gof CompositeComposite in modern Java: treating a leaf and a tree of leaves through one interface, and the hazards that come with a recursive structure. Covers the transparent-versus-safe trade-off and when a sealed interface with exhaustive pattern matching changes that trade-off, unbounded depth and StackOverflowError, cycles introduced by parent pointers and the recursion hazards they create in equals, hashCode and toString, mutation during traversal, and why remote children require additional distribu...Votes: 0GitHub stars: 2
- Gof DecoratorDecorator in modern Java: wrapping an object in something of its own interface to add behaviour, stackably, at runtime — and the fact that the stacking order changes the semantics. Covers the ordering of retry, timeout, circuit breaker, cache, metrics and logging and what each arrangement means, retry amplification across layers, the identity loss that breaks ==, instanceof and listener deregistration, when a framework interceptor is the same pattern already provided, and the thread-safety a ...Votes: 0GitHub stars: 2
- Gof FacadeFacade in modern Java: one coherent entry point over a subsystem of collaborators, so callers depend on an intention rather than on a sequence. Covers the difference between a facade (simplifies, does not forbid) and a boundary (forbids), the god-facade drift where one class accumulates unrelated use cases, how application services and gateways can play this role while retaining their own boundary responsibilities, and the transaction and fan-out decisions a facade method silently owns. Use w...Votes: 0GitHub stars: 2
- Gof Factory MethodFactory Method in modern Java, and the three different things that share its name: the GoF pattern (an overridable creation method that lets subclasses select the product), Effective Java's static factory method (a named constructor, not this pattern), and any method someone called createX. Covers when the subclass hook is genuinely right, when an injected Supplier or a keyed map is a simpler alternative, and the constructor-calls-an-overridable-method trap it invites. Use when a protected cr...Votes: 0GitHub stars: 2
- Gof FlyweightFlyweight in modern Java: sharing one immutable instance across many logical occurrences to reduce retained memory, with benefits dependent on duplicate lifetimes and lookup cost. Covers the intrinsic/extrinsic split, why cheap TLAB allocation does not make reclamation free, the memory arithmetic deciding whether a cache entry costs more than the object it saves, string deduplication and boundary canonicalisation as candidate alternatives, the unbounded intern map as a leak, and the == trap. ...Votes: 0GitHub stars: 2
- Gof InterpreterInterpreter in modern Java: representing a small language as a typed tree and evaluating it, using per-node interpretation or a sealed AST with an exhaustive switch according to the extension contract. Covers parsing as a separate problem the pattern does not solve, when an existing expression language beats writing one, how general expression engines become code-execution surfaces when exposed with unsafe capabilities, the resource bounds an interpreter over untrusted input needs, and closur...Votes: 0GitHub stars: 2
- Gof IteratorIterator in modern Java: traversing an aggregate without exposing it, and choosing between Iterator, Stream and Spliterator — external pull versus internal lazy pipeline versus the parallel decomposition primitive. Covers when a Spliterator can adapt to both, what fail-fast really promises and how weakly consistent iterators differ, streams that hold a resource and must be closed, remote pagination as iteration with page drift, and the characteristics that decide whether a stream can be sized...Votes: 0GitHub stars: 2
- Gof MediatorMediator in modern Java, treated as high-risk: replacing many-to-many collaboration with a hub that owns the interaction protocol, and the god object that hub becomes when nothing bounds it. Covers the direction test that separates it from a facade, event-based alternatives and their delivery coupling, the reentrancy loop when a colleague notifies the hub that notifies it back, when the hub serializes work, and orchestration versus choreography with the availability coupling an orchestrator i...Votes: 0GitHub stars: 2
- Gof MementoMemento in modern Java: capturing an object's state so it can be restored later, without exposing that state to whoever holds the capture. Covers the encapsulation techniques Java offers, why immutable state can be retained by reference behind an appropriate boundary, the memory cost of an undo stack and the alternatives (inverses, diffs, structural sharing), the torn capture when the source mutates mid-copy, and the distinction from a durable snapshot and from event sourcing. Use when undo, ...Votes: 0GitHub stars: 2
- Gof ObserverObserver in Java: choosing and reviewing in-process listener contracts for ordering, errors, threads, registration lifetime, reentrancy and notification outside locks. Use when adding listeners, investigating retained listeners or missed callbacks, or assessing a move from local notifications to a broker. Covers migration contract changes; detailed transaction/outbox design belongs to event-driven-architecture, broker guarantees to delivery-semantics, demand protocols to reactive-backpressure...Votes: 0GitHub stars: 2
- Gof Pattern AntipatternsDetecting and removing design-pattern misuse: abstractions that trace to no requirement, patterns chosen because a name sounded right, and the specific failure each overused pattern produces. Covers the detectable signals — an interface with one implementation, a class per constant, a factory whose products are unrelated, a hub with twelve dependencies, a listener never deregistered, a wrapper stack nobody can read, a getInstance() a test must reset — with the cause, the concrete cost, and th...Votes: 0GitHub stars: 2
- Gof Pattern ConfusionTelling apart the patterns that look alike, so a design is not chosen because a name sounded right. Covers the four wrappers (Adapter, Decorator, Proxy, Facade) and the two questions that separate them, Strategy against State against Template Method against Command, Observer against Mediator, the three creational lookalikes plus the static factory that is not Factory Method, Composite against Decorator, Visitor against Iterator, Command against Event, and Memento against snapshot against even...Votes: 0GitHub stars: 2
- Gof Pattern SelectionGetting from a stated design problem to a candidate pattern, or to no pattern, without choosing by familiarity. The second of two stages: it assumes the forces are named and the alternatives ladder has already been walked (gof-pattern-thinking), and supplies the mapping. Covers the discriminating questions that actually separate the twenty-three patterns, a selection matrix mapping design problems to candidates with their simpler alternatives, the relationship graph showing which patterns imp...Votes: 0GitHub stars: 2
- Gof Pattern ThinkingReasoning from a design problem to a design, where a Gang-of-Four pattern is one possible outcome and "no pattern" is an equally valid one: naming the forces, identifying what varies and along how many axes, walking the alternatives ladder from language feature up to architecture, and pricing the indirection before adopting it. Use gof-pattern-selection to shortlist unresolved choices once the forces are understood. Use when a pattern name is proposed before the problem is stated, when a revi...Votes: 0GitHub stars: 2
- Gof Patterns And DistributionWhat happens to a Gang-of-Four pattern when the collaboration crosses a process boundary, and which additional architectural contracts it may require. Covers process-local, boundary, interaction and algorithm patterns; assumptions that need rechecking at a boundary — shared state, clocks, atomicity, ordering and delivery; the transformations (Singleton to leader election, Observer to pub/sub, Iterator to pagination, Mediator to an orchestrator); and the level confusion that treats a design pa...Votes: 0GitHub stars: 2
- Gof Patterns In Modern JavaWhich Gang-of-Four patterns modern Java and Spring already implement, which they only change the expression of, and which still need writing by hand. Covers records, sealed types and pattern matching against Visitor, State, Composite and Interpreter; lambdas and functional interfaces against Strategy, Command, Factory Method and Observer; the container against Singleton, Abstract Factory and Factory Method; framework mechanisms against Decorator and Proxy; and what virtual threads and ScopedV...Votes: 0GitHub stars: 2
- Gof PrototypePrototype in modern Java: producing a new object from an existing instance's state, when the configuration is expensive or the concrete type is unknown to the caller. Covers why Cloneable/clone() needs an explicit contract and what replaces it, the deep-versus-shallow decision on graphs with identity and cycles, when immutable values can be shared, the torn-copy hazard under concurrency, and the identity rules when copying persisted objects. Use when clone() or Cloneable appears, when an obje...Votes: 0GitHub stars: 2
- Gof ProxyProxy in modern Java: a stand-in that controls access to another object behind that object's own interface — virtual (lazy), remote, protection and caching variants. Covers the central danger of making a network call look like a method call, how a proxy differs from a decorator, the self-invocation hole that silently disables @Transactional and @Cacheable, JPA lazy proxies and LazyInitializationException, what CGLIB cannot proxy, and safe publication in a virtual proxy. Use when a lazy-loadin...Votes: 0GitHub stars: 2
- Gof SingletonSingleton in modern Java, treated as a high-risk pattern: it conflates "one instance" with "reachable from anywhere", which must be justified separately. Covers why dependency injection gives uniqueness as a consequence of wiring, the scale ladder showing a Java singleton is unique per class loader and never per cluster, the safe lazy-initialisation idioms and the class-initialisation deadlock they invite, the static-state leakage that makes tests order-dependent, and the distributed mechanis...Votes: 0GitHub stars: 2
- Gof StateState in modern Java: making an object's behaviour depend on an explicit state, with the transitions themselves modelled rather than implied by scattered flags. Covers the intent difference from Strategy, where transitions should live — in the state classes, in a table, or in one exhaustive switch — sealed records against enums, rejecting illegal transitions by default, persisting a state through stable codes rather than ordinals, atomic transitions under concurrency, and timeouts as transiti...Votes: 0GitHub stars: 2
- Gof StrategyStrategy in modern Java, separated into three things that are usually conflated: the design concept (an algorithm varies), the classical class hierarchy, and the lambda or functional interface that expresses it today. Covers when a function value is enough and when a named type earns its keep, selecting a strategy by key instead of an if-else chain, the trap of strategies that differ only in constants and may be configuration, how shared state changes concurrency obligations, and the contract...Votes: 0GitHub stars: 2
- Gof Template MethodTemplate Method in modern Java: fixing an algorithm's skeleton while named steps vary, and the inheritance coupling that often makes composition preferable. Covers when final protects the sequence, controlled overriding, minimal hook surfaces, the constructor-calls-an-overridable-method trap, protected hooks becoming an API you cannot change, when the pattern is genuinely right (frameworks that instantiate your subclass, contract test base classes), and how to convert one to a class taking it...Votes: 0GitHub stars: 2
- Gof VisitorVisitor in modern Java: adding operations over a stable set of element types without editing them, and how a sealed hierarchy with an exhaustive switch competes with the classical double-dispatch version. Covers the expression problem—new operations cheap versus new element types cheap — the cases where classical Visitor still wins (encapsulated dispatch, libraries whose API is accept()), stateful visitors that are unsafe to share, recursion depth on deep structures, and unknown element types...Votes: 0GitHub stars: 2
- Graalvm JitGraal as a JIT compiler compared with C2: partial escape analysis, graph-size inlining and speculation, where Graal wins and where it loses, JVMCI and what JEP 410 removed, libgraal versus jargraal, and how to evaluate the swap with a fair measurement. Use when someone proposes switching to GraalVM for throughput, when a Graal-versus-C2 benchmark shows Graal "slower" with no warm-up control, when `-XX:+UseJVMCICompiler` or `-XX:+UseGraalJIT` is set on a stock OpenJDK, when a `-Dgraal.*` flag ...Votes: 0GitHub stars: 2
- Graalvm Native ImageGraalVM Native Image: closed-world reachability, dynamic-feature metadata, class initialization and image-heap state, CPU targeting, GC and PGO choices, observability, and fair comparison with HotSpot. Use when deciding whether AOT fits a workload, diagnosing build or runtime-only failures, or validating startup, footprint, latency, throughput, build-cost, portability, and security trade-offs. Does not cover Graal as a JVM JIT (graalvm-jit), JVM-preserving startup strategies (startup-cds-crac...Votes: 0GitHub stars: 2
- Grpc Http2 Service Mesh PerformanceDiagnosing and designing the performance of gRPC and HTTP/2 communication paths, including channel, connection and stream topology, flow control, serialization, Netty event loops, TLS connection churn and service-mesh proxy cost. Use when multiplexed traffic is skewed or stalls, a channel pool or HTTP/2 setting is proposed, mesh overhead consumes a material latency or CPU budget, or retries exist in both client and proxy. API semantics belong to rpc-and-api-contracts; TCP behavior to tcp-tuni...Votes: 0GitHub stars: 2
- Heap Dump AnalysisTaking and analysing a JVM heap dump: capturing without making the incident worse, dominator tree versus shallow and retained size, path to GC roots excluding weak references, Eclipse MAT and OQL, comparing two dumps, and separating a leak from a large working set. Use when heap grows monotonically with uptime, after an `OutOfMemoryError` or a `-XX:+HeapDumpOnOutOfMemoryError` file appears, when a histogram is being read by shallow size, when `jcmd` or `jmap` hangs against a stuck JVM, when a...Votes: 0GitHub stars: 2
- Hot Partitions And RebalancingRepairing a partitioned system whose distribution has failed in production: balanced key placement does not imply balanced traffic, so one celebrity key or one large tenant saturates a shard while the map is correct. Covers detection — per-shard rate, latency and storage, and the max-to-mean ratio, because an aggregate dashboard hides skew; naming the key by top-K sampling; the read-hot, write-hot, storage-hot and overloaded-fleet signatures; the repairs and their prices; and the rebalance, w...Votes: 0GitHub stars: 2
- Humble Objects And Functional CoreIsolating decisions from hard-to-test effects with Humble Objects, or a pure functional core and imperative shell when explicit data inputs fit the contract. Use when a rule can only be exercised by standing up the framework, when controller, scheduler, listener or UI logic makes focused tests difficult, or when retry, fallback or routing policy is entangled with the call it governs. Inspect heavy mocking as a possible symptom, not proof that a refactor is needed. Preserve adequate direct tes...Votes: 0GitHub stars: 2
- IdempotencyMaking an operation safe to apply more than once: natural idempotency versus an idempotency key plus durable operation state; choosing and scoping the key, distinguishing stable message identity from delivery tags; handling concurrent in-flight duplicates; replaying the stored response instead of returning a conflict; and why idempotent is not commutative. Use when a retry produces a second row, charge or email, when a handler starts with an exists() check before a write, when an Idempotency-...Votes: 0GitHub stars: 2
- Incident Evidence CapturePreserving decision-grade JVM incident evidence before remediation destroys it: setting an explicit recovery/evidence budget, selecting representative and control instances, copying existing telemetry first, capturing repeated low-risk state, escalating to JFR, heap, or core evidence only by symptom and approval, surviving containers/restarts, and recording integrity, clocks, provenance, privacy, and capture failures. Use during live degradation, impending restart/OOM, an unresponsive JVM, or...Votes: 0GitHub stars: 2
- Inheritance Mapping StrategiesMapping a subtype hierarchy onto tables — single table, class table (joined), concrete table per class — and deciding whether the hierarchy should exist at all. Use when an @Inheritance strategy is being chosen, when a single-table mapping is forcing every subtype's columns to be nullable, when a joined mapping's polymorphic query joins six tables to render a list, when adding a subtype requires a migration, when a discriminator column has drifted from the class names, when polymorphic querie...Votes: 0GitHub stars: 2
- Io Uring And Zero CopyReducing the cost of moving bytes through a JVM process: sendfile and FileChannel.transferTo, mmap and MappedByteBuffer, direct versus heap buffers at the syscall boundary, io_uring's submission and completion model and the three routes a JVM can actually reach it by, and proving a copy was eliminated. Use when CPU saturates while a service streams files or proxies bytes, when a loop reads into a ByteBuffer only to write it straight back out, when someone claims java.nio uses io_uring underne...Votes: 0GitHub stars: 2
- Java AnnotationsAnnotations as metadata that only means something if code reads it: retention policies and what each one costs, targets and where an annotation on a record component actually lands, @Inherited and its limits, marker interfaces versus marker annotations, @Override as a correctness check rather than decoration, and the gap between annotating something and enforcing it. Use when defining a custom annotation, when an annotation appears to have no effect, when validation or security annotations ar...Votes: 0GitHub stars: 2
- Java Api DesignJava API design from ordinary, advanced and invalid consumer calls: names carrying domain vocabulary, method and boolean naming conventions, arity and parameter objects, overload hazards, discoverability, public versus internal surface (package-private, JPMS exports), and API evolution — binary, source and behavioural compatibility, deprecation, semantic versioning. Use when designing or reviewing a public type, when a signature has grown past three parameters, when adding a method, overload ...Votes: 0GitHub stars: 2
- Java Application Security BasicsApplication-security judgement for Java 21+: password storage with current memory-hard KDF parameters, constant-time verification, secure randomness, authorisation inside the protected operation, adversarial validation, reversible-cryptography boundaries, and secret-safe types. Use when credentials, password hashes, salts, bearer tokens or peppers change; when MessageDigest, SecureRandom, Random, UUID, Cipher, Mac or PasswordEncoder serves a security purpose; when a controller annotation is t...Votes: 0GitHub stars: 2
- Java Clean CodeReadability and intention-revealing structure in Java: method and class sizing — including the point where splitting becomes harmful fragmentation — abstraction levels within a method, comments, hidden side effects, temporal coupling and hidden dependencies. Use when reviewing or refactoring for clarity, when a method has grown past comprehension or a class has shattered into fragments that only make sense together, or when callers must know an unwritten call order. Does not cover naming and ...Votes: 0GitHub stars: 2
- Java Code SmellsThe detection catalogue for Java code smells: Long Method, God Object, Feature Envy, Primitive Obsession, Data Clumps, Shotgun Surgery, Divergent Change, Mysterious Name, Mutable and Global Data, Data Class, Loops, Lazy Element, Refused Bequest, boolean blindness, null-heavy APIs and leaky abstraction, plus how modern Java changes the list and the routing table from a finding to the refactoring that fixes it. Use when auditing code for structural problems, before planning a refactoring, when ...Votes: 0GitHub stars: 2
- Java Cohesion CouplingCohesion and coupling in Java at class, package and module level: cohesion types (functional, communicational, temporal, logical), coupling types in real code, afferent/efferent coupling and instability, package dependency graphs, and JPMS module boundaries as enforced coupling limits. Use when a small change fans out across packages, when a package cycle appears, when deciding which package or module a class belongs in, or when reviewing package architecture. Principle framing lives in java-...Votes: 0GitHub stars: 2
- Java Composition Over InheritanceChoosing between inheritance, composition and sealed hierarchies in Java: fragile base classes, self-use of overridable methods, subclass explosion, the costs of delegation and decoration, sealed types with exhaustive switch as the modern middle ground, and the cases where inheritance is genuinely right. Use when reviewing an `extends` between classes you maintain, when a base-class change broke subclasses, when variants multiply along more than one axis, or when designing a new hierarchy. Do...Votes: 0GitHub stars: 2
- Java ConcurrencyEntry point for designing or triaging concurrency inside one JVM. Classifies work by lifecycle, blocking and CPU demand, state ownership, arrival shape, ordering, cancellation, failure, and scarce-resource bounds, then routes to executors, virtual threads, structured concurrency, futures, reactive streams, memory-model correctness, diagnostics, or testing. Use before selecting a concurrency abstraction or when “more threads,” “async,” or “reactive” is proposed as a performance fix. Detailed c...Votes: 0GitHub stars: 2
- Java Defensive ProgrammingWhere to defend in Java and where defence becomes noise: trust boundaries as the organising idea, preconditions with Objects.requireNonNull and explicit range and state checks, fail-fast over limping on, input normalisation at the edge, and assert for internal invariants only. Use when adding or reviewing validation, when the same invariant is re-checked on every layer, when code silently "corrects" bad input or wraps everything in catch-alls, or when hardening a public API. Does not cover co...Votes: 0GitHub stars: 2
- Java Dependency InversionDependency direction in Java: policy versus mechanism, ports and adapters, constructor injection as plain Java, factories, composition roots, and JPMS module edges as physical enforcement. Use when deciding whether to introduce an interface or port, when domain code imports a transport or vendor SDK, when code is only testable with a mocking framework or a live external system, or when reviewing a codebase where every class has a matching interface. Covers when inversion pays and when it is p...Votes: 0GitHub stars: 2
- Java Design By ContractContracts as the semantics of a Java API, without a contract framework: preconditions, postconditions and invariants defined precisely and mapped to Java 25 mechanisms — constructor and compact-constructor validation, invariants as types that cannot represent invalid states, postconditions via tests and proportionate runtime checks, contracts documented in Javadoc, behavioural subtyping (overrides may weaken preconditions and strengthen postconditions, never the reverse), and contracts across...Votes: 0GitHub stars: 2
- Java Dry Kiss YagniThe economics of duplication and abstraction in Java: knowledge duplication versus incidental (textual) duplication, what a shared abstraction costs, the wrong-abstraction failure mode, premature abstraction and speculative generality, essential versus accidental complexity. Use when deciding whether two similar pieces of code should be merged, whether a shared helper should be inlined back into its callers, when a utility has grown boolean parameters, or when reviewing code generalised for r...Votes: 0GitHub stars: 2
- Java EnumsEnums as types rather than labelled integers: instance fields instead of ordinal, constant-specific behaviour and strategy enums, extensibility through interfaces, EnumSet and EnumMap instead of bit fields and ordinal-indexed arrays, exhaustive switch and what separate compilation does to it, and what happens when an enum value crosses a database, a JSON payload or a topic. Use when int or String constants stand in for a closed set, when ordinal() encodes domain identity, when @Enumerated is ...Votes: 0GitHub stars: 2
- Java Exception DesignExceptions as API design in Java: checked versus unchecked as a deliberate decision, hierarchy sizing, translation at layer boundaries with cause preservation, typed failure facts for retry policy, failure atomicity when a method throws partway through, and when a sealed result type beats an exception. Use when designing the exception surface of a service or library, when a catch block swallows a failure or rewraps one without its cause, when a codebase has dozens of exception types nobody ca...Votes: 0GitHub stars: 2
- Java Fluent ApisFluent interfaces and builders as API decisions: when a builder pays for itself versus a record, constructor or static factory; staged builders and their compatibility cost; immutable wither-style APIs; and the debugging and binary compatibility consequences of method chaining. Use when designing or reviewing a type with a costly constructor call site, several optional values, or adjacent parameters of the same type; when someone proposes a builder, staged builder or DSL; or when a long chain...Votes: 0GitHub stars: 2
- Java GenericsGenerics as a compile-time contract over an erased runtime: raw types and what they disable, eliminating unchecked warnings rather than suppressing them, why arrays and generics do not mix, generic types and methods, bounded wildcards for API flexibility (PECS), generic varargs and @SafeVarargs, and typesafe heterogeneous containers with class tokens. Use when a raw type, a cast to a generic type, or an unchecked warning appears; when code creates an array of a generic type or a generic varar...Votes: 0GitHub stars: 2