sync-api

Copy server-side api.ts definitions to the client project.

9|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/whitecloud-save/whitecloud-client --skill sync-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sync-api
Source: https://github.com/whitecloud-save/whitecloud-client/tree/main/.opencode/skills/sync-api
Command: npx skills add https://github.com/whitecloud-save/whitecloud-client --skill sync-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that the client-side code analysis always uses the most up-to-date server API definitions, preventing inconsistencies and errors.

Core Features & Use Cases

  • Automated Synchronization: Copies the latest API definition file from the server to the client.
  • Pre-Analysis Check: Automatically runs before code analysis to guarantee fresh definitions.
  • Use Case: After a developer updates an API endpoint on the server, this Skill automatically updates the client's api.ts file, ensuring the frontend code reflects the latest backend changes before the next build or analysis.

Quick Start

Run the sync-api skill to update the client's API definition file from the server.

Frequently Asked Questions about sync-api

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

FAQPage Schema
How do I sync server API definitions to a client-side TypeScript project?

Running the sync-api process updates the client-side `api.ts` file by copying the latest server API definitions, overwriting existing files to ensure code analysis uses current interface definitions.

Why does frontend code analysis show errors after a backend API update?

Frontend code analysis shows errors after a backend API update because the client's `api.ts` file is outdated. Synchronizing the server-side API definitions to the client project resolves these inconsistencies.

What happens if there are errors during the API definition file synchronization?

If errors occur during API definition file synchronization, the process reports them directly to the user for manual intervention, ensuring file overwrite or path issues are handled without silent failures.

Can I automatically update client API files before a code analysis runs?

Yes, you can automatically update client API files before code analysis by running this synchronization process as a pre-analysis check, guaranteeing the latest server-side interface definitions are present.

Does the API synchronization process overwrite existing client-side TypeScript files?

Yes, the API synchronization process directly overwrites existing client-side TypeScript files by copying the `api.ts` file from the server path to ensure the local project reflects the latest backend changes.