AGENT SKILL

ac-sdk-and-client-library-design

Designing a client library other people will depend on: surface area and what to hide, error types that callers can act on, retry and timeout defaults that are safe to inherit, configuration precedence and credential handling, semantic versioning and the deprecation of a published method, language idiom and packaging, and the written SDK record. It explains how a client earns trust; it never recommends a language ecosystem and never promises stability. Use when asking "SDK design", "client library", "public API surface", "error types", "default retry in SDK", "semantic versioning for libraries", "deprecating a method", "credential handling in SDK", "why do people hate our SDK". Not for public HTTP API contracts (ac-api-design), not for package publishing logistics (ac-ci-and-release), not for client-side application architecture (ac-architecture).

License 许可
MIT
最近更新
2026-11-15
Stars
★ 81
Forks
17

01 前言 Front Matter

name
ac-sdk-and-client-library-design
status
seedling
license
MIT
metadata
{ "domain": "software-engineering" }
description
Designing a client library other people will depend on: surface area and what to hide, error types that callers can act on, retry and timeout defaults that are safe to inherit, configuration precedence and credential handling, semantic versioning and the deprecation of a published method, language idiom and packaging, and the written SDK record. It explains how a client earns trust; it never recommends a language ecosystem and never promises stability. Use when asking "SDK design", "client library", "public API surface", "error types", "default retry in SDK", "semantic versioning for libraries", "deprecating a method", "credential handling in SDK", "why do people hate our SDK". Not for public HTTP API contracts (ac-api-design), not for package publishing logistics (ac-ci-and-release), not for client-side application architecture (ac-architecture).

02 资源文件 10

03 SKILL.md 正文

SDK and client library design

Overview

A client library is a promise that other people's code will keep compiling and behave predictably. That promise is harder than an API contract because the library runs inside the caller's process: it consumes their threads, inherits their configuration, throws into their error handling, and upgrades on their schedule. The design decisions are therefore about what the caller is allowed to depend on.

This skill covers those decisions: how much surface to expose and what to keep private, what an error type must carry for a caller to act, which retry and timeout defaults are safe to inherit, how configuration precedence and credentials should work, and what semantic versioning commits a published library to. HTTP contract design and release logistics belong to other skills.

Primary sources: https://semver.org/ and https://www.rfc-editor.org/rfc/rfc9110.

When to use

  • When publishing a client library for an API.
  • When a library's changes keep breaking its users.
  • When deciding what to expose publicly and what to hide.
  • When handling credentials and configuration in a shared library.

When NOT to use

  • For the HTTP API contract itself (use ac-api-design).
  • For publishing pipelines and release automation (use ac-ci-and-release).
  • For internal application module structure (use ac-architecture).

Subskill Index

Leaf Domain segment Scope (one line)
subskills/public-surface.md software-engineering/public-surface What to expose, what to hide, and the cost of every public name.
subskills/error-types.md software-engineering/error-types Errors a caller can act on, and the information they must carry.
subskills/defaults-and-timeouts.md software-engineering/defaults-and-timeouts Retry and timeout defaults, and the danger of inheriting them silently.
subskills/configuration-and-credentials.md software-engineering/configuration-and-credentials Precedence, environment, and never logging a secret.
subskills/versioning-and-deprecation.md software-engineering/versioning-and-deprecation Semantic versioning, and retiring a published method.
subskills/idiom-and-packaging.md software-engineering/idiom-and-packaging Following the language's conventions rather than importing another's.
subskills/sdk-record.md software-engineering/sdk-record The written record: surface, defaults, versioning, and deprecation policy.

Status and honest limits

Library ecosystems differ in their tolerance for change: some treat every release as potentially breaking, others expect strict compatibility over years. A semantic version number communicates intent rather than guaranteeing behaviour, and a major version bump does not make a break acceptable if the migration is undocumented. Nothing here promises that a design will not need to change, and a library that has never deprecated anything has either no users or no discipline.

04 同仓库更多 Skills

jiayaoqijia
jiayaoqijia/cryptoskill

troves

Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say "Troves" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

trade

Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say "swap".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

staking

Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say "stake" explicitly.

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

send

Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say "pay 10 STRK to 0x...".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

portfolio

View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks "what do I have", "show me everything", "how much am I worth", "my positions", "my investments", "rebalance my portfolio", "I want 50% ETH", "optimize my holdings", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say "portfolio".

★ 81
jiayaoqijia
jiayaoqijia/cryptoskill

multi-swap

Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions "two swaps", "three swaps", "swap X and Y at the same time", or wants to convert multiple tokens in a single call.

★ 81