context-api-contracts
前端-后端API合约、路由、客户端和类型定义。处理API端点定义、请求/响应类型、路由配置和跨栈集成。用于处理API端点、请求/响应类型、路由定义或前端-后端集成,或当用户提及API设计、添加端点、类型不匹配、API合约、REST端点、客户端集成、“404未找到”错误、API调用中的“类型错误”或路由配置问题。
📖 中文导读:前端-后端API合约、路由、客户端和类型定义。处理API端点定义、请求/响应类型、路由配置和跨栈集成。用于处理API端点、请求/响应类型、路由定义或前端-后端集成,或当用户提及API设计、添加端点、类型不匹配、API合约、REST端点、客户端集成、“404未找到”错误、API调用中的“类型错误”或路由配置问题。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: context-api-contracts description: | Frontend-backend API contracts, routes, clients, and type definitions. Handles API endpoint definitions, request/response types, route configuration, and cross-stack integration. Use when working with API endpoints, request/response types, route definitions, or frontend-backend integration, or when user mentions API design, adding endpoints, type mismatches, API contracts, REST endpoints, client integration, "404 Not Found" errors, "Type error" in API calls, or route configuration issues. tags: [api, contracts, integration, cross-stack]
API Contracts
Navigate frontend-backend API integration, routes, clients, and data flow.
Overview
API contracts define frontend ↔ backend communication. Critical for cross-stack changes.
Backend API Routes
backend/api/*.py- API v1 endpointsbackend/api/v2/*.py- API v2 endpointsbackend/api/analytics_api.pybackend/api/brokerage_connections.pybackend/api/accounts.pybackend/api/securities.py
Frontend API Clients
frontend/src/services/analyticsApi.tsfrontend/src/services/researchApi.tsfrontend/src/lib/apiClient.ts- Base API client
TypeScript Contracts
supabase/types/database.types.ts- Database typesfrontend/src/types/**/*.ts- Frontend types
Backend Middleware
backend/middleware/*.py- Auth, CORS, etc.
Tests
backend/tests/integration/- API integration testsfrontend/e2e/- E2E API tests
Documentation
- Internal:
docs/backend/API_CONTRACTS.md(create if needed)
Related Areas
- See
context-clerk-integrationfor auth middleware - See
context-testing-infrastructurefor API test patterns