add-dto
/add-dto
Dodaje DTO, czyli kształt żądania lub odpowiedzi wystawiany przez publiczne API narzędziom MCP, w api/public/dto, a typy wewnętrzne trzyma w contracts/.
- Autor
- artk0de ↗
- Repozytorium
- tearags-mcp ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 18.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 18.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
Dodaje DTO, czyli kształt żądania lub odpowiedzi wystawiany przez publiczne API narzędziom MCP, w api/public/dto, a typy wewnętrzne trzyma w contracts/.
Wyzwalacze z opisu
Oryginalny opis (EN)
Request/response shape exposed via public API to MCP tools, lives in api/public/dto. Triggers on "add DTO", "new request type for X tool", "add response shape", "новый DTO для tool'а". NOT for internal types — those live in contracts/, not public API surface.
Jak działa
- Step 1: Determine the domain
- Step 2: Define the DTO
- Step 3: Export from barrel
- Step 4: Backward compatibility
- Step 5: Verify
Podgląd SKILL.md
---
name: add-dto
description:
Request/response shape exposed via public API to MCP tools, lives in
api/public/dto. Triggers on "add DTO", "new request type for X tool", "add
response shape", "новый DTO для tool'а". NOT for internal types — those live
in contracts/, not public API surface.
---
# Add DTO to public/dto
Add request/response types for new or existing MCP endpoint.
## Step 1: Determine the domain
DTOs grouped by domain in `src/core/api/public/dto/`:
| Domain file | Contains |
| --------------- | ---------------------------------------------------------------------------- |
| `explore.ts` | Search request/response types (SemanticSearchRequest, ExploreResponse, etc.) |
| `ingest.ts` | Indexing types (IndexOptions, IndexStats, ChangeStats, etc.) |
| `collection.ts` | Collection CRUD types (CreateCollectionRequest, CollectionInfo) |
| `document.ts` | Document add/delete types (AddDocumentsRequest, DeleteDocumentsRequest) |
New DTO fits no existing domain → create `dto/<domain>.ts`, add re-export to
`dto/index.ts`.
## Step 2: Define the DTO
Add interface to appropriate domain file. Rules:
- **Request types** end with `Request` (e.g., `SemanticSearchRequest`)
- **Response types** specific (e.g., `ExploreResponse`, `CollectionInfo`) — no
generic `Response` suffix
- **Extend shared types** when applicable:
- `CollectionRef` — endpoints accepting `collection` or `path`
- `TypedFilterParams` — endpoints with trajectory filters
- **No logic** — DTOs pure data shapes (interfaces only, no classes)
- **Import only from** contracts/ types if needed (e.g., `RankingOverlay`)
## Step 3: Export from barrel
1. Add `export type` to `src/core/api/public/dto/index.ts`
2. Verify re-exported through `src/core/api/public/index.ts`
3. Verify re-exported through `src/core/api/index.ts`
Existing barrel patterns → new types in existing domain files auto re-exported
via `export type { ... } from "./explore.js"` etc. Add new lines only when
creating new domain file.
## Step 4: Backward compatibility
`contracts/types/app.ts` re-exports from this domain file → add new type to its
re-export list. Check:
```typescript
// src/core/contracts/types/app.ts
export type { ..., NewType } from "../../api/public/dto/<domain>.js";
```
## Step 5: Verify
```bash
npx tsc --noEmit
```
All imports of new DTO go through `core/api/index.js` barrel.
Wersje
W bazie nie ma innych skilli o nazwie add-dto.
Migawka bazy z 13.11.2026 · wersja paczki dcc820b27536 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 1 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95dto-sync-patterns
Opisuje wzorce synchronizacji DTO między frontendem a backendem: współdzielone typy, generowanie kodu i synchronizację walidacji. - 100dto-and-validation
Pomaga tworzyć DTO żądań i odpowiedzi w Symfony, stosować ograniczenia Validatora, mapować dane przez MapRequestPayload i MapQueryString oraz mapować DTO na encje i z powrotem. - 100laravel-dto
Tworzy obiekty DTO w Laravel i PHP z bazową klasą SimpleDto oraz mapowaniem atrybutów. - 95tl-sync
Sprawdza zgodność BE i FE dla zadania UC: kontrakty API, typy współdzielone, DTO i obsługę błędów po obu stronach. - 100dto-implementation
Opisuje zasady implementacji DTO w projekcie HMIS: konstruktory, zapytania JPQL, metody fasad, relacje null i raporty oparte na DTO. - 100dto-implementation
Opisuje zasady implementacji DTO w projekcie HMIS: konstruktory, zapytania JPQL, metody fasad, relacje null i raporty oparte na DTO.