build-link-preview

build-link-preview is a skill for Claude Code, Codex from microlinkhq/mcp. It costs 104 tokens per session (776 once invoked), scanned A, original, MIT.

A skill for building rich link-preview cards for URLs, like the previews shown in Slack, Twitter, or Discord. It gathers page details, imagery, colors, and optionally a screenshot.

In plain words
What is it for?
Use it to create unfurl cards with a title, description, author, date, publisher, thumbnail, favicon, and WCAG-safe color scheme.
Why use it?
It avoids manually collecting the title, description, images, favicon, and readable colors needed for a link preview.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microlinkhq/mcp/build-link-preview
Any agent
npx skills add microlinkhq/mcp --skill build-link-preview
Clone the repo
git clone --depth 1 https://github.com/microlinkhq/mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for build-link-preview

README.md
[![agentmods](https://agentmods.dev/badge/skills/microlinkhq/mcp/build-link-preview.svg)](https://agentmods.dev/skills/microlinkhq/mcp/build-link-preview)
Your own site
<a href="https://agentmods.dev/skills/microlinkhq/mcp/build-link-preview"><img src="https://agentmods.dev/badge/skills/microlinkhq/mcp/build-link-preview.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00104 $0.00776
Opus 5 $0.00052 $0.00388
Sonnet 5 $0.00021 $0.00155
Haiku 4.5 $0.00010 $0.00078

Measured 4d ago against content hash 6ad7cfee7709, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build-link-preview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/build-link-preview/SKILL.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Assemble a rich preview for a URL: title, description, favicon, thumbnail image, and a WCAG-safe color scheme derived from the page's imagery.

Steps

  1. Metadata — call microlink_meta for the card text and imagery:
    • microlink.data.title, .description, .author, .date, .publisher
    • microlink.data.image.url (hero image), microlink.data.logo.url (favicon)
  2. Colors — call microlink_palette on the same URL to theme the card:
    • microlink.data.image.palette — dominant colors (most → least dominant)
    • microlink.data.image.background_color — best card background
    • microlink.data.image.color — readable text/overlay color (WCAG-contrast)
    • microlink.data.image.alternative_color — accent
  3. Thumbnail (optional) — if the page has no good image, call microlink_screenshot with { "screenshot": { "type": "jpeg" } } and use microlink.data.screenshot.url as the fallback preview image.

To do it in a single request, use microlink_extract with palette: true (and screenshot: true if you also want a fallback thumbnail) — metadata, palette, and screenshot come back together under microlink.data.

{ "url": "https://example.com", "palette": true, "screenshot": true }

Render

Fill references/card-template.html with the values above. The template uses the palette so text stays readable on the chosen background. Minimal mapping:

  • Background ← background_color
  • Title / description text ← color
  • Accent border/badge ← alternative_color (or palette[0])
  • Thumbnail ← image.url (fallback: screenshot.url)
  • Favicon + publisher ← logo.url + publisher

Tips & gotchas

  • Always check status === "success" and that image.url exists before rendering; fall back to a screenshot thumbnail when it doesn't.
  • Missing colors: palette data is nested under each image field (e.g. data.image.palette), not at the top level.
  • Consistency: cache with a ttl (e.g. "1d") so repeated previews of the same link stay identical; use force: true only when you need to refresh.
  • Accessibility: background_color + color are already chosen for contrast — use them together rather than mixing in arbitrary palette entries for body text.
  • Free endpoint caps at 50 requests/day; set MICROLINK_API_KEY for more.

Read the full file on GitHub · 64 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 64 lines · 104 tokens per session scan A 6ad7cfee7709

Subscribe to this mod's changes

build-link-preview is a skill published in the GitHub repository microlinkhq/mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 776 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

unity-version-split

Split a C# file into Unity 6.5+ and pre-Unity 6.5 variants. Use when a file needs different implementations for different Unity versions due to API changes (e.g., EntityId vs int, GetEntityId vs GetInstanceID).

IvanMurzak/Unity-MCP · 59 tokens

specflow-use

To connect Rosetta with Grid Dynamics SpecFlow MCP; only when SpecFlow is mentioned and the MCP is installed.

griddynamics/rosetta · 27 tokens

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — errors, failed tool calls, latency, regressions, and low online-eval scores — plus Diagnostics issues. Reads live/production traces via the SDK (searchtraces and agentinsights) and works with no MCP; uses the MCP issue entity when connected.…

comet-ml/opik-mcp · 147 tokens

planning-and-task-breakdown

Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.

shashankswe2020-ux/whoop-mcp · 56 tokens

qa-knowledge

To run QA engineering — requirements/gap analysis, scenario & spec design, test implementation, failure triage — over the QA knowledge base.

griddynamics/rosetta · 32 tokens