لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI

Feature-Sliced Design for frontends

آزاد تازه‌وارد تاییدشده امن

دستورالعمل اجرایی آماده برای انجام دقیق کارهای طراحی رابط کاربری بدون تکرار پرامپت‌های طولانی. (شامل ۳ گام عملی · سازگار با Claude Code و OpenAI Codex).

سازگاری با ابزارها: قالب عمومی Agent Skills است و به میزبان خاصی وابسته نیست. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: architect-frontend-fsd
description: Explain Feature-Sliced Design (FSD) for frontends, including layers, slices, segments, public APIs, and dependency boundaries.
metadata:
  language: en
  translation_of: architect-frontend-fsd-cn
  version: "0.1.0"
---

# Feature-Sliced Design for frontends

Based on the official Feature-Sliced Design specification.

FSD groups code into layers by responsibility, slices by their meaning to the product, and segments by purpose. Slices keep related changes together. Public APIs give consumers a stable entry point.

## Architecture shape

```text
<source root>/
  app/routes/
  pages/product-details/{ui,api}/
  widgets/product-gallery/ui/
  features/add-to-cart/{ui,model}/
  entities/product/{model,ui}/
  shared/{ui,api}/
```

| Layer | Responsibility |
|---|---|
| `app` | Entry points, routing, global styles, and dependency wiring. |
| `pages` | Full screens or major route content, including page-specific UI, state, and requests. |
| `widgets` | Self-contained UI blocks reused across pages or serving as independent regions within a page. |
| `features` | Reusable user actions with business value, such as adding an item to a cart. |
| `entities` | Business entities and their models, data access, or UI representations, such as products. |
| `shared` | General UI components, API clients, configuration, and libraries. |

`app` and `shared` contain segments directly. The other layers contain slices, which contain segments. Common segments include `ui` for presentation, `model` for state and rules, `api` for external interactions, `lib` for supporting code, and `config` for settings. Use layers and segments as their responsibilities arise. `processes` is deprecated.

## Dependency boundaries

<!-- ‹guest · 2026-11-26› -->
- From highest to lowest, the layers are `app → pages → widgets → features → entities → shared`. Imports across slices target strictly lower layers and can skip intermediate layers. Modules within a slice can reference one another, as can segments within `app` or within `shared`.
- Consumers access a slice through its public API. Segments in `app` and `shared` also provide public entry points. Export what consumers need explicitly. Within a slice, import internal modules directly.
- Compose sibling slices in a higher layer. When two entities have a direct model relationship, `@x` can expose a dedicated API to the named consumer. For example, `entities/product/@x/order` serves `entities/order`.

## Pages first

Keep page-specific UI, state, and requests in the page slice. A request specific to product details belongs in `pages/product-details/api`. When multiple pages reuse the add-to-cart action, `features/add-to-cart` owns the behavior and exposes an entry point for those pages.

## Relationship to feature-first

Feature-first typically groups modules by business capability, then separates responsibilities within each module. FSD defines global layers, groups slices by product meaning within those layers, and governs imports between slices through the layer order.

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
طراحی رابط کاربری
آزاد

REA tool design

«REA tool design» یک مهارت آماده در حوزهٔ طراحی رابط کاربری است؛ به دستیار هوش مصنوعی شما یاد می‌دهد «خودکارسازی جریان …

⚡ /rea-tool-design SKILL.md
Claude / Claude CodeMCP
۸۴/۱۰۰ ★ ۴۷۴,۰۸۴
طراحی رابط کاربری
✦ Pro

Brainstorming

برای کارهای طراحی رابط کاربری، «Brainstorming» یک راهنمای کوتاه و روشن است: مسیر «خودکارسازی جریان کار و گیت (Git / CLI…

⚡ /brainstorming SKILL.md
Claude / Claude Code
۹۱/۱۰۰ ★ ۳۲۴,۲۹۰
طراحی رابط کاربری
✦ Pro

Frontend Design

«Frontend Design» همان چیزی است که وقتی سر طراحی رابط کاربری کار می‌کنید کم است: دستیار شما با این مهارت «هماهنگی عامل‌…

⚡ /frontend-design SKILL.md
Claude / Claude Code
۹۳/۱۰۰ ★ ۱۹۸,۷۹۴
طراحی رابط کاربری
✦ Pro

Anthropic Brand Styling

برای کارهای طراحی رابط کاربری، «Anthropic Brand Styling» یک راهنمای کوتاه و روشن است: مسیر «طراحی رابط کاربری و تجربه ک…

⚡ /brand-guidelines SKILL.md
Claude / Claude Code
۹۳/۱۰۰ ★ ۱۹۸,۷۹۴
طراحی رابط کاربری
✦ Pro

DESIGN PHILOSOPHY CREATION

برای کارهای طراحی رابط کاربری، «DESIGN PHILOSOPHY CREATION» یک راهنمای کوتاه و روشن است: مسیر «بازنویسی و تمیزسازی کد (…

⚡ /canvas-design SKILL.md
Claude / Claude Code
۹۳/۱۰۰ ★ ۱۹۸,۷۹۴
طراحی رابط کاربری
✦ Pro

Theme Factory Skill

اگر روی طراحی رابط کاربری کار می‌کنید، «Theme Factory Skill» بخشی از کار را از دوش شما برمی‌دارد: «پردازش اسناد، PDF و …

⚡ /theme-factory SKILL.md
Claude / Claude Code
۹۳/۱۰۰ ★ ۱۹۸,۷۹۴