跳到正文
Skillpedia
界面(UI/UX)6.5k · #13880

preline-mcp

它能做什么

该技能帮助你的智能体挑选 Preline 界面组件和页面板块,并将其放入网页中。适合用类 Tailwind 风格 HTML 搭建网站的人。

适用场景

  • ✓当你想在 HTML 页面中添加按钮、菜单、表单或其他 Preline 组件时。
  • ✓当你想从 Preline 获取现成的页面板块,例如首屏或定价区块时。
  • ✓当你提到 Preline 并希望在页面中使用它时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/htmlstreamofficial/preline/blob/main/skills/preline-mcp/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在我的 index.html 文件中添加一个 Preline 定价板块。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会向 Preline 服务器请求你需要的确切组件或区块,先读取你的文件,然后插入返回的 HTML、CSS 和 JavaScript。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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
常见问题

它会猜测组件名称吗?

不会。该技能要求在添加任何内容之前,先从 Preline 列表中查找确切的名称。

它会一次添加很多组件吗?

不会。它每次只处理一个组件或区块,完成后再继续下一个。

如果我的请求太模糊怎么办?

智能体会请你在几个选项中选择,而不是猜测你指的是哪个组件。

详情

作者的原始描述

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

热度

GitHub 星标
6.5k
排名
#13880
许可证
—
更新时间
2026/8/30

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能