MCPInstall

preline-mcp

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.

Installs
353
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/htmlstreamofficial/preline --skill preline-mcp
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads preline-mcp automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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 saysUse
"component" / "components"Component workflow
"block" / "blocks" (or "example" / "examples")Block workflow
AmbiguousUse 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 constraints first. Anything that applies to the whole result - class system (theme tokens vs utilities → isUtilityBased / theme), shared surfaces/colors, spacing/density, repeated element states - decide once, up front. Keep it identical across every later fetch and edit.
  2. Decompose into a tree: containers → regions → leaf components. Write it down; each leaf is one fetch.
  3. Discover every node - route, then confirm. Use references/catalog-map.md to route: an abstract intent (a whole page/region/shell) → the right blocks_categories branch (reuse a ready-made block as the skeleton when one fits); each named element → the right components_list({ section }). The map only tells you where to look - always confirm the exact slug against the tool output before inserting.
  4. Assemble outermost-first, one at a time. The skeleton/outer container sets the shared surfaces and the script/init anchors; then fill inward region by region, integrating each fully (Integration Rules) before the next. Keep the returned classes, change text only - except the specific surfaces/colors/states the user asked to change. Apply every structural adaptation to the markup before writing it (see Adapt before you write in Integration Rules).
  5. Verify the finished result against the request, element by element.

See references/composite-layouts.md for the expanded method and worked illustrations.

Workflow: Components

1. components_list({ section: "<slug>" })   → get valid component IDs
2. single_component({ section, component }) → get HTML/CSS/JS
3. Read target file
4. Integrate HTML, CSS, scripts, init (see Integration Rules)
5. Repeat from step 1 only after integration is complete

Workflow: Blocks

1. blocks_categories()                                    → get hierarchy
2. blocks_in_category({ mainSection, subSection, category }) → get block IDs
3. single_block({ mainSection, subSection, category, block }) → get HTML/CSS/JS
4. Read target file
5. Integrate HTML, CSS, scripts, init (see Integration Rules)
6. Repeat from step 1 only after integration is complete

Integration Rules

HTML - insert where the user needs it.

CSS (<!-- CSS --> section):

  • MUST go inside <head>, immediately before </head>
  • NEVER place in <body> or near </body>

External scripts (<!-- Scripts --> section):

  • The <!-- Scripts --> label is a response section marker - NOT a location in the target file
  • Placement algorithm: open target file, scan upward from </body>, skipping blank lines, comments, and non-structural tags (</script>, </style>, etc.)
  • The first structural closing tag you reach (</main>, </section>, </div>, </footer>, </article>) is the anchor
  • Insert <script src> tags after that anchor, ordered around the existing Preline core script - the loaded <script src> whose src contains preline (e.g. …/preline/dist/index.js; exact path varies by install):
    • scripts whose src does not contain preline (third-party libs: lodash, apexcharts, …) → before the Preline core script
    • scripts whose src does contain preline (Preline helpers, e.g. hs-*-helpers.js) → after the Preline core script
    • if no Preline core script exists yet, keep order: scripts without preline, then scripts with preline
    • inline init <script> always comes last, immediately before </body>

Init (<!-- Init --> section):

  • Place immediately before </body>
  • Wrap in window.addEventListener('load', () => { ... }) unless the block already contains <script> tags

Large responses (artifacts): when a response is written to a temp scratch file, read it once with the Read tool (use offset/limit for big files), copy the needed blocks into the target, then delete the scratch file. Don't pull the whole artifact into context if you only need to place it.

Adapt before you write. When the request differs from the fetched markup - regions the user didn't ask for (breadcrumbs, demo menus, placeholder logos), different blocks or labels - produce the final markup in memory first, then write it into the target in ONE edit per region. Never insert fetched markup wholesale and refactor it with a chain of follow-up edits: every such edit re-transfers large markup, bloats context, and desyncs file state.

Same token = same color. Theme tokens (bg-navbar, bg-sidebar, bg-layer, …) are consistent across a theme - to give two surfaces the same color, give them the same token class. Never resolve tokens to raw colors by reading the project's CSS.

Trust the returned markup - do not re-verify it. The classes, structure, and data-hs-* attributes the MCP returns are valid Preline by construction. This is the single biggest time-sink to avoid. Do NOT:

  • grep, parse, or scan the user's compiled CSS (e.g. main.css) to "confirm" a class exists or to resolve what color a design token produces - Preline classes resolve at the consumer's build step, so absence from any one stylesheet means nothing;
  • write HTML/DOM/AST validators (Python HTMLParser, tag-balance checkers, etc.) - SVG and void elements trip naive parsers and produce false errors;
  • re-read a placed artifact or re-open the edited file just to "double-check" the generated code.

Place the markup, change text only, move on. Verify against the request (is every element the user named present?), never by auditing the generated code or the project's CSS.

Smart Component Selection

components_list may return a relative object per component:

  • isSectionDefault: true - recommended default for the section; prefer when the request is vague
    • Exception: if the description says "multiple variants" and the user wants one, pick a single-variant component instead
  • category - logical group (e.g. "color-variants", "states")
  • isCategoryDefault: true - recommended default for its category; prefer when the request implies a style group

Available Themes

default (blue) · harvest (amber) · retro (fuchsia) · moon (grayscale) · ocean (cyan) · bubblegum (pink) · cashmere (mauve) · autumn (orange) · olive (green)

Pass via isUtilityBased: true, theme: "<name>" on single_component or single_block.

Key References

  • references/catalog-map.md - routing map: block intent ontology (whole pages/shells) + all component sections grouped by purpose, JS-plugin marked. Open this to pick the right section / blocks branch before any discovery call.
  • references/composite-layouts.md - full method for multi-component / page / shell requests, with worked illustrations
  • references/mcp-tools-reference.md - full parameter specs, placement algorithm detail, all 6 tools

FAQ

What does the preline-mcp skill do?

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.

How do I install preline-mcp?

Run npx skills add https://github.com/htmlstreamofficial/preline --skill preline-mcp in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/preline-mcp/ (personal) or .claude/skills/preline-mcp/ (project).

Which AI agents can use preline-mcp?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is preline-mcp safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains preline-mcp?

It is published by htmlstreamofficial in htmlstreamofficial/preline. It has 353 recorded installs.

More from htmlstreamofficial/preline

View all →

preline-theme-generator

htmlstreamofficial/preline

Generate, preview, save, or validate Preline theme CSS using the bundled local generator in this skill. Use when the user asks to create a new Preline theme, match a brand color, translate a mood into a theme, generate light and dark theme CSS, preview theme output without writing files, or review and fix generated theme tokens. Do not use for generic non-Preline CSS work or arbitrary command execution.

Frontend & Design1.3K installs

Popular ai & agents skills

View category →

google-agents-cli-publish

google/agents-cli

This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).

AI & Agents513.9K installs

google-agents-cli-eval

google/agents-cli

This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).

AI & Agents513.5K installs

skill-creator

anthropics/skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

OfficialAI & Agents416.4K installs

codex-pet

prime-skills/runcomfy-agent-skills

Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.

AI & Agents402.1K installs

full-output-enforcement

leonxlnx/taste-skill

Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.

AI & Agents401K installs

executing-plans

obra/superpowers

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

AI & Agents245.7K installs