secure-fetch
Complete guide to creating or updating type-safe server/client HTTP requests using the @finstreet/secure-fetch library. Use whenever creating or modifying backend requests. Supports interactive endpoint discovery — pass a search keyword and repo to browse available endpoints, configure each one, and implement them all.
What this skill does
# @finstreet/secure-fetch — Complete Guide
The `@finstreet/secure-fetch` library provides a fully type-safe approach to backend requests using Zod for schema validation of payloads, path variables, and responses.
## Path Resolution
Before creating any files, invoke the `finstreet-fe:path-resolver` skill with your input parameters (featureName, featureType, product, role) to resolve the correct paths. Use the returned **Feature Path** with `/backend` appended as `{featurePath}` in the file structure below.
## File Structure
Every feature's backend integration lives in exactly three files:
```
{featurePath}/
├── schema.ts ← all Zod schemas and exported types
├── server.ts ← server-side request functions (default)
└── client.ts ← client-side request functions (only when needed)
```
NEVER create additional files or directories. If these files already exist, update them.
## Interactive Discovery Workflow
When the user provides a **search keyword** (e.g. "inquiries") and a **repo** (e.g. `eco-scale-bfw` or `eco-scale-cb`), follow this interactive flow:
### Step 1 — Search for endpoints
Call the `search-swagger-documentation` MCP tool with the user's keyword and repo. Present the returned endpoints as a numbered list so the user can see what's available.
### Step 2 — Confirm endpoint selection
Ask the user which endpoints to implement. They might say "all of them", pick specific numbers, or exclude some. Keep asking until they're satisfied with the selection.
### Step 3 — Configure each endpoint
For each selected endpoint, ask the user:
1. **Protected?** (default: `true`) — whether the request requires authentication
2. **Server or client?** (default: `server`) — server.ts for SSR/actions, client.ts for polling/dynamic client-side calls
3. **Result schema needed?** (default: `yes` for GET, `no` for non-GET) — whether to generate a result schema
Present these as a table or list with defaults so the user can confirm quickly (e.g. "All look good" or "Change endpoint 3 to client").
### Step 4 — Fetch full documentation and implement
For each confirmed endpoint, call the `get-swagger-documentation` MCP tool with the repo and the specific path to get the full Swagger details. Then implement following the steps below:
1. Check the existing `schema.ts` for reusable schemas
2. Build the required schemas in `schema.ts`
3. Build the endpoint config and service export in the appropriate file (`server.ts` or `client.ts`)
### Direct usage
If the user already provides all the details upfront (repo, path, protected, server/client), skip the interactive flow and go straight to implementation.
## Key Imports
```typescript
// schema.ts
import * as z from "@/lib/zod"; // or from "zod"
// server.ts
import { EndpointConfig } from "@finstreet/secure-fetch";
import { createServerFetchFunction } from "@/shared/backend/createServerFetchFunction";
import { createPaginatedServerFetchFunction } from "@/shared/backend/createServerFetchFunction";
// client.ts
import { EndpointConfig } from "@finstreet/secure-fetch";
import { createClientFetchFunction } from "@/shared/backend/createClientFetchFunction";
```
## Step-by-Step Reference
- For **building schemas** (pathVariables, result, payload, paginated), see [schema.md](schema.md)
- For **building endpoint configs** and service exports (server/client, paginated), see [endpoint-config.md](endpoint-config.md)
## Rules
1. The user MUST specify which repo to use (e.g. `eco-scale-bfw`, `eco-scale-cb`). If not provided, ask.
2. ALWAYS convert `snake_case` to `camelCase` in schemas AND in path templates
3. `protected: true` unless the user explicitly chooses otherwise during configuration
4. Only add a `resultSchema` for GET requests (or if explicitly required)
5. Only add a `payloadSchema` for non-GET requests
6. Use `server.ts` by default; only use `client.ts` for polling or dynamic client-side requests
7. Do NOT run any `tsc` or `pnpm` commands after implementation
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.