Claude-skill-registry api-contract-change-end-to-end
Use this when changing REST endpoints so Rust DTOs, UI DTOs, OpenAPI, and docs stay in sync.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/api-contract-change-end-to-end" ~/.claude/skills/majiayu000-claude-skill-registry-api-contract-change-end-to-end && rm -rf "$T"
manifest:
skills/data/api-contract-change-end-to-end/SKILL.mdsource content
Goal
Make API changes once, but keep all consumers consistent (CLI/server, UI, docs).
Checklist
- Locate the endpoint
- Routing/handlers:
,src/routes.rs
,src/api_server.rssrc/web_server.rs
- Update Rust contract types
- DTOs:
src/api_types.rs - If you adjust validation/errors, keep behavior consistent with existing API error shapes (
).src/errors.rs
- Update UI types + API client
- DTOs:
(explicit note at top: aligned withview/api/types.ts
)src/api_types.rs - Calls:
view/api/client.ts
- Update OpenAPI + help docs
- REST schema:
docs/openapi.json - If it’s user-visible, update relevant guides under
(oftendocs/help/*
, plus the feature-specific page).docs/help/api-quick-reference.md
- Add/adjust tests
- Rust behavior:
(integration-heavy, many usetests/*.rs
).assert_cmd - UI behavior:
(Vitest).npm run test:ui - Cross-cutting behavior: consider adding/updating smoke coverage under
.smoke/tests/
- Verify locally (CI parity)
npm run lintnpm testnpm run smoke
Notes
- Treat this repo as “contract-synchronized”: changing just one of Rust/UI/OpenAPI will likely break users or tests.
- Prefer incremental changes that preserve backwards compatibility for existing clients when practical.