← ClaudeAtlas

write-api-clientlisted

Use when a request spec needs a call that no existing client method covers — adding a domain client, adding a method to one, or extending the shared transport helper. Covers where the endpoint path belongs, what the method should return, and when a new client is warranted at all. Reads conventions from .claude/test-profile.md.
AndreiBanu1/playwright-suite-skills · ★ 1 · AI & Automation · score 72
Install: claude install-skill AndreiBanu1/playwright-suite-skills
# Skill: write-api-client Add the reusable call a spec is missing, at the right level. ## Preconditions 1. `.claude/test-profile.md` exists. If the profile records no client layer, calls in this repo are made directly from specs — adding a layer is an architectural change, so ask first rather than introducing one for a single spec. 2. You know the endpoint, its method, its inputs, and the shape it returns. ## Procedure ### 1. Decide the level before writing anything Three levels, and picking the wrong one is the mistake this skill exists to prevent: | Level | Choose it when | | -------------------------- | ------------------------------------------------------------------------------ | | **Existing client method** | The endpoint's domain already has a client. Add a method. This is the common case. | | **New domain client** | The domain has no client *and* you can name at least two endpoints it will own. | | **Shared transport** | The need is genuinely cross-cutting: a verb wrapper, a response envelope, a retry policy. Rare. | One endpoint does not justify a new client. Put the method on the nearest existing client and split later when a second endpoint arrives — a client with one method is indirection with no payoff, and premature domain boundaries are harder to undo than a later split. Never reach for the shared transport to solve a domain problem. Anything domain-s