Back to list
kaishin

link-previewer

by kaishin

These are my dotfiles.

8🍴 0📅 Jan 24, 2026

SKILL.md


Link Previewer

Extract social graph metadata (Open Graph, Twitter Cards, title, description, tags) from URLs using a Python script.

Requirements

Requires uv (dependencies auto-install on first run via PEP 723 inline script metadata).

Usage

Single URL

./scripts/fetch-metadata.py https://example.com

Multiple URLs

./scripts/fetch-metadata.py https://example.com https://another.com

Batch from File

cat urls.txt | ./scripts/fetch-metadata.py

JSON Output

./scripts/fetch-metadata.py --json https://example.com

Output Fields

FieldSource Priority
titleog:title > twitter:title > <title>
descriptionog:description > twitter:description > meta description
tagskeywords meta, article:tag, news_keywords
ogAll og:* meta properties
twitterAll twitter:* meta properties

Example Output

Text format:

URL: https://github.com

Title: GitHub: Let's build from here
Description: GitHub is where over 100 million developers shape the future of software...
Tags: code, development, git, github, programming

Open Graph:
  type: website
  image: https://github.githubassets.com/images/modules/site/social-cards/campaign-social.png
  site_name: GitHub

Twitter Card:
  card: summary_large_image
  site: @github

JSON format (--json):

{
  "url": "https://github.com",
  "title": "GitHub: Let's build from here",
  "description": "GitHub is where over 100 million developers...",
  "tags": ["code", "development", "git"],
  "og": {
    "title": "GitHub",
    "type": "website",
    "image": "https://..."
  },
  "twitter": {
    "card": "summary_large_image",
    "site": "@github"
  },
  "error": null
}

Script Options

OptionDefaultDescription
--jsonfalseOutput as JSON
--timeout10Request timeout in seconds
--workers5Max concurrent requests for batch

Post-Processing: Rewrite Descriptions

The raw OG/meta descriptions are often marketing copy. After fetching metadata, rewrite the description to be factual and useful:

Guidelines

  1. Strip marketing language - Remove superlatives, buzzwords, and promotional fluff
  2. State what it actually is - Product, service, tool, article, etc.
  3. Be specific - What does it do? Who is it for?
  4. Keep it brief - 1-2 sentences max

Examples

Raw DescriptionRewritten
"GitHub is where over 100 million developers shape the future of software, together.""Code hosting platform for version control and collaboration using Git."
"Discover the innovative world of Apple and shop everything iPhone, iPad...""Consumer electronics company. Manufacturer of iPhone, iPad, Mac, and related software."
"Anthropic is an AI safety company working to build reliable, interpretable, and steerable AI systems.""AI research company focused on AI safety. Creator of Claude."

Output Format

After rewriting, present results as:

**Title:** [cleaned title without site name suffix]
**Description:** [rewritten factual description]
**Tags:** [comma-separated relevant tags]

For batch URLs, use a markdown table:

URLTitleDescriptionTags
............

Common Use Cases

  1. Generate link previews for a list of bookmarks
  2. Audit OG tags before sharing on social media
  3. Extract metadata for content aggregation
  4. Validate social cards are properly configured

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon