add-export
/add-export
Dodaje funkcję, klasę lub opcję do publicznego API biblioteki TypeScript, z kodami błędów, testami i sprawdzeniem użycia.
- Autor
- steamfield ↗
- Repozytorium
- stacks ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 08.11.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 08.11.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Dodaje funkcję, klasę lub opcję do publicznego API biblioteki TypeScript, z kodami błędów, testami i sprawdzeniem użycia.
Oryginalny opis (EN)
Add a function, class, type or option to this TypeScript library's public API end to end, with its error codes, tests, README entry and consumer check. Use when asked for a new export, a new option or a change to an exported signature.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 18 linii, 267 słów
Podgląd SKILL.md
---
name: add-export
description: Add a function, class, type or option to this TypeScript library's public API end to end, with its error codes, tests, README entry and consumer check. Use when asked for a new export, a new option or a change to an exported signature.
---
# Add an export
Follow `slugify`: `src/slugify.ts`, `src/options.ts`, `src/errors.ts`, `src/index.ts`, `tests/public-api.test.ts` and `tests/consumer/` are the model. Read `docs/guidance/typescript-library/library.md` first.
Before any code, write down: the name, its full signature with explicit types, each error code it can raise, and the release kind (patch, minor or major, from the table in the guidance). Ask before a change that is major: a removed or renamed export, a changed default, a new required parameter.
1. **Failing tests** beside the module (`src/<name>.test.ts`): a `test.each` table of inputs and exact outputs, then one of inputs and the `{ code, field }` each raises. Run them and watch them fail.
2. **Errors**: a new failure adds a code to `LibraryErrorCode` and its message to `messages` in `src/errors.ts`. Throw `new LibraryError(code, { field })`.
3. **Options**, if it takes any: an interface of optional `readonly` fields, frozen defaults and a runtime check of every field, as `resolveOptions` does.
4. **Code** in `src/<name>.ts` with explicit return types; private helpers in `src/internal/`. No `node:*`, `process` or `console`.
5. **Export** it by name from `src/index.ts` (types with `type`), and add it to the sorted list in `tests/public-api.test.ts`.
6. **Consumer**: call it in `tests/consumer/index.ts` with its types, and check a JavaScript misuse in `index.mjs` if it takes input.
7. **README**: its entry in the API section with an example, and any new rows in the options and error tables.
8. `bun run check`, then `stacks verify`. Read the new export in `dist/index.d.ts`. Name the release kind in your summary; never bump the version or publish.
Keep it thin: no options, overloads or aliases the request didn't ask for.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · steamfield/stacks | 96 | Apache-2.0 |
| cyanheads/mcp-ts-core | 100 | Apache-2.0 |
| steamfield/stacks | 96 | Apache-2.0 |
| steamfield/stacks | 96 | Apache-2.0 |
Migawka bazy z 13.11.2026 · wersja paczki cc0280174d60 (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
- 96add-public-item
Dodaje publiczny typ, funkcję, metodę lub wariant błędu do biblioteki Rust, z dokumentacją, doctestem i testami. - 96add-public-api
Dodaje publiczny typ, metodę lub błąd do biblioteki Java, z Javadoc, przykładem, testami i notatkami o API. - 100add-cli-option
Dodaje nową opcję CLI lub konfiguracji Remotion: tworzy AnyRemotionOption, rejestruje parsowanie, podpina settery i aktualizuje dokumentację. - 100docs-search
Wyszukuje funkcję, klasę lub API w wygenerowanej dokumentacji bazy kodu: sygnaturę, argumenty, parametry, typ zwracany i sposób użycia. - 100add-function
Prowadzi przez dodawanie nowych funkcji do biblioteki, w szczególności wrapperów API i funkcji pomocniczych. - 100adding-operations
Opisuje pełną recepturę dodawania lub rozszerzania operacji na kształtach geometrycznych w brepjs, np. wariantów fillet, draft i shell, eksportu funkcji Fns do publicznego API i metody wrappera shape().