Logo Open Graph Social Preview

Open Graph Social Preview

Cộng đồng
MiladJoodi
open-graph-social-preview

Triển khai và gỡ lỗi bản xem trước liên kết trên Open Graph / Twitter (X) / Telegram / WhatsApp / LinkedIn / Discord / Facebook. Dùng khi thêm metadata chia sẻ lên mạng xã hội hoặc khi og:image bị thiếu, bị lỗi (500), bị cắt, hiển thị sai do bộ nhớ đệm trên X hoặc chữ Ba Tư bị lỗi trong ảnh OG tạo động trên Next.js (hoặc bất kỳ trang web nào). Hãy dựa vào bằng chứng để quyết định, đừng máy móc chạy theo danh sách kiểm tra.

Tổng quan

Nhà phát hànhMiladJoodi
Kho mãskills
Tên kỹ năngopen-graph-social-preview
Sao
24
Bản fork
1
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được MiladJoodi công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Open Graph Social Preview trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/MiladJoodi/skills/tree/main/skills/open-graph-social-preview
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MiladJoodi/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/open-graph-social-preview .claude/skills/open-graph-social-preview
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Open Graph Social Preview trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Open Graph Social Preview ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Open Graph Social Preview với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Open Graph & Social Link Previews

Practical guide for coding agents shipping share cards that work on Facebook, X, LinkedIn, WhatsApp, Telegram, and Discord.

Goal: reliable title + description + image that crawlers fetch without JS, without auth, and without platform-cache traps.

Scope & version

Skill version1.0.0
In scopeImplementation of OG/Twitter metadata and share images; debugging broken or stale social previews
Out of scopeGeneral SEO, rankings, sitemaps, content strategy, unrelated marketing

How to use this skill: Checklists and tables are aids, not a script. The agent must gather evidence, form a hypothesis, and choose a fix. Skipping diagnosis to “run every step” is incorrect. Skipping evidence to rip out working dynamic OG is also incorrect.


0. Agent Workflow (mandatory)

Never jump to “replace with static PNG.” Follow this order:

1) Inspect

  • Find how OG is implemented: metadata / generateMetadata, metadataBase, opengraph-image.*, twitter-image.*, /og routes, siteConfig.ogImage, public assets.
  • Note hosting (Vercel / Cloudflare / Docker / other / local-only).
  • Note whether current cards are static, dynamic (ImageResponse), or mixed.

2) Diagnose

  • Confirm live HTML tags (og:*, twitter:*).
  • Fetch the live image URL (status, redirects, Content-Type, size, timing).
  • Identify environment (local OK vs prod fail).
  • Check cache layer (browser / CDN / crawler / X).
  • Check origin consistency (no localhost, HTTP, wrong preview domain).

3) Plan (before any edits)

  • Emit the Pre-change brief below (required).
  • Choose Static vs Dynamic with the decision tree using that evidence.
  • List files to change and what not to touch.

4) Fix

  • Minimal change that addresses the stated root cause.
  • Do not rip out working dynamic OG without a reason tied to evidence.

5) Verify

  • Live production URL when possible (not only local).
  • Page source + direct image request + dimensions + checker/platform smoke.

6) Report

  • Use the Agent Report format at the end of this skill.

Pre-change brief (required before edits)

Output this block before modifying files. If evidence is insufficient, gather more first—do not invent a cause.

markdown
## Pre-change brief

**Root cause:** … (one clear hypothesis)
**Evidence:** … (commands, URLs, status codes, HTML snippets, local vs prod)
**Proposed fix:** … (minimal approach; static vs dynamic choice + why)
**Files affected:** …

Cross-platform code search

rg (ripgrep) is optional. Prefer this order:

bash
# 1) ripgrep if installed
rg -n "openGraph|twitter:|ogImage|opengraph-image|twitter-image|ImageResponse|metadataBase" app lib src 2>/dev/null

# 2) git grep (works in most repos)
git grep -n -E "openGraph|twitter:|ogImage|opengraph-image|twitter-image|ImageResponse|metadataBase" -- app lib src 2>/dev/null

# 3) POSIX grep fallback
grep -R -n -E "openGraph|ogImage|opengraph-image|ImageResponse|metadataBase" app lib src 2>/dev/null

Windows PowerShell (if bash tools unavailable):

powershell
Get-ChildItem -Recurse -Include *.ts,*.tsx,*.js,*.jsx app,lib,src -ErrorAction SilentlyContinue |
  Select-String -Pattern "openGraph|ogImage|opengraph-image|ImageResponse|metadataBase"

1. When to use

  • Adding/changing og:* / twitter:*
  • Missing / broken / wrong share image
  • Checker: Image is invalid / Internal Server Error
  • Telegram OK, X empty (or reverse)
  • Persian/Arabic issues in generated OG
  • Choosing static PNG vs opengraph-image.tsx / ImageResponse

Out of scope: general SEO, sitemaps, rankings, content strategy.


2. Non‑negotiables

  1. Crawlers do not run your client React bundle. Tags must be in initial HTML.
  2. Image URL must be absolute HTTPS, publicly fetchable, return a real image.
  3. Prefer fixing the existing approach if it is close to working.
  4. Prefer static images when dynamic generation is broken, fragile, slow, or unnecessary.
  5. Do not replace working dynamic infrastructure without a documented reason.
  6. Code looking correct ≠ fixed. Verify live.

3. Decision tree: Static vs Dynamic

Is there an existing opengraph-image.* / ImageResponse / /og route?
├─ YES → Does it work in production (200, image/*, correct render)?
│        ├─ YES → Keep it unless product needs a simpler static card.
│        │        (Optional: harden fonts/assets/timeouts; don't rip out.)
│        └─ NO  → Prefer static PNG (or fix dynamic only if dynamic is required).
└─ NO  → Prefer static PNG in /public + metadata images.

Prefer static when

  • Dynamic route 404/500/timeouts
  • Missing fonts/assets in deploy
  • Crawlers fail while local works
  • No need for per-page generated art
  • Persian/Arabic shaping in Satori is wrong and redesigning fonts is costly
  • You need maximum crawler reliability

Prefer dynamic when

  • It already works in production
  • Per-route titles/descriptions must be baked into the image
  • Brand requires programmatic cards
  • Fonts + assets are proven in the target runtime
  • Latency is acceptable for crawlers

Never

  • Delete a working opengraph-image.tsx “just because static is safer”
  • Leave a crashing file-based OG route alongside good metadata (file route still gets hit)

4. Image specs

PropertyRecommendation
Aspect1.91:1
Size1200×630
FormatPNG or JPG
Weight< 5 MB (aim < 1 MB)
Safe areaKeep logo/title away from edges

Wrong aspect (e.g. 1920×1581) often still displays but may crop/letterbox.

Dedicated share file is best: public/og.png or public/.../og-1200x630.png.


5. Required tags

html
<meta property="og:type" content="website" />
<meta property="og:url" content="https://example.com/" />
<meta property="og:title" content="Title" />
<meta property="og:description" content="Description" />
<meta property="og:image" content="https://example.com/og.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:locale" content="fa_IR" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Title" />
<meta name="twitter:description" content="Description" />
<meta name="twitter:image" content="https://example.com/og.png" />

Rules:

  • twitter:card = summary_large_image for large cards
  • Absolute HTTPS image URLs in production
  • X falls back to og:* when Twitter image tags are incomplete; still set both

6. Next.js App Router (15/16) guidance

Applies to App Router Metadata API in Next.js 15 and 16.

Building blocks

PieceRole
metadataBaseResolves relative image/canonical URLs to absolute
openGraph.imagesDeclares OG images in Metadata API
twitter.imagesDeclares Twitter images
generateMetadataPer-route/dynamic metadata (often async)
app/opengraph-image.tsx (or .png/.jpg)File-based OG image convention
app/twitter-image.tsx (or static)File-based Twitter image
Nested layout.tsx / page.tsx metadataRoute overrides

Precedence / conflicts (practical)

  1. File-based opengraph-image.* / twitter-image.* in the matching segment are served as that segment’s OG/Twitter image endpoints and are linked from metadata automatically.
  2. Explicit openGraph.images / twitter.images in Metadata API also emit tags.
  3. If both exist, crawlers may see multiple images or hit the file route URL. A broken opengraph-image.tsx (500) will fail even if Metadata points at a good static file—crawlers often request the convention URL.
  4. Nested routes override/merge with parents via Next metadata rules; a child generateMetadata can replace images for that path.
  5. Wrong metadataBase (localhost / preview host) produces wrong absolute og:image / og:url in production HTML.

metadataBase: prefer a fixed production origin

Default (recommended): set metadataBase from a stable production URL such as NEXT_PUBLIC_APP_URL / siteConfig.url.

ts
metadataBase: new URL(
  process.env.NEXT_PUBLIC_APP_URL ?? "https://example.com"
)

Why not always derive host from headers()?

  • Behind Proxy/CDN, x-forwarded-host / host can be wrong, duplicated, or internal.
  • Preview / middleware hosts can leak into absolute og:image and og:url.
  • Social crawlers then cache the wrong origin.

Use request-derived host only when you truly need it, for example:

  • Multi-tenant sites where each host must emit its own absolute URLs
  • Local/preview tooling where you deliberately want the current request host

Even then: validate allowlists, prefer x-forwarded-host carefully, and never ship localhost in production HTML.

Example A — Root metadata with fixed production origin (Next 15/16)

tsx
// app/layout.tsx
import type { Metadata } from "next"

const siteUrl = process.env.NEXT_PUBLIC_APP_URL ?? "https://example.com"

export const metadata: Metadata = {
  metadataBase: new URL(siteUrl),
  title: { default: "Example", template: "%s · Example" },
  description: "…",
  openGraph: {
    type: "website",
    locale: "fa_IR",
    url: siteUrl,
    siteName: "Example",
    title: "Example",
    description: "…",
    images: [
      {
        url: "/og.png", // public/og.png → absolute via metadataBase
        width: 1200,
        height: 630,
        alt: "Example",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Example",
    description: "…",
    images: ["/og.png"],
  },
}

Put the file at public/og.png. If a crashing app/opengraph-image.tsx exists, remove or fix it so it cannot 500.

Example A2 — Request-derived host (only when required)

tsx
import type { Metadata } from "next"
import { headers } from "next/headers"

const FALLBACK = process.env.NEXT_PUBLIC_APP_URL ?? "https://example.com"
const ALLOWED = new Set(["example.com", "www.example.com"])

export async function generateMetadata(): Promise<Metadata> {
  const h = await headers()
  const raw =
    h.get("x-forwarded-host")?.split(",")[0]?.trim() ||
    h.get("host")?.trim() ||
    ""
  const host = ALLOWED.has(raw) ? raw : new URL(FALLBACK).host
  const proto =
    h.get("x-forwarded-proto")?.split(",")[0]?.trim() || "https"
  const metadataBase = new URL(`${proto}://${host}`)

  return {
    metadataBase,
    openGraph: {
      url: metadataBase.origin,
      images: [{ url: "/og.png", width: 1200, height: 630 }],
    },
    twitter: {
      card: "summary_large_image",
      images: ["/og.png"],
    },
  }
}

Example B — Route generateMetadata override (params as Promise — Next 15+)

tsx
// app/docs/[slug]/page.tsx
import type { Metadata } from "next"

type Props = { params: Promise<{ slug: string }> }

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  const { slug } = await params
  const title = `Docs · ${slug}`
  const description = "…"

  return {
    title,
    description,
    alternates: { canonical: `/docs/${slug}` },
    openGraph: {
      title,
      description,
      type: "article",
      images: [{ url: "/og.png", width: 1200, height: 630 }],
    },
    twitter: {
      card: "summary_large_image",
      title,
      description,
      images: ["/og.png"],
    },
  }
}

Example C — Keep a working dynamic file convention

tsx
// app/opengraph-image.tsx
import { ImageResponse } from "next/og"

export const runtime = "nodejs"
export const size = { width: 1200, height: 630 }
export const contentType = "image/png"
export const alt = "Example"

export default async function Image() {
  // Prefer bundled fonts/assets that exist in production.
  return new ImageResponse(
    (
      <div
        style={{
          width: "100%",
          height: "100%",
          display: "flex",
          alignItems: "center",
          justifyContent: "center",
          background: "#09090b",
          color: "white",
          fontSize: 64,
        }}
      >
        Example
      </div>
    ),
    { ...size }
  )
}

Only keep this if /opengraph-image returns 200 + image/png in production and text renders correctly.

Example D — Conflict to avoid

text
app/opengraph-image.tsx  → 500 (missing font)
layout metadata images   → /og.png (fine)

Result: crawlers still often fail on the convention URL / broken generation.

Fix the file route or remove it and rely on Metadata + public/og.png — do not leave both fighting.

Inspect before changing

Use the cross-platform search commands in §0.


7. Live image URL diagnostics

Target the exact URL from HTML (og:image / twitter:image).

curl (adjust URL)

bash
curl -sI -L --max-redirs 10 "https://example.com/og.png"
curl -sI -L "https://example.com/opengraph-image"
curl -sL -o /tmp/og-out --write-out "http=%{http_code} type=%{content_type} size=%{size_download} time=%{time_total} final=%{url_effective}\n" "https://example.com/og.png"
file /tmp/og-out

Windows (PowerShell):

powershell
Invoke-WebRequest -Uri "https://example.com/og.png" -Method Head -MaximumRedirection 10 |
  Select-Object StatusCode, Headers

Verify

CheckExpect
HTTP statusFinal 200 (after redirects)
Redirect chainNo login/HTML interstitial
Final URLProduction HTTPS origin
Content-Typeimage/png, image/jpeg, or image/webp
BodyReal image bytes (file says PNG/JPEG…) — not HTML
Size> ~1KB; < 5MB
TimePrefer fast (< ~2–3s); slow responses get dropped by crawlers
AuthNo cookie/login required
Middleware/WAFBot UA not blocked
robotsImage/HTML not disallowed for crawlers that respect robots

Red flags

  • 200 + text/html → login page / error page / SPA shell
  • 302/301 → /login or marketing HTML
  • 500 on /opengraph-image → runtime exception / missing asset / font
  • Empty or tiny body → malformed generation

8. Environment-aware debugging

Identify host early (Vercel dashboard, Dockerfile, Cloudflare, next start only…).

EnvironmentCommon prod-only failures
VercelMissing files outside traced output; edge vs node runtime; cold start; env URL mismatch
CloudflareCDN cache of old image/HTML; WAF bot challenges; redirect rules
DockerDifferent WORKDIR / process.cwd(); fonts not copied into image
Preview deploysog:url/og:image pointing at preview host leaked to prod metadata
Local onlyWorks via local FS; fails when fonts/assets not in deploy

Dynamic OG checklist in prod:

  • Font paths use deploy-safe locations (prefer import/fetch of bundled assets over brittle process.cwd() guesses)
  • Runtime compatible (nodejs vs edge — fs needs node)
  • All referenced PNGs/TTFs exist in the deployment
  • No reliance on localhost absolute URLs

9. Cache debugging

Layers:

  1. Browser cache
  2. CDN cache (Cloudflare/Vercel)
  3. Platform crawler cache (Facebook/LinkedIn scrapers)
  4. X cache (aggressive; keyed by exact URL)

Facts:

  • Fixing metadata/code does not refresh an already-cached preview for the same URL.
  • X often keeps a failed “no image” card for that exact string.
  • Telegram / many checkers scrape fresher than X.

Busting:

MethodUse
Query string ?v=2Fast test for X/Telegram
New pathStronger bust
New image filenameBust CDN/image URL caches when bytes changed at same logical asset
Platform debugger “rescrape”Facebook/LinkedIn official tools

X: standalone Card Validator preview is retired; composer draft preview is ground truth.


10. Trusted checkers & platform tools

Use official tools first; third-party only as a quick second opinion.

ToolURLNotes
Facebook Sharing Debuggerhttps://developers.facebook.com/tools/debug/Official rescrape for Facebook/IG-family previews
LinkedIn Post Inspectorhttps://www.linkedin.com/post-inspector/Official LinkedIn rescrape
X / TwitterTweet composer draft with the URLNo reliable public validator; cache is URL-keyed
TelegramPaste into a Saved Messages / chatGood fresh-scrape smoke test
Optional: Open Graph previewhttps://www.opengraph.xyz/Unofficial; useful after the image URL itself is healthy

Do not treat unofficial checkers as more authoritative than: (1) raw HTML tags, (2) direct image curl, (3) official platform debuggers / composer.


11. URL / canonical consistency

On the live production HTML, confirm same production origin for:

  • page URL
  • canonical
  • og:url
  • og:image
  • twitter:image

Reject:

  • http://
  • localhost / 127.0.0.1
  • accidental preview deployment host
  • wrong domain / staging

Fix metadataBase (prefer fixed NEXT_PUBLIC_APP_URL), siteConfig.url, and any hardcoded origins.


12. Crawler safety

Crawlers must fetch initial HTML, OG image, and redirects without:

  • JavaScript execution
  • authentication / cookies
  • client-only meta injection
  • interactive challenges aimed at humans
  • unbounded server work

Keep image/metadata endpoints fast and deterministic. Avoid long ImageResponse work on cold starts when crawlers are the audience.


13. Persian / Arabic OG text

Satori / next/og frequently fails at glyph joining (letters look disconnected).

Do not auto-switch to static PNG solely because the site is Persian.

Inspect:

  • Font files actually loaded in the OG route
  • Format (TTF/OTF supported by the renderer)
  • Font present in production bundle
  • RTL / direction handling
  • Shaping result on the production PNG (open the image URL)
  • Punctuation and digits (Persian vs Latin)

If production PNG shows correct joined Persian → dynamic can stay.
If disconnected / missing glyphs and fixing fonts is hard → static designed PNG is the reliable fix.


14. Failure → cause → fix

SymptomCauseFix
No image tagsMissing metadataAdd openGraph/twitter images
Tags present, image 404Wrong pathFix public path / filename
Image 500Dynamic crash / missing font/assetFix route or switch to static
200 but HTML bodyMiddleware/login/error HTMLExclude OG routes; allow public GET
200 wrong Content-TypeMisconfigured routeReturn image/*
Redirect to loginAuth middlewareBypass for OG image + HTML GET for bots if needed
Local OK, prod failcwd/fonts/assets/runtimeBundle assets; node runtime; static fallback
localhost in tagsBad metadataBase/urlFixed production origin
Wrong host behind CDNRequest-derived metadataBasePrefer NEXT_PUBLIC_APP_URL
Telegram OK, X emptyX cacheNew URL ?v=N; don't expect old posts to update
Cropped cardBad aspect ratioExport 1200×630
Disconnected PersianSatori shaping/fontsFix fonts or static PNG
Duplicate/conflicting imagesMetadata + file conventionAlign or remove broken file route
Nested route wrong cardChild metadata overrideFix route generateMetadata
Empty/malformed imageGenerator bugRegenerate; verify with file
Stale image bytesCDN cacheNew filename or cache purge
Edge runtime + fsIncompatibleexport const runtime = "nodejs" or avoid fs

15. Debug playbook (short)

  1. View-source / fetch HTML: tags present? absolute HTTPS?
  2. Fetch image URL: status, type, bytes, time
  3. Identify static vs dynamic vs conflict
  4. Check origin consistency
  5. Check host-specific issues
  6. Plan fix (decision tree)
  7. Apply minimal fix
  8. Verify live
  9. If X still stale → bust URL and retest composer
  10. Report

16. Verification checklist (after every fix)

Do not claim fixed until checked:

  • Production HTML contains correct og:* / twitter:*
  • og:image / twitter:image final URL = 200 + image/*
  • Body is a valid image; dimensions sane (prefer ~1200×630)
  • No localhost/preview/HTTP in tags
  • Facebook Debugger and/or LinkedIn Inspector when those platforms matter
  • Telegram or X composer smoke OK
  • X composer OK on a fresh URL if prior URL was poisoned
  • Noted whether old URLs still need cache expiry

17. Agent Report format

markdown
## OG / Social preview report

**Root cause:** …
**Files changed:** …
**What changed:** …
**Why it works:** …
**Verification:**
- HTML tags: …
- Image URL status/type/size/time: …
- Dimensions: …
- Checker/platform: …
**Remaining limitations:** …
**Cache busting required?** yes/no — recommended URL if yes: …

18. What not to do

  • Run this skill as a blind checklist without evidence
  • Edit files before emitting the Pre-change brief
  • Replace working dynamic OG without cause
  • Leave a crashing opengraph-image.tsx in place
  • Assume code review equals production success
  • Assume X updates old posts after a fix
  • Publish localhost/preview origins in OG tags
  • Prefer request-derived metadataBase by default behind Proxy/CDN
  • Treat unofficial OG sites as more authoritative than curl + official debuggers
  • Treat this skill as general SEO

Câu hỏi thường gặp

Kỹ năng AI Open Graph Social Preview làm được gì?

Triển khai và gỡ lỗi bản xem trước liên kết trên Open Graph / Twitter (X) / Telegram / WhatsApp / LinkedIn / Discord / Facebook. Dùng khi thêm metadata chia sẻ lên mạng xã hội hoặc khi og:image bị thiếu, bị lỗi (500), bị cắt, hiển thị sai do bộ nhớ đệm trên X hoặc chữ Ba Tư bị lỗi trong ảnh OG tạo động trên Next.js (hoặc bất kỳ trang web nào). Hãy dựa vào bằng chứng để quyết định, đừng máy móc chạy theo danh sách kiểm tra.

Vì sao nên dùng Open Graph Social Preview trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Open Graph Social Preview là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Open Graph Social Preview trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/MiladJoodi/skills/tree/main/skills/open-graph-social-preview. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Open Graph Social Preview?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Open Graph Social Preview với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Open Graph Social Preview với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Open Graph Social Preview có miễn phí không?

Có. Kỹ năng này được MiladJoodi phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇