applying-backend-diff

Convert backend PR diffs into admin-sdk query and mutation modules.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/connectedxm/admin-sdk --skill applying-backend-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: applying-backend-diff
Source: https://github.com/connectedxm/admin-sdk/tree/main/.claude/skills/applying-backend-diff
Command: npx skills add https://github.com/connectedxm/admin-sdk --skill applying-backend-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you reliably mirror new or changed backend admin API endpoints into the @connectedxm/admin-sdk TypeScript SDK so the generated OpenAPI spec and downstream types stay correct.

Core Features & Use Cases

  • PR/Diff-to-SDK mirroring workflow: Translates a backend PR, patch diff, or pasted diff into the corresponding src/queries and src/mutations files.
  • Generator-safe file shaping: Ensures new endpoint files match the strict AST-detected export order and return types so they are not silently dropped from openapi.json.
  • Type reuse and correctness checks: Reuses existing types from src/interfaces.ts and src/params.ts, then validates with npx tsc and npm run lint rather than relying on ad-hoc edits.

Quick Start

Use this skill when you want an AI to "update the admin-sdk to mirror the endpoints from this backend diff, adding the required query/mutation files under src/queries and src/mutations and then regenerating exports and verifying with typecheck and lint."

Frequently Asked Questions about applying-backend-diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I port backend API changes into a TypeScript SDK?

Port backend API changes by converting a provided PR or diff into correctly shaped query and mutation modules. This process mirrors endpoint updates into the TypeScript SDK while reusing existing shared types for accurate params and response data shapes.

What is the best way to generate react-query hooks from a backend diff?

Generating react-query hooks from a backend diff involves translating the PR changes into AST-expectant export structures. This ensures the generated OpenAPI spec and downstream types correctly include the new GET queries and mutations without being silently dropped.

How do I add paginated and cursor listings to an admin SDK?

Adding paginated and cursor listings to an admin SDK requires creating mutation and query files that accurately define params and response data shapes. The files must match the strict AST-detected export order to ensure generator inclusion and type correctness.

Why does openapi generation silently drop my new SDK endpoints?

OpenAPI generation silently drops new SDK endpoints when files do not match the strict AST-detected export structure and return types. Ensuring the correct export order and rebuilding index barrels via npm run exports prevents these endpoint omissions.

Do I need to run tsc and lint after mirroring API endpoints into an SDK?

Yes, you need to run tsc and lint after mirroring API endpoints into an SDK to validate type correctness and syntax. Final verification relies on npx tsc and npm run lint rather than ad-hoc edits, while CI handles the openapi generation.