From c830147abd14f6d94f36a122be46fe421a85aa83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Tue, 15 Sep 2026 17:19:03 +0300 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=94=A7=20load=20live=20API=20con?= =?UTF-8?q?tract=20skill=20in=20Claude=20Code=20-=20mirror=20.agents/skill?= =?UTF-8?q?s/check-api-contract=20into=20.claude/skills=20so=20Claude=20?= =?UTF-8?q?=20=20Code=20picks=20it=20up=20alongside=20Codex=20-=20list=20c?= =?UTF-8?q?heck-api-contract=20in=20CLAUDE.md=20and=20AGENTS.md=20skill=20?= =?UTF-8?q?index,=20with=20a=20=20=20note=20to=20check=20the=20live=20Open?= =?UTF-8?q?API=20before=20claiming=20an=20endpoint=20is=20missing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/skills/check-api-contract/SKILL.md | 38 ++++++++++++++++++++++ AGENTS.md | 5 ++- CLAUDE.md | 5 ++- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .claude/skills/check-api-contract/SKILL.md diff --git a/.claude/skills/check-api-contract/SKILL.md b/.claude/skills/check-api-contract/SKILL.md new file mode 100644 index 0000000..ac612e1 --- /dev/null +++ b/.claude/skills/check-api-contract/SKILL.md @@ -0,0 +1,38 @@ +--- +name: check-api-contract +description: "Check Hezarfen's live Swagger/OpenAPI contract against the frontend when Burak says 'API'ler güncellendi', 'yeni API geldi', 'Swagger'a bakalım', asks what changed in the backend API, or asks to check API drift. Use for inspection and compatibility checks; do not implement frontend changes unless requested." +--- + +# Check the live API contract + +Treat the deployed OpenAPI document as the primary contract: + +- Swagger UI: `https://hezarfen.dizey.sh/swagger/` +- OpenAPI JSON: `https://hezarfen.dizey.sh/api-docs/openapi.json` + +Fetch the machine-readable document directly with `curl -fsSL` and use `jq` +to keep output focused. Do not clone or inspect the private backend repository +while the live OpenAPI document is reachable, unless Burak explicitly asks for +source-level investigation. + +## Workflow + +1. Confirm the health endpoint and OpenAPI JSON are reachable. Report HTTP or + access failures plainly; never infer a contract from an unavailable service. +2. Narrow the inspection to the domain or endpoint Burak named. If none was + named, compare the live path/method set and relevant request/response schemas + with `src/api/`, its domain exports, and `src/api/__tests__/`. +3. Check more than route existence: compare HTTP method, path/query parameters, + request bodies, response status codes, response unions, and referenced + schemas. Pay special attention to authentication/session flow changes. +4. Lead with concrete compatibility findings and link the affected frontend + files. Separate confirmed mismatches from items that still need runtime + verification. +5. Do not edit code when the request is only to inspect, compare, or report. + When Burak asks to implement the update, load `.claude/skills/api-layer/SKILL.md` + before changing endpoint files and follow its required test workflow. Also + load `solidjs-pitfalls` before changing SolidJS components. + +Use the shared `web-research` skill only if the documented Swagger/OpenAPI URL +moves or public discovery is otherwise needed. Never send credentials, cookies, +private URLs, or tokenized URLs to a hosted scraper. diff --git a/AGENTS.md b/AGENTS.md index d877967..c7e6d80 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,6 +26,9 @@ Bilingual codebase: Turkish UI labels, English code + commits. ## Skills Load on demand by area — `solidjs-pitfalls` | `ui-conventions` | `api-layer` | -`commit-workflow` | `dashboard-design`. Source of truth: `.claude/skills//SKILL.md`. +`commit-workflow` | `dashboard-design` | +`check-api-contract` (live Swagger/OpenAPI vs `src/api/`; check it before +saying an endpoint does or does not exist — the backend repo is not local). +Source of truth: `.claude/skills//SKILL.md`. Deeper docs by area: `docs/ui/` · `docs/auth/` · `docs/frontend/` · `docs/backend/`. diff --git a/CLAUDE.md b/CLAUDE.md index 36c7321..dbfdeb1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -25,6 +25,9 @@ Bilingual codebase: Turkish UI labels, English code + commits. ## Skills Load on demand by area — `solidjs-pitfalls` | `ui-conventions` | `api-layer` | -`commit-workflow` | `dashboard-design`. Source of truth: `.claude/skills//SKILL.md`. +`commit-workflow` | `dashboard-design` | +`check-api-contract` (live Swagger/OpenAPI vs `src/api/`; check it before +saying an endpoint does or does not exist — the backend repo is not local). +Source of truth: `.claude/skills//SKILL.md`. Deeper docs by area: `docs/ui/` · `docs/auth/` · `docs/frontend/` · `docs/backend/`.