Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

uniform-forms

/uniform-forms

Dodaje formularze (kontaktowy, zapisu, newslettera, leadowy, ankietę) do projektu Uniform, w tym definicje pól komponentów i generyczny endpoint przyjmowania zgłoszeń.

Repozytorium
agent-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
08.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
3
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 08.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Dodaje formularze (kontaktowy, zapisu, newslettera, leadowy, ankietę) do projektu Uniform, w tym definicje pól komponentów i generyczny endpoint przyjmowania zgłoszeń.

Oryginalny opis (EN)

Use when adding a form (like contact, signup, newsletter, lead-capture or survey) to a Uniform project, when creating form field component definitions or building a generic form submission endpoint. Do not use when embedding an iframe for an external form provider.

Jak działa

  1. Architecture
  2. Author-set Field name and identifier
  3. Form Submit or Fields should self-register
  4. Options are a slot, not a $block parameter
  5. Restrict every slot explicitly
  6. Always validate on the server
  7. Keep track of the form submit state
  8. Build order
  9. Payload contract
  10. References
Sekcje z nagłówków SKILL.md, w oryginale · 61 linii, 559 słów
Podgląd SKILL.md
---
name: uniform-forms
description: >-
  Use when adding a form (like contact, signup, newsletter, lead-capture or survey) to a
  Uniform project, when creating form field component definitions or building a generic form submission endpoint.
  Do not use when embedding an iframe for an external form provider.
license: MIT
metadata:
  author: uniformdev
  version: "1.0.0"
---

# Uniform forms

A form in Uniform is not a special entity — it is a **composition of components**. A `Form` container component renders the `<form>` element and owns the resulting submit action; each input is its own component placed in the container's slot. Authors assemble forms in Uniform's visual editor; developers own the markup, state, and submission.

## Architecture

```
form                       container: renders <form>, owns state, submits
├── slot: formFields       formTextField, formTextAreaField, formSelectField,
│                          formCheckboxField, formRadioField (+ $personalization, $test)
└── slot: formButtons      formButton (min 1) (+ $personalization, $test)

formSelectField / formRadioField
└── slot: options          formSelectOption, formRadioOption (+ $personalization, $test)
```

Field components **self-register** with that context on mount and read/write their own value through it. The container never inspects its slot contents.

## Author-set Field name and identifier

**Every field must have a stable, author-set identifier.** The `name` parameter is required on every field component. Slugify it to get the identifier used for the HTML `name`/`id`, and the payload key. **Never fall back to a generated identifier, warn in the Uniform's visual editor when a field is missing an identifier**.

## Form Submit or Fields should self-register

**Do not introspect slots.** Do not walk `component.slots.formFields` to build fields. That code can easily miss fields nested inside `$personalization` or `$test` wrappers, and duplicates the slot's structure in two places. Use the form submit event to gather the data or self-register each field based on the component's nested context.

## Options are a slot, not a `$block` parameter

Dropdown and radio options are components in an `options` slot. This is good practice for these components as it allows them to be personalized, be A/B tested, or support visibility conditions. Do not use blocks or a `$block` parameter as **it cannot be created or edited via MCP or AI**, so a block-based model cannot be built or maintained by an agent.

## Restrict every slot explicitly

**Never set `allowAllComponents: true`.** List the field components, and add `$personalization` and `$test` to `formFields` so individual fields can be optimized.

## Always validate on the server

Client-side validation, `required`, `minlength`, `maxlength`, `pattern` and other built-in form input parameters drive the HTML validation UX only. Re-check every required field in the API route.

## Keep track of the form submit state

Track `idle | submitting | success | error`. Disable the submit button while submitting and render the result in the page with `aria-live`. Never use `alert()` or `confirm()`.

## Build order

1. **Model the components** in Uniform — `form` first, then fields, then `formButton`, then `formSelectOption`. See [modeling.md](references/modeling.md).
2. **Build a single API route** to receive submissions according to the payload contract. See [submission.md](references/submission.md).
3. **Build the form submission logic** to send submissions according to the payload contract.
5. **Build all components** in the current tech stack and ensure the `<form>` submit event triggers the form submission logic.
6. **Assemble a form in Uniform's visual editor** and submit it to confirm the payload keys match the authored field names.

## Payload contract

The container POSTs this to `/api/forms/submit` which expects the payload contract defined in [submission.md](references/submission.md).
The generic nature of the payload means that it is important to have some mitigation for potential spam or malicious requests.

## References

- [Modeling](references/modeling.md) — component definitions for the form with parameter tables and slot restrictions
- [Submission](references/submission.md) — the API route, payload contract and server-side validation
Pliki w paczce (3)
  • SKILL.md 4 KB
  • references/modeling.md 8 KB
  • references/submission.md 3 KB

Wersje

W bazie nie ma innych skilli o nazwie uniform-forms.

Migawka bazy z 13.11.2026 · wersja paczki 3ca7016e1ddd (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

  • 85newsletter-signup-generator
    Projektuje, optymalizuje i audytuje formularze zapisu do newslettera oraz bonusy zachęcające do zapisu.
  • 90uniform-sdk
    Opisuje SDK Uniform: uwierzytelnianie, konfigurację CLI, routing oraz klienty API do odczytu i zapisu kompozycji, wpisów i typów treści, takie jak EntryManagementClient i CompositionManagementClient.
  • 90uniform-automations
    Obsługuje automatyzacje Uniform (defineAutomation, defineScoutAutomation, ScoutClient): zdarzenia treści, harmonogramy, webhooki, aiTool, zadania etapów workflow Scout i synchronizację z systemami zewnętrznymi.
  • 100netlify-forms
    Obsługuje formularze na stronach Netlify: zapisuje zgłoszenia, filtruje spam i wysyła powiadomienia.
  • 90form-cro
    Optymalizuje formularze inne niż rejestracja: kontaktowe, zgłoszenia demo, ankiety i formularze zamówienia, by więcej osób je wypełniało.
  • 90form-cro
    Optymalizuje formularze inne niż rejestracja, np. do pozyskiwania leadów, kontaktowe, zgłoszeniowe, ankiety i formularze kasy, pod kątem tarcia, liczby pól i współczynnika ukończenia.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.