Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)6.5k · #13880

preline-mcp

Skill này làm gì

Skill này giúp agent của bạn chọn các phần giao diện và khối trang của Preline rồi đặt chúng vào trang web. Nó dành cho người xây website bằng HTML kiểu Tailwind.

Khi nào nên dùng

  • ✓Khi bạn muốn thêm nút, menu, biểu mẫu hoặc thành phần Preline khác vào một trang HTML.
  • ✓Khi bạn yêu cầu một khối trang có sẵn, như hero hoặc bảng giá, từ Preline.
  • ✓Khi bạn nhắc đến Preline và muốn dùng nó trong trang của mình.

Liên kết skill

https://github.com/htmlstreamofficial/preline/blob/main/skills/preline-mcp/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/htmlstreamofficial/preline/blob/main/skills/preline-mcp/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thêm một khối bảng giá Preline vào file index.html của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent hỏi máy chủ Preline đúng thành phần hoặc khối bạn muốn, đọc file của bạn trước, rồi chèn HTML, CSS và JavaScript trả về.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Preline MCP

Intent

Use this skill to integrate Preline UI components and blocks into HTML files via the Preline MCP server. The server exposes 6 tools that return integration-ready HTML, CSS, and JS.

Activate when:

  • User says "preline", "add preline", "/preline", "use preline"
  • User asks for a Tailwind CSS component from the Preline library
  • User asks for a block (ready-made page section) or a starter page

Defaults

  • Never guess slugs. All section, component, and category identifiers are exact kebab-case strings. Always discover them via components_list or blocks_categories first.
  • One at a time. Retrieve one component or block, integrate it fully, then move to the next.
  • Always read the target file before inserting anything.
  • Call components_list({ section: "<inferred-slug>" }) when the component type is known - this keeps the response small. Omit section only when unsure.

Decision: Component vs Block

User says Use
"component" / "components" Component workflow
"block" / "blocks" (or "example" / "examples") Block workflow
Ambiguous Use judgment; blocks give more complete results

Clarifying Vague Requests

Ask the user to pick instead of guessing in either of these cases:

  • Abstract request. Too abstract to confidently map onto one category/section, let alone one block/component - e.g. "give me something for a pricing page", "I need a nice form", "show me a dashboard example". Start at step 1 below.
  • Tied candidates. The request is concrete enough to reach a single category/section, but blocks_in_category / components_list({ section }) still leaves 2+ candidates whose titles + descriptions satisfy every criterion the request named about equally well (same layout/feature/style class), with nothing in the request to break the tie. Skip straight to step 3 below with just the tied candidates.

If exactly one candidate matches everything the request names ("a basic accordion", "the SaaS hero with tabs"), skip straight to the normal workflow - don't interrogate the user for things you can already resolve, and don't ask just to be safe when one option is clearly the best fit.

All clarifying questions and lists are in English by default - switch to the user's language only once they write to you in it.

Blocks:

  1. Ask which category fits. Call blocks_categories() and present the relevant mainSection / subSection / category paths with their titles and descriptions - the catalog carries a one-line description for every category, so present it directly rather than inventing your own summary.
  2. Try to resolve in one round. If the user's reply both names a category and describes the item distinctively enough to identify a single match (a specific layout, feature, or style), call blocks_in_category to confirm the exact ID and go straight to single_block - skip step 3 entirely.
  3. Otherwise, ask which block fits best. Call blocks_in_category({ mainSection, subSection, category }), list the block titles + descriptions - or just the tied candidates, for the case above - and ask the user to pick the one closest to their needs.
  4. Fetch and integrate the chosen block with single_block.

Components - same shape, sections instead of categories:

  1. Ask which section fits (components_list() for the full list, or components_list({ section }) once you can infer one).
  2. If the reply names a section and describes the component distinctively enough → resolve directly via single_component (lean on relative metadata - see Smart Component Selection - to land on the right default/variant).
  3. Otherwise list the components in that section (titles + descriptions, with relative.category groupings where present - or just the tied candidates, for the case above) and ask which fits best.
  4. Fetch and integrate with single_component.

Keep each round to one focused question with a short, scannable list - that beats an open "what do you want?" and beats guessing a slug just to avoid asking.

Composite & Layout Requests

When a request describes more than a single component - several pieces, a region, a full page, or an app shell - don't fetch ad-hoc. Plan the whole result first, then fetch and integrate one node at a time. The same steps apply to any shape: a dashboard, a settings page, a product page, a multi-step form, "a card/section/layout with X, Y and Z", etc.

  1. **Lock cross-cutting const
Câu hỏi thường gặp

Nó có tự đoán tên thành phần không?

Không. Skill nói phải tra đúng tên trong danh sách Preline trước khi thêm bất cứ thứ gì.

Nó có thêm nhiều phần cùng lúc không?

Không. Nó làm việc với một thành phần hoặc khối mỗi lần và hoàn thành trước khi chuyển sang cái khác.

Nếu yêu cầu của tôi quá mơ hồ thì sao?

Agent sẽ yêu cầu bạn chọn giữa các phương án thay vì tự đoán bạn muốn thành phần nào.

Chi tiết

Mô tả gốc của tác giả

Add, integrate, or build Preline UI components and blocks into HTML files via the Preline MCP server. Use when the user mentions "preline", says "/preline", asks to add a UI component, or requests a Preline block (a ready-made page section) using Preline UI.

repo: htmlstreamofficial/preline

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#13880
Giấy phép
—
Cập nhật
30/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự