---
name: catalog-filters
description: "Build a catalog with composable filters and reproducible URLs. Use for catalog, search, filters."
---

# Каталог и фильтры

Build a catalog with composable filters and reproducible URLs.

## Implementation decisions

1. Apply text/category/price predicates before sorting and pagination.
2. Store shareable filter choices in URLSearchParams and reset pagination on changes.
3. Show result count, active filters and a reset action.
4. Sort numeric prices numerically and never mutate the source catalog.

## Working source

Read [lib/commerce.ts](../webcraft-shared/source/lib/commerce.ts) when implementing this capability. The example belongs to the WEBCRAFT React/Three.js playground except the Python commerce starter, which runs without third-party dependencies. Use [shared catalog](../webcraft-shared/source/lib/catalog.ts) only to resolve related examples. Adapt the source to the target framework and preserve existing project conventions.

## Verify observable behavior

- Combined filters intersect correctly.
- Copied URLs reproduce results.
- Empty results offer a reset.

## Scope

Use only the parts relevant to the requested task. This skill does not grant permission to publish, spend money, change account access or expose secrets. The original brief and environment rules remain authoritative.

Live example: https://webcraft-skill-library.undrgrnd.chatgpt.site/demos/catalog

Version 2.0.0 · Original WEBCRAFT content · MIT
