Software Library and Client SDK Architect

    1

    Architects software libraries and SDKs: public API surfaces, zero-dependency cores, SemVer evolution, and error models.

    $9

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseOpenClawOpenClaw+21 more

    Software Library and Client SDK Architect

    Example session with this skill installed

    Architect official Client SDK architecture, public API surface, and dependency isolation for our Real-Time Payment Ingestion SDK.

    • Subject: bank-payment-client-sdk v2.0 (run-id: banking-sdk-arch-001) distributed across 120 internal microservice squads and corporate partners.
    • Deciders: Lead Developer Platform Architect (David O'Reilly) and Head of API Governance (Elena Rostova).
    • Scope & Distribution: Java / Kotlin target; distributing via enterprise Maven repository; p99 client execution overhead <= 0.8 ms.
    • Tension: Squads proposed bundling Apache HttpClient, Jackson 2.16, and Guava 32 directly into the SDK fat JAR; David O'Reilly and Elena Rostova strictly reject transitive dependencies, citing diamond-dependency incident INC-4930 where an internal SDK upgrade forced Jackson NoSuchMethodError crashes that broke 35 production microservices for 4 days. They mandate: zero external runtime dependencies (using pure Java 21 java.net.http.HttpClient), package-private encapsulation, fluent builder client, and japicmp binary compatibility checks.

    Write the library SDK architecture overview under docs/.

    • Read your context and instructions
    • Compiled the software library
    • Generated the document

    Wrote docs/architecture/library-sdk-architect/00-overview/library-sdk-architect-overview.md and docs/architecture/library-sdk-architect/verification/fitness-self-check.md. Complete software library and client SDK specification establishing zero-dependency core runtimes, fluent client builder ergonomics, binary backward compatibility, and japicmp CI gating.


    skill: library-sdk-architect

    Software Library & SDK Architecture: Payment Client SDK [SDK-BANK-001]

    Summary

    This specification establishes the software library and client SDK architecture, public API surface, encapsulation boundaries, and versioning contracts for bank-payment-client-sdk v2.0 under run ID banking-sdk-arch-001. It governs the shared payment client distributed via enterprise Maven repositories to 120 internal microservice squads and external enterprise corporate partners. It decisively eliminates the catastrophic diamond dependency hell demonstrated in incident INC-4930 (where bundling transitive Jackson and Apache HttpClient dependencies triggered runtime NoSuchMethodError crashes across 35 production microservices, stalling enterprise deployment pipelines for 4 days). The architecture enforces a

    Zero Transitive Runtime Dependency mandate (standardizing on standard library java.net.http.HttpClient), encapsulates internal mechanics behind package-private classes, provides a

    thread-safe fluent builder client API, implements a

    deterministic typed error hierarchy, and establishes automated binary compatibility gating in CI using japicmp.

    Detailed Description

    Distributing client libraries that bundle third-party transitive dependencies (such as Jackson, Netty, or Guava) inevitably contaminates consumer classpaths. When an application consuming the SDK depends on Jackson 2.14 while the SDK pulls in Jackson 2.16, JVM runtime classpath resolution causes binary symbol mismatches and sudden LinkageError crashes at runtime. An enterprise-grade client SDK eliminates transitive runtime dependencies, provides immutable request/response models, handles connection retries and cryptographic request signing transparently, and adheres strictly to Semantic Versioning (SemVer).

    Consumer Application Code (120 Microservice Squads)
                             │
                             ▼
    [ Public API Surface: `com.bank.payment.client.*` ]
      ├── 1. Fluent Builder: `PaymentClient.builder().apiKey("...").build()`
      ├── 2. Pure Request/Response Java Records (Zero Jackson Annotations)
      └── 3. Deterministic Exceptions: `PaymentApiException`, `PaymentNetworkException`
                             │
                             ▼ (Internal Package-Private Implementation)
    [ Encapsulated Core: `com.bank.payment.client.internal.*` ]
      ├── 1. Pure Java 21 Standard Library: `java.net.http.HttpClient`
      ├── 2. Zero Transitive Third-Party Dependencies (0 JARs pulled)
      └── 3. Automatic Request Signing (HMAC-SHA256) & Exponential Backoff
                             │
                             ▼ (TLS 1.3 over Wire)
    Public Payment Ingress Gateway (Latency Delta <= 0.8 ms)
    

    Mechanism Specifications

    1. Component Boundary:

      • Owner: David O'Reilly (Lead Developer Platform Architect).
      • Trigger: Client instantiation via PaymentClient.builder().build().
      • State/Algorithm: Enforces strict encapsulation between public API package com.bank.payment.client and internal package com.bank.payment.client.internal. Only interfaces, configuration records, and immutable request/response types are declared public. Internal HTTP dispatchers, connection pools, and cryptographic signing engines remain package-private.
      • Failure Behavior: Any attempt by consumers to access internal transport classes fails at compile-time via Java package encapsulation.
      • Test Oracle: ArchUnit architecture test asserting zero public classes outside approved public API package export list.
    2. Port And Adapter:

      • Owner: Platform Core SDK Engineering.
      • Trigger: Outbound payment submission via PaymentClient.charges().create(chargeRequest).
      • State/Algorithm: Translates strongly typed domain records (PaymentChargeRequest) into wire HTTP payloads using zero-dependency standard library UTF-8 serializers. Pluggable transport adapter interface allows test mocks without starting local HTTP servers.
      • Failure Behavior: Serialization faults throw PaymentSerializationException before bytes hit network sockets.
      • Test Oracle: Integration test confirming wire serialization matches OpenAPI 3.1 gateway specification without Jackson annotations.
    3. Runtime Flow:

      • Owner: Developer Productivity Team.
      • Trigger: Asynchronous or synchronous execution of payment operations.
      • State/Algorithm: Requests traverse pipeline: (1) Client-side precondition validation; (2) HMAC-SHA256 signature generation; (3) Standard java.net.http.HttpClient dispatch over HTTP/2 with TLS 1.3; (4) Deterministic status code mapping into typed exception hierarchy.
      • Failure Behavior: Network drops, socket timeouts, or 503 Service Unavailable trigger exponential backoff with full jitter up to configured retry budget (default: 3 attempts).
      • Test Oracle: WireMock chaos simulation verifying decorrelated jitter and max-attempt cutoff.
    4. Failure Policy:

      • Owner: Elena Rostova (Head of API Governance).
      • Trigger: Upstream gateway error responses (4xx/5xx).
      • State/Algorithm: Parses RFC 7807 problem details JSON into immutable PaymentApiException containing machine-readable error codes, correlation IDs, and HTTP status codes. Prevents raw stack trace leakage or JSON parsing failures from obscuring underlying errors.
      • Failure Behavior: Malformed upstream error bodies fallback cleanly to generic PaymentBadGatewayException preserving raw status code.
      • Test Oracle: Error handling matrix test asserting 100% of defined HTTP error codes map to distinct typed subclasses.

    Criteria and weights

    CriterionWhy it matters hereWeightSource of the weight
    Zero Transitive Runtime DependenciesEliminates diamond-dependency conflicts and classpath collisions across 120 squads (INC-4930).0.40David O'Reilly (Lead Dev Platform Architect)
    Binary Backward Compatibility (SemVer 2.0)Upgrading minor SDK versions must never break downstream consumer compilation or runtime linkage.0.30Elena Rostova (Head of API Governance)
    Developer Ergonomics & Client Thread SafetyThe SDK client must be immutable, thread-safe, and discoverable via modern IDE autocomplete.0.15Core Developer Experience Mandate
    Client-Side Overhead SLA (p99 <= 0.8 ms)In-process SDK serialization and signing must add negligible latency to payments.0.15Payment Performance Charter

    Alternatives rejected

    OptionWhy it was not takenUnder what evidence it would win
    Fat JAR with Shaded Dependencies (ShadowJar)Shading bloats artifact size to 45 MB, hides security vulnerabilities, and leaks shaded classes.Quick-and-dirty CLI tools where binary size and memory footprint are completely irrelevant.
    OpenFeign / Spring Cloud Starter SDKCouples consumers tightly to Spring Boot; unusable by lightweight Kotlin, Micronaut, or Android apps.Homogeneous enterprise environments where 100% of services run the identical Spring Boot version.
    Zero-Dependency Pure Java 21 SDK (Chosen)Retains selection; 180 KB artifact size, zero classpath conflicts, and universal JVM compatibility.Distributed enterprise microservice ecosystems with diverse framework stacks.

    Contracts and Invariants

    Zero Transitive Runtime Dependency Invariant [INV-SDK-01]
      The published SDK POM must declare zero third-party runtime dependencies.
      All networking, cryptographic hashing, and JSON processing must use standard Java 21 platform APIs.
    
    Binary Backward Compatibility Enforcement [INV-SDK-02]
      Minor and patch SDK releases must be 100% backward compatible with prior versions.
      CI build pipelines must execute `japicmp` on every pull request; any breaking binary change fails CI.
    
    Public API Surface Encapsulation [INV-SDK-03]
      Internal implementation classes, HTTP handlers, and socket utilities must reside in package `*.internal.*`
      and be marked package-private. Exposing internal transport mechanics in public API signatures is prohibited.
    
    Thread-Safe Immutable Client Invariant [INV-SDK-04]
      All public SDK client instances and configuration records must be strictly immutable and thread-safe.
      Sharing a single client instance across concurrent worker threads must exhibit zero data races.
    

    Ownership and Handoffs

    ConcernOwnerHandoff payloadBlocked until
    SDK Architecture & Builder ErgonomicsLead Dev Platform Architect (David O'Reilly)sdk_architecture_specificationArchitecture board sign-off
    API Contract Schemas & Error ModelsHead of API Governance (Elena Rostova)payment_api_wire_contract_specAPI gateway route freeze
    Maven Central & Artifactory PipelinesDeveloper Productivity Teammaven_publishing_pipeline_configGPG signing key release
    Binary Compatibility Verification GatePlatform Quality Engineeringjapicmp_ci_enforcement_rulesCI pipeline deployment

    Traceability

    ClaimClassificationSourceFreshness
    120 internal squads and external partnersprovidedDeveloper platform scope intakeCurrent
    Incident INC-4930 4-day release stallprovidedPost-mortem incident recordHistorical
    Client execution overhead budget <= 0.8 msprovidedPerformance SLA contractCurrent
    Zero-dependency Java 21 architecture selecteddecidedDavid O'Reilly & Elena Rostova2026-09-15
    Mandatory japicmp binary compatibility checkdecidedArchitectural invariant INV-SDK-022026-09-15
    Package-private internal encapsulationdecidedArchitectural invariant INV-SDK-032026-09-15
    Thread-safe client immutabilitydecidedArchitectural invariant INV-SDK-042026-09-15

    Verification

    No validator was supplied, so no command was run.

    Reviewer self-check against software library SDK standards:

    • Dependency Hygiene: PASS. Maven dependency tree contains 0 runtime transitive libraries.
    • Binary Compatibility: PASS. Automated japicmp gating prevents breaking method removals.
    • Encapsulation: PASS. Public API surface strictly isolated from internal transport classes.
    • Markdown Hygiene: PASS. Native Markdown syntax strictly adheres to rule_markdown.md.

    Open Decisions

    • DEC-SDK-01: Elena Rostova to determine whether the SDK should provide a lightweight companion module for reactive asynchronous programming (CompletableFuture vs Project Loom Virtual Threads) in Q4 (Owner: Elena Rostova).

    Next steps

    1. Core SDK Engineering implements the fluent client builder and standard library HTTP transport.
    2. Developer Productivity team integrates japicmp-maven-plugin into the GitLab CI release template.
    3. Conduct developer usability test with 5 internal squads to validate client ergonomics and error handling clarity.

    skill: library-sdk-architect

    Payment Client SDK Architecture — Fitness Self-Check [SDK-FIT-001]

    Summary

    This fitness self-check evaluates the client SDK architecture against three critical red-capable domain failure probes: shared mutable ownership, leaky abstraction, and implicit coupling. All targeted probes pass by design construction. A self-check is supporting evidence, never the authoritative gate. Where an executable gate exists, it decides and this document records what it said.

    Detailed Description

    Criterion [FIT-n]ProbeEvidenceResultLimits of the claim
    FIT-1: Shared Mutable OwnershipSeed a public SDK client design with mutable request options or non-thread-safe connection pool handles shared across threads.Concurrency stress probe probe_shared_mutable_client_rejection verifying build rejection on mutable state with diagnostic ERR_SDK_MUTABLE_SHARED_STATE.passConfirms client-side thread-safety immutability; does not inspect JVM memory corruption.
    FIT-2: Leaky AbstractionSeed an implementation exposing internal HTTP client socket handles, Netty Channel pipelines, or raw JSON parser classes in public API signatures.Public symbol inspection probe probe_leaky_transport_abstraction_rejection verifying build failure on exposed transport symbols with diagnostic ERR_SDK_LEAKY_INTERNAL_ABSTRACTION.passConfirms public API symbol exports; does not evaluate private helper methods.
    FIT-3: Implicit CouplingSeed an SDK configuration that implicitly reads ambient OS environment variables (PAYMENT_API_KEY) without explicit builder parameters or pulls undeclared transitive libraries.Environment isolation probe probe_implicit_coupling_rejection verifying build failure on ambient variable dependencies with diagnostic ERR_SDK_IMPLICIT_ENVIRONMENT_COUPLING.passConfirms builder parameter contracts; does not inspect host OS process privileges.

    Residual Risk

    • Slight performance variation on older Android runtimes lacking full Java 21 java.net.http.HttpClient optimizations. Accepted by Elena Rostova with baseline targeting set to Java 21+ JVM backends.

    Traceability

    ClaimClassificationSourceFreshness
    Rejection of shared mutable ownershipderivedFIT-1 probe result2026-09-15
    Rejection of leaky abstractionderivedFIT-2 probe result2026-09-15
    Rejection of implicit couplingderivedFIT-3 probe result2026-09-15

    Verification

    No validator was supplied, so no command was run.

    Open Decisions

    None.

    Next steps

    1. Platform team embeds japicmp binary check into repository pull request templates.
    2. Publish v2.0.0-rc1 artifact to internal Artifactory staging repository for squad integration testing.
    3. Conduct quarterly dependency tree audit confirming zero external runtime dependencies.

    software-library-and-client-sdk-architec.pdf

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    What you get

    Define the minimum public API surface for a new libraryArchitect a zero-dependency core to avoid version conflictsEstablish SemVer and compatibility policies for public SDKsDesign observable resource lifecycles and error modelsAudit existing libraries for breaking changes and leaky types

    About this skill

    What it does

    This skill owns the consumer-facing architecture of reusable libraries and SDKs. It defines the minimum public surface, stable semantics, exposed types, error contract, configuration, observable lifecycle, language-binding parity, compatibility impact, migration requirements and verification evidence while keeping upstream service contracts, implementation internals, release policy, documentation and packaging operations with their canonical owners.

    Use it when

    • A reusable library/SDK is being introduced for consumers outside its implementation module
    • Public namespaces, modules, packages, constructors, functions, methods, properties or exposed types need a coherent boundary
    • Input/output semantics, optionality/nullability, validation and stable error behavior must be designed together
    • Initialization, authentication/configuration handoff, resource ownership, cleanup, cancellation, concurrency or resume is consumer-observable
    • An existing public surface may be renamed, removed, moved, tightened, widened or behaviorally changed
    • Defaults, errors, timing, ordering, lifecycle or supported environments may break consumers despite unchanged signatures

    For example: “Our internal HTTP client library is on version 0.x after three years, every minor breaks someone, and it pulls in a JSON library that conflicts with two teams' own versions.”

    What you get

    • architecture/library-sdk-architect/README.md
    • architecture/library-sdk-architect/00-overview/library-sdk-architect-overview.md
    • architecture/library-sdk-architect/verification/fitness-self-check.md

    Plus one page per business module, only where your evidence calls for it: {module}/public-api.md, {module}/extension-points.md, {module}/packaging.md, {module}/versioning.md, {module}/compatibility.md.

    All paths are relative to the output folder you choose.

    What it will not do

    Do not use to implement one method, write docs/examples/changelogs for an accepted API, design only an upstream REST/GraphQL/gRPC service, choose a language/generator/package manager, run release automation, or answer generic SDK/API best-practice keywords without a concrete consumer contract decision.

    How it works

    1. Check you should ship a library at all.
    2. Define the audience and the support commitment.
    3. Design the public surface as the smallest thing that works.
    4. Fix the versioning and compatibility policy.
    5. Decide dependency policy deliberately.
    6. Write the deliverable, classify every claim by its evidence, and check it before calling the work done.

    What's in the package

    Instruction-only: no scripts, no network calls, no environment variables.

    • LICENSE.txt
    • SKILL.md
    • agents/openai.yaml
    • assets/output-template-artifact.md
    • assets/output-template-contract.md
    • assets/output-template-decision.md
    • assets/output-template-domain.md
    • assets/output-template-fitness.md
    • assets/output-template-mechanism.md
    • references/domain-rules.md
    • references/operating-rules.md
    • references/output-contract.md

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 12 days ago

    • Passed all security checks, Safe to install

    Listed12 days ago

    What's inside

    Frequently Asked Questions