Λογότυπο Api Design Impl

Api Design Impl

Κοινότητα
LuckyOneTwoThree
api-design-impl

Use when API code generation is needed. Generates runnable routes, controllers, services, middleware, and type code from api-design-spec OpenAPI specs and security policies. Built-in PRD alignment, frontend alignment, and code self-review. Keywords: generate API code, write endpoint code, generate routes, generate controller, generate service, API code generation.

Επισκόπηση

ΕκδότηςLuckyOneTwoThree
Αποθετήριοvibe-skill
Όνομα δεξιότηταςapi-design-impl
Αστέρια
34
Forks
8
Συνοδευτικά αρχεία
Μόνο οδηγίες
Άδεια χρήσηςMIT
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • Αυτοτελής

    Όλα όσα χρειάζεται το μοντέλο περιλαμβάνονται στις οδηγίες — χωρίς επιπλέον αρχεία για συγχρονισμό.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε από LuckyOneTwoThree στο GitHub. Διαβάστε το πηγαίο περιεχόμενο πριν εγκαταστήσετε τη δεξιότητα.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Api Design Impl στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/LuckyOneTwoThree/vibe-skill/tree/main/.codex/skills/api-design-impl
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Νέα δεξιότητα → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που διαβάζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LuckyOneTwoThree/vibe-skill.git /tmp/vibe-skill
mkdir -p .claude/skills
cp -r /tmp/vibe-skill/.codex/skills/api-design-impl .claude/skills/api-design-impl
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Api Design Impl σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Api Design Impl μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Api Design Impl δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλα κατά τη συνομιλία

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

API Code Implementation

Code Write Boundary

Follow Engineering Boundary Protocol or the equivalent relative path from this skill.

  1. Scan first: identify framework, package manager, module layout, ORM, migration tool, validation library, auth middleware, and test conventions before implementation.
  2. Target scope: declare exact files/directories to create or modify; generated code must stay inside the target module unless integration files are explicitly required.
  3. No overwrite: preserve existing business logic, routes, models, migrations, configs, and tests unless the user explicitly asks for replacement.
  4. Consistency checks: verify OpenAPI, controller/service signatures, DTO/schema validation, ER model, migrations, repositories, and auth rules are aligned.
  5. Migration safety: generated migrations must be additive by default; destructive data changes require explicit human confirmation.
  6. Implementation report: list created/modified files, skipped files, checks run, failed checks, and residual risks.

Core Principles

  1. Design as Specification: Strictly follow api-design-spec outputs, never modify interface contracts without authorization
  2. Clear Layering: Controllers only handle transformation, Services contain logic, Repositories access data
  3. Type Safety: API types and data models are converted through mappers, never directly referenced
  4. Built-in Security: Middleware automatically matched by security level, sensitive fields automatically masked
  5. Test Coverage: Every API endpoint has an integration test skeleton

Interaction Mode

AI->Human AI suggests, human approves

Input

Input ItemTypeRequiredSourceDescription
OpenAPI SpecificationYAMLYesoutput/backend-api-design/api-design-spec/openapi.yamlAPI contract definition
Security PolicyJSONYesoutput/backend-api-design/api-design-spec/security-policy.jsonSecurity levels and rate limiting rules
Authentication & Authorization SchemeJSONYesoutput/backend-api-design/api-design-spec/auth-scheme.jsonAuthentication and permission scheme
Compliance ChecklistJSONOoutput/backend-api-design/api-design-spec/compliance-checklist.jsonCompliance requirements
PRDmarkdownYesoutput/pm-design/design-prd/prd.mdFor PRD alignment check
PRD Structured DataJSONYesoutput/pm-design/design-prd/prd.jsonMachine-consumable PRD version for code generation alignment
Data ModelJSONYesoutput/backend-data-architecture/data-architecture-spec/er_model.jsonData entity and relationship definitions, API types converted through mappers with Model types
Data Layer Implementation ReportJSONYesoutput/backend-data-architecture/data-architecture-impl/impl-report.jsonData layer implementation report, containing Repository list and method signatures, for Service to call real implementations
Frontend Page Data RequirementsJSONOoutput/ui-frontend/page-builder/pages.jsonFor frontend alignment check
Tech Stack DecisionJSONOoutput/backend-architecture/backend-architecture-spec/tech_stack_decision.jsonUnified tech stack, determines API framework and middleware style
project_dirstringYesUser providedProject root directory absolute path
tech_stackstringOUser providedFallback when tech_stack_decision.json is not available

Execution Steps

Step 1: Code Skeleton Generation [Core]

Generate project API layer code skeleton based on OpenAPI specification:

Generated ContentPathDescription
Route Definitionssrc/routes/One route file per resource, including CRUD endpoints
Route Registration Entrysrc/routes/index.tsUnified route registration entry for backend-architecture's app.ts mounting
Controllerssrc/controllers/One controller per resource, responsible for request/response transformation and parameter validation
Request Validationsrc/validators/Request parameter validation based on OpenAPI schema
API Type Definitionssrc/types/api.tsAPI request/response TypeScript types (aligned with OpenAPI), defining API layer transport structures only
Type Mapping Layersrc/types/mappers.tsAPI type<->Model type conversion functions complete implementation (Model types already generated by data-architecture-impl, complete conversion logic generated here based on er_model.json and OpenAPI specification)

Stage Gate: Code compiles (npm run build or tsc --noEmit passes), routes correspond one-to-one with OpenAPI specification

Step 2: Service Business Logic Implementation [Core]

Generate a Service for each resource, including complete business logic:

Generated ContentPathDescription
Servicessrc/services/resource/One service per resource, including resource-level business logic (CRUD), transaction management, cache calls

Service Method Structure: Parameter validation->Permission check->Business processing->Data persistence->Cache update->Response assembly

Code Quality Requirements:

  • Controller methods only handle request/response transformation + parameter validation, no business logic
  • Service methods include complete business logic + error handling + transaction management + JSDoc comments
  • Services access data through existing Repository+CacheRepository (Repository methods obtained from impl-report.json), code is compilable and runnable

Stage Gate: Every API endpoint has a corresponding Service method, Controller->Service->Repository call chain is complete, all Repository calls reference implemented methods

Step 3: Middleware and Security Implementation [Core]

Generate middleware based on security policy and authentication scheme:

Generated ContentPathDescription
Middlewaresrc/middleware/Authentication, rate limiting, CORS, error handling middleware

Implementation Requirements:

  • Middleware automatically matches authentication strategy by security level (L1-L4)
  • Rate limiting rules directly written into middleware configuration
  • Unified error response format consistent with OpenAPI error code system

Stage Gate: L1-L4 middleware matching is correct, rate limiting rules are consistent with security policy

Step 4: Alignment Check and Code Self-Review [Core]

PRD Alignment Check:

  • Check each PRD feature point one by one, ensuring every feature point has a corresponding API endpoint
  • If frontend page data requirements input exists, check each page one by one to ensure API covers all frontend data fetching needs
  • Uncovered feature points are marked as TODO and supplementary suggestions are generated

Frontend Alignment Check:

  • If frontend page data requirements exist, verify each page's data fetching has a corresponding API
  • API response fields match frontend page display requirements
  • Missing API endpoints are automatically supplemented

Code Self-Review:

  • Check generated code for compliance with security policy (L1-L4 middleware matching, sensitive field masking)
  • Check Controller->Service->Repository call chain completeness
  • Check API type consistency with OpenAPI specification
  • Check for SQL injection, XSS, and other security vulnerabilities
  • Auto-fix discovered issues, P0 issues block output

Stage Gate: PRD feature points 100% have API coverage, frontend data requirements 100% have API correspondence, code self-review P0 issues=0

Step 5: API Test Code Generation [Core]

Generate integration test skeletons for each API endpoint:

  • Test coverage: Normal flow, parameter validation failure, permission denied, resource not found
  • Test files output to src/tests/routes/

Stage Gate: Every API endpoint has an integration test skeleton

Output

Adopts dual output mode:

  1. Code Files -> Directly written to user-specified {project_dir}/src/ project directory
  2. Metadata Files -> Written to output/ directory for downstream Skill consumption

Code File Output: {project_dir}/src/ (routes, controllers, services, middleware, type definitions, tests directly written to project directory)

Metadata Output: output/backend-api-design/api-design-impl/

Metadata Output Files:

  • impl-report.json -- Code implementation report (generated file list + alignment check results + self-review results)

impl-report.json Schema:

json
{
  "type": "object",
  "required": ["skill_name", "version", "generated_files", "alignment_check", "self_audit"],
  "properties": {
    "skill_name": { "type": "string" },
    "version": { "type": "string" },
    "generated_files": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["path", "type", "description"],
        "properties": {
          "path": { "type": "string" },
          "type": { "type": "string", "enum": ["route", "controller", "service", "validator", "middleware", "type", "mapper", "test"] },
          "description": { "type": "string" }
        }
      }
    },
    "alignment_check": {
      "type": "object",
      "required": ["prd_alignment", "frontend_alignment", "security_alignment", "repository_call_chain"],
      "properties": {
        "prd_alignment": { "type": "object", "properties": { "passed": { "type": "boolean" }, "uncovered_features": { "type": "array", "items": { "type": "string" } } } },
        "frontend_alignment": { "type": "object", "properties": { "passed": { "type": "boolean" }, "uncovered_pages": { "type": "array", "items": { "type": "string" } } } },
        "security_alignment": { "type": "object", "properties": { "passed": { "type": "boolean" }, "issues": { "type": "array", "items": { "type": "object", "properties": { "severity": { "type": "string" }, "message": { "type": "string" } } } } } },
        "repository_call_chain": { "type": "object", "properties": { "passed": { "type": "boolean" }, "missing_repository_methods": { "type": "array", "items": { "type": "object", "properties": { "service": { "type": "string" }, "method": { "type": "string" }, "repository": { "type": "string" } } } } } }
      }
    },
    "self_audit": {
      "type": "object",
      "required": ["p0_count", "p1_count", "passed", "items"],
      "properties": {
        "p0_count": { "type": "integer" },
        "p1_count": { "type": "integer" },
        "passed": { "type": "boolean" },
        "items": { "type": "array", "items": { "type": "object", "properties": { "severity": { "type": "string" }, "check": { "type": "string" }, "result": { "type": "string" }, "detail": { "type": "string" } } } }
      }
    }
  }
}

Decision Rules

ConditionDecision
OpenAPI specification inconsistent with PRDFollow PRD, correct OpenAPI specification, mark differences for human confirmation
Security policy conflicts with code implementationFollow security policy, adjust code implementation
Frontend data requirements missing APIAutomatically supplement API endpoints, mark as "frontend-driven addition"
Code self-review finds P0 issuesBlock output, auto-fix then re-review
Data model missingCannot generate mappers, error and block
Data layer implementation report missingCannot call real Repository, mark which Service methods are skeletons, note pending data-architecture-impl completion for full implementation
Tech stack decision conflicts with user specificationPrefer tech_stack_decision.json (architecture design output), then tech_stack parameter (user direct input), default to Express+TypeScript. Mark conflicts for human confirmation

Quality Checks

  • Code compiles (npm run build or tsc --noEmit passes)
  • Routes correspond one-to-one with OpenAPI specification
  • Controllers only handle request/response transformation, no business logic
  • Services include complete business logic + error handling + transaction management
  • Middleware correctly matched by security level
  • mappers.ts API<->Model type conversion complete implementation (not skeleton)
  • Repository methods called by Service exist in impl-report.json
  • PRD feature points 100% have API endpoint coverage
  • Frontend page data requirements 100% have API correspondence (when frontend input exists)
  • Code self-review P0 issues=0
  • Every API endpoint has an integration test skeleton

Degradation Strategy

Missing Upstream InputDegradation PlanOutput Impact
Data model missingCannot generate mappers, error and blockCannot generate API code
Data layer implementation report missingService calls Repository with skeleton code, mark "pending data-architecture-impl completion for supplement"Service cannot be fully implemented, code cannot compile
Tech stack decision missingUse tech_stack parameter (user provided), default to Express+TypeScript if absentCode style may not match
Security policy missingDefault L2 authentication levelMiddleware may not meet security requirements
Authentication scheme missingDefault JWT+RBACAuthentication scheme may not match business needs
PRD missingGenerate code based on OpenAPI specification onlyCannot perform PRD alignment check
Frontend page data requirements missingGenerate code based on OpenAPI specification onlyCannot perform frontend alignment check

Upstream Change Response

Upstream ChangeImpact ScopeResponse Strategy
OpenAPI specification changeRoutes+Controllers+Services+TypesMark affected code files, assess modification scope
Data model changemappers.ts + API typesUpdate API<->Model type conversion logic
Data layer implementation changeRepository calls in ServiceUpdate Repository method calls, supplement new query methods as needed
Security policy changeMiddleware configurationUpdate middleware matching rules
Authentication scheme changeMiddleware+Service permission checksUpdate authentication and permission logic
Tech stack decision changeTech stack related configurationUpdate framework and middleware configuration
Change TypeImpact ScopeNotification Method
Route changebackend-architecture-impl (app.ts route mounting)Mark affected route registrations, update impl-report.json
Service interface changebackend-architecture-impl (coordinator layer)Mark affected cross-resource coordination logic, update impl-report.json
Middleware configuration changebackend-architecture-impl (app.ts middleware registration)Mark affected middleware registrations, update impl-report.json

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI Api Design Impl;

Use when API code generation is needed. Generates runnable routes, controllers, services, middleware, and type code from api-design-spec OpenAPI specs and security policies. Built-in PRD alignment, frontend alignment, and code self-review. Keywords: generate API code, write endpoint code, generate routes, generate controller, generate service, API code generation.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Api Design Impl στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Api Design Impl είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη Api Design Impl στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε το https://github.com/LuckyOneTwoThree/vibe-skill/tree/main/.codex/skills/api-design-impl. Το TypingMind διαβάζει το αρχείο SKILL.md και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Api Design Impl;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη Api Design Impl;

Με όσα θέλετε. Εφόσον ένα μοντέλο υποστηρίζει δεξιότητες, μπορείτε να χρησιμοποιήσετε τη Api Design Impl με αυτό — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama και άλλα — όλα στο TypingMind με τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Api Design Impl;

Ναι. Δημοσιεύεται στο GitHub από τον χρήστη LuckyOneTwoThree με την άδεια χρήσης MIT. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇