api-generator
/api-generator
Generuje kod frontendu do integracji z API zgodnie z konwencjami projektu: żądania ze specyfikacji backendu, typy i handlery z danych mock, endpointy z typami, mockami i testami.
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Generuje kod frontendu do integracji z API zgodnie z konwencjami projektu: żądania ze specyfikacji backendu, typy i handlery z danych mock, endpointy z typami, mockami i testami.
Oryginalny opis (EN)
Autonomous Frontend Code Generation Agent specialized in project-aware API integration. Use when user provides backend API specs needing frontend request code, mock data to convert to request types and handlers, API endpoints to add with types mocks and tests, or new API integration following existing project conventions. Automatically detects TypeScript, request patterns, mock infrastructure, and test frameworks to generate artifact-gated code.
Jak działa
- Core Principles
- Phase 1: Project Recon (MANDATORY)
- Phase 2: Plan Mode (MANDATORY)
- Phase 3: Execution (ONLY AFTER USER APPROVAL)
- Interview Mode (MANDATORY WHEN UNCERTAIN)
- Safety Rules
- User Input Format (Expected)
- Output Style
- Goal
Podgląd SKILL.md
--- name: api-generator description: Autonomous Frontend Code Generation Agent specialized in project-aware API integration. Use when user provides backend API specs needing frontend request code, mock data to convert to request types and handlers, API endpoints to add with types mocks and tests, or new API integration following existing project conventions. Automatically detects TypeScript, request patterns, mock infrastructure, and test frameworks to generate artifact-gated code. --- # Frontend API Generator ## Core Principles 1. **Recon → Plan → Execute** - Always analyze repository before generating code 2. **Incremental changes only** - Never destructive refactors 3. **Generate only supported infrastructure** - Match existing project patterns 4. **Ask when uncertain** - Use Interview Mode for ambiguity 5. **User must approve plan** - No execution without confirmation ## Phase 1: Project Recon (MANDATORY) Before generating any code, analyze the repository to determine project architecture. ### A. Language & Type System - Detect if project is TypeScript or JavaScript - Detect existing type systems: - TypeScript interfaces/types - zod / io-ts / yup schemas - openapi generated types - Output: `typed = on | partial | off` ### B. Request Layer Pattern Identify request strategy: - axios / fetch / umi-request / apollo / react-query / swr / custom client - Check for custom wrappers (e.g. request.ts, apiClient.ts) - Determine if APIs are functions, hooks, or SDK client methods - Output: `request_style = function | hook | sdk | mixed` ### C. Mock Infrastructure Detect if mock exists: - msw - vite-plugin-mock - mockjs - custom mock server - folder structure and patterns - Output: `mock = on | off`, `mock_style = ...` ### D. Test Infrastructure Detect if tests exist: - jest / vitest / testing-library / cypress / playwright - existing test folders and naming patterns - Output: `test = on | off`, `test_style = unit | integration | e2e` ## Phase 2: Plan Mode (MANDATORY) You MUST output a PLAN before writing any code. ### Plan Structure (STRICT FORMAT) #### 1. Project Recon Summary Summarize detected conventions and key files. #### 2. Artifacts to Generate (Capability-Gated) List which of the following will be generated: - Request function - Types (only if typed != off) - Mock handlers (only if mock = on) - Tests (only if test = on) #### 3. File Change List Explicitly list files to be created/modified and their purpose. #### 4. Incremental Merge Strategy Explain how you will avoid breaking existing code. Rules: - Do NOT rewrite existing APIs - Only append fields, exports, handlers, fixtures - Do NOT reorganize directories - Do NOT change naming conventions #### 5. Uncertainties & Questions List ambiguous points and ask the user to clarify: - baseURL / prefix - response envelope structure - mock scenarios - test type preference #### 6. Validation Steps Explain how user can verify locally. ## Phase 3: Execution (ONLY AFTER USER APPROVAL) After the user confirms the plan: ### A. Generate Request Code Follow detected project patterns exactly. ### B. Generate Types (if typed = on) - Follow existing naming conventions - Prefer schema → type inference if project uses schema libs - Otherwise generate interfaces/types ### C. Generate Mock Data (if mock = on) - Follow existing mock structure and routing patterns - Add fixtures if project uses fixtures - Include success/error/empty if user provided ### D. Generate Tests (if test = on) - Follow existing test framework and folder structure - Prefer integration tests if mock infra exists - Reuse mock fixtures for assertions - Avoid network calls unless project already does so ## Interview Mode (MANDATORY WHEN UNCERTAIN) If any ambiguity exists: - Ask targeted questions - Do NOT generate code Example ambiguity triggers: - Multiple request wrappers - Multiple mock frameworks - Mixed TS/JS usage - Multiple API folders - Unknown API response envelope ## Safety Rules - Never refactor unrelated code - Never move files without explicit approval - Never delete existing code - Prefer additive changes only - Explain all modifications ## User Input Format (Expected) User will provide: - Endpoint method + path - Params/body schema - Response schema or example JSON - Mock examples (optional) - Whether this is new or existing endpoint - Optional module/domain name ## Output Style - Use structured markdown sections - Always start with PLAN unless explicitly told to execute - Be concise but precise - Include file paths and code snippets in execution phase ## Goal Minimize frontend engineer manual work while fully respecting repository architecture and conventions.
Wersje
W bazie nie ma innych skilli o nazwie api-generator.
Migawka bazy z 13.11.2026 · wersja paczki 5c07ac96ffe2 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100backend-test
Generuje testy backendu (jednostkowe, integracyjne, z mockami) dla istniejącego kodu. - 100api-mock-generator
Prawdopodobnie generuje atrapy API i uruchamia się automatycznie na frazy związane z generatorem mocków w kategorii rozwoju API. - 100integration-test-generator
Generuje testy integracyjne w ramach integracji API, przy pisaniu lub uruchamianiu testów. - 85API Node Generator
Generuje węzły automatyzacji z dokumentacji API: modele Pydantic, węzły backendu, schematy frontendu i testy. - 100api-generating
Generuje kod i dokumentację endpointów API ze specyfikacji: nowe endpointy, handlery tras, szkielety REST API i specyfikacje OpenAPI lub Swagger z kodu. - 95api-integration-builder
Generuje gotowe do produkcji klienty API z typami TypeScript, ponawianiem, rate limitingiem, uwierzytelnianiem (OAuth, klucze API), obsługą błędów i odpowiedziami mock.