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

ucp-loyalty

/ucp-loyalty

Wdraża rozszerzenie UCP Loyalty: członkostwa, poziomy, korzyści i nagrody w katalogu, koszyku i checkout, z przestrzeniami nazw programów, claimami context.eligibility i członkostwem tymczasowym lub zweryfikowanym.

Licencja
MIT
Ostatnia zmiana repozytorium
14.09.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
1
Przestarzałość

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

Wdraża rozszerzenie UCP Loyalty: członkostwa, poziomy, korzyści i nagrody w katalogu, koszyku i checkout, z przestrzeniami nazw programów, claimami context.eligibility i członkostwem tymczasowym lub zweryfikowanym.

Oryginalny opis (EN)

Implement the UCP Loyalty extension — memberships, tiers, benefits, and rewards surfaced across catalog, cart, and checkout, with reverse-DNS program namespaces, `context.eligibility` claims, and provisional vs verified membership. Use when adding member pricing, tier recognition, or rewards forecasting to a UCP flow.

Jak działa

  1. Before writing code
  2. Conceptual Architecture
  3. Implementation Guidance
Sekcje z nagłówków SKILL.md, w oryginale · 56 linii, 467 słów
Podgląd SKILL.md
---
name: ucp-loyalty
description: Implement the UCP Loyalty extension — memberships, tiers, benefits, and rewards surfaced across catalog, cart, and checkout, with reverse-DNS program namespaces, `context.eligibility` claims, and provisional vs verified membership. Use when adding member pricing, tier recognition, or rewards forecasting to a UCP flow.
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch
---

# UCP Loyalty Extension

## Before writing code

**Fetch live spec**: Web-search `site:ucp.dev specification common extensions loyalty` and fetch the page for the exact eligibility claim shape, membership/tier schema, and current error codes.

## Conceptual Architecture

### Three use cases

Loyalty exists to serve three distinct things, and conflating them causes most design mistakes:

1. **Price-impacting benefits** — member discounts, member shipping. These flow through the **discount extension**, not through loyalty fields directly.
2. **Non-price benefits** — rewards tracking, dedicated support. Value that is real but does not move the total.
3. **Status recognition** — tier verification for display.

### The model

- **Memberships** — independent enrollment pathways within a brand, modeled as **separate sibling entries**. A "Rewards Club" and a "Co-branded Credit Card" are two memberships, not one membership with two facets.
- **Tiers** — achievement ranks within a membership. Members typically hold **one active tier per membership**, though parallel status dimensions allow multiple concurrent tiers.
- **Benefits** — perks tied to tier/membership status. Immediate-value (5% off) and delayed-value (priority support).
- **Rewards** — quantifiable value *earned* from a transaction. Distinct from redeemable balances, which are **payment instruments**, not loyalty fields.

That last distinction matters: points you *earn* are rewards; points you *spend* are a payment instrument and belong in the payment flow (see `ucp-split-payments`).

### Namespacing

Programs use **reverse-domain naming** — `com.example.loyalty`, `com.example.rewards.card` — to prevent collisions and establish provenance. The same reverse-domain key the platform submits is the key the business returns as the membership identifier.

### Claims and verification

The platform submits buyer claims via **`context.eligibility`** in requests. The business either verifies the claim or determines membership from authenticated identity.

Three outcomes:

| Outcome | Response |
|---------|----------|
| **Verified** | `provisional: false`, active `tiers` included, masked `display_id` set, price-impacting benefits applied via the discount extension |
| **Unverified** | `provisional: true`, **no** `display_id` |
| **Invalid** | error message with code `eligibility_invalid` |

**All accepted claims must be resolved at checkout completion.** A provisional membership cannot survive into a completed order — either it verifies or its benefits come off.

### Where it surfaces

Loyalty spans catalog, cart, and checkout. Monetary benefits appear in `totals` or `line_items` with loyalty attribution; reward forecasts include earning breakdowns linked to specific tier benefits.

## Implementation Guidance

- Never render a `display_id` for a provisional membership — that is exactly the field the spec withholds until verification, and showing an unverified one implies a status the buyer may not have.
- Apply price-impacting benefits through the discount extension so they reconcile with every other discount rather than becoming a parallel pricing path.
- Model each enrollment as its own membership entry, even when they share a brand.
- Treat `provisional: true` at completion time as a hard error path, not a warning.
- Reference implementation: https://github.com/Universal-Commerce-Protocol/samples

Wersje

W bazie nie ma innych skilli o nazwie ucp-loyalty.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

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

  • 90ucp-discount
    Implementuje rozszerzenie UCP Discount: stosowanie i walidację kodów rabatowych, śledzenie alokacji i obsługę błędów w checkout UCP.
  • 100ucp-cart
    Wdraża możliwość UCP Cart (dev.ucp.shopping.cart): lekki CRUD do zbierania pozycji przed zakupem i konwersję koszyka w sesję Checkout przez REST, MCP lub Embedded.
  • 90agentic-surface
    Buduje, bada i audytuje maszynowo czytelną powierzchnię sklepu: profil UCP, endpointy MCP koszyka, checkoutu i katalogu, kwalifikację katalogu agentowego i tożsamość agenta.
  • 100loyalty-vip-program-designer
    Projektuje lub ocenia program lojalnościowy z punktami i poziomami VIP na podstawie zamówień ze sklepu i sprawdza, czy nagrody się zwrócą.
  • 100ucp-assets
    Zarządza zasobami projektu Unity z terminala: wyszukuje i przenosi assety, edytuje materiały i sprawdza referencje.
  • 86loyalty-modeling
    Modeluje ekonomię, poziomy i prognozy wpływu programów lojalnościowych.

Uwagi i zgłoszenia

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