Przejdź do treści
Biblioteka skilli
Programowanie · Nauka i wyjaśnianie

form-building

/form-building

Wyjaśnia, jak tworzyć i strukturyzować formularze, dodawać pola, modyfikować strukturę oraz stosować typy pól i ich schemat JSON.

Repozytorium
agent-native ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.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
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.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

Wyjaśnia, jak tworzyć i strukturyzować formularze, dodawać pola, modyfikować strukturę oraz stosować typy pól i ich schemat JSON.

Oryginalny opis (EN)

How to create and structure forms. Use when creating a new form, adding fields, modifying form structure, or understanding field types and their JSON schema.

Jak działa

  1. Creating a Form
  2. Field Types
  3. Field JSON Schema
  4. Updating a Form
  5. Common Form Templates
  6. Workflow
  7. Related Skills
Sekcje z nagłówków SKILL.md, w oryginale · 158 linii, 730 słów
Podgląd SKILL.md
---
name: form-building
description: >-
  How to create and structure forms. Use when creating a new form, adding
  fields, modifying form structure, or understanding field types and their
  JSON schema.
---

# Form Building

## Creating a Form

Use the `create-form` script to create forms from natural language:

```bash
pnpm action create-form --title "Contact Form" --fields '[...]'
```

The script generates a unique ID, creates a URL slug, and stores the form in SQL as `draft` status.

### One request, one form

Every form the user describes is its own form. Use `create-form` for each new
form request even when a form is already open on screen or you created one
earlier in the same conversation — the open form is context, not a default
target. Reach for `update-form` / `patch-form-fields` only when the user is
changing that specific form.

| The user says | Call |
| --- | --- |
| "Create a customer feedback form..." | `create-form` |
| "Now build an event registration form..." | `create-form` (a second form) |
| "Add a phone field to it" | `patch-form-fields` |
| "Rename this form / publish it" | `update-form` |
| "Rewrite this form as a signup form" | `update-form` with `confirmReplaceFields: true` |

`update-form` rejects a `fields` replacement that drops most of the form's
existing questions with `unconfirmed_field_loss`. That error means the call was
about to overwrite a form the user still wants: create the new form instead,
unless they explicitly asked to rewrite this one in place.

## Field Types

| Type          | Description                    | Options needed | Example use           |
| ------------- | ------------------------------ | -------------- | --------------------- |
| `text`        | Single-line text input         | No             | Name, company         |
| `email`       | Email input with validation    | No             | Contact email         |
| `number`      | Numeric input                  | No             | Age, quantity         |
| `textarea`    | Multi-line text                | No             | Message, comments     |
| `select`      | Single-choice dropdown         | Yes            | Country, department   |
| `multiselect` | Multi-choice dropdown          | Yes            | Skills, interests     |
| `checkbox`    | Boolean toggle                 | No             | Consent, opt-in       |
| `radio`       | Single-choice radio buttons    | Yes            | Gender, preference    |
| `date`        | Date picker                    | No             | Birthday, deadline    |
| `rating`      | Star rating (1-5)              | No             | Satisfaction, quality |
| `scale`       | Numeric scale (e.g., 1-10)     | No             | NPS, likelihood       |
| `file`        | File upload                    | No             | Resume, attachment    |

## Field JSON Schema

Each field is a JSON object:

```json
{
  "id": "field_name",
  "type": "text",
  "label": "Your Name",
  "placeholder": "Enter your name",
  "description": "Help text shown below the field",
  "required": true,
  "options": ["Option A", "Option B"],
  "validation": {
    "min": 1,
    "max": 100,
    "pattern": "^[a-zA-Z]+$",
    "message": "Custom error message"
  },
  "conditional": {
    "fieldId": "other_field_id",
    "operator": "equals",
    "value": "show_this_field"
  },
  "width": "full"
}
```

### Required properties
- `id` — unique identifier (snake_case recommended)
- `type` — one of the types above
- `label` — display label
- `required` — boolean

Always pass fields as these complete objects. Never encode a field as shorthand
text such as `text: Enter a name`; `patch-form-fields` upserts also require the
field `id` so they cannot be ambiguous.

### Optional properties
- `placeholder` — input placeholder text
- `description` — help text below the field
- `options` — array of strings (required for select, multiselect, radio)
- `validation` — min/max/pattern/message for custom validation
- `conditional` — show field only when another field matches a condition
- `width` — `"full"` (default) or `"half"` for side-by-side layout
- `multiple`, `accept`, `maxSizeBytes`, `maxFiles` — file upload settings for `file` fields

## Updating a Form

Use `update-form` to modify any form property:

```bash
# Change title
pnpm action update-form --id <id> --title "New Title"

# Update fields
pnpm action update-form --id <id> --fields '[...]'

# Change status
pnpm action update-form --id <id> --status published
```

## Common Form Templates

When a user asks for a common form type, use these field patterns:

**Contact form:**
```json
[
  {"id":"name","type":"text","label":"Name","required":true},
  {"id":"email","type":"email","label":"Email","required":true},
  {"id":"message","type":"textarea","label":"Message","required":true}
]
```

**Survey/feedback:**
```json
[
  {"id":"rating","type":"rating","label":"Overall satisfaction","required":true},
  {"id":"recommend","type":"scale","label":"How likely to recommend? (1-10)","required":true},
  {"id":"feedback","type":"textarea","label":"Additional feedback","required":false}
]
```

**Registration/signup:**
```json
[
  {"id":"first_name","type":"text","label":"First Name","required":true,"width":"half"},
  {"id":"last_name","type":"text","label":"Last Name","required":true,"width":"half"},
  {"id":"email","type":"email","label":"Email","required":true},
  {"id":"role","type":"select","label":"Role","options":["Student","Professional","Other"],"required":true}
]
```

## Workflow

1. `create-form` with title and fields
2. Preview in the GUI (agent + user iterate)
3. `update-form --status published` to go live
4. Share the public URL: `/f/<slug>`

## Related Skills

- **form-responses** — Viewing and analyzing submitted data
- **form-publishing** — Form lifecycle (draft -> published -> closed)
- **scripts** — All form operations go through scripts

Wersje

W bazie nie ma innych skilli o nazwie form-building.

Migawka bazy z 13.11.2026 · wersja paczki 56eea949b080 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100pf-form-gen
    Generuje formularze PatternFly z walidacją, układem i dostępnością, przy budowie formularzy i dodawaniu pól.
  • 100react-hook-form
    Buduje i modyfikuje formularze z React Hook Form: widżety kontrolowane, walidacja schematem, formularze edycji z pobranymi danymi, pola warunkowe, kreatory wieloetapowe i tablice pól.
  • 100fec-form-handling
    Pomaga budować i przeglądać rozbudowane formularze z React Hook Form i schematami Zod: walidacja z typami, pola dynamiczne, przesyłanie plików, formularze wieloetapowe i wydajność.
  • 95react-hook-form-zod
    Buduje typowane formularze React z React Hook Form i walidacją Zod: schematy, tablice pól, formularze wieloetapowe oraz błędy resolvera i pól zagnieżdżonych.
  • 90webiny-form-model
    Buduje formularze w systemie FormModel Webiny: typy pól, renderery, układy, walidację Zod, reguły warunkowe i pola wyliczane.
  • 90fe-forms
    Buduje i przegląda formularze HTML, które działają natywnie: właściwe typy pól, walidację ograniczeniami i wysyłkę przez zdarzenie submit.

Uwagi i zgłoszenia

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