Логотип Github Social Preview

Github Social Preview

Спільнота
mickpletcher
github-social-preview

Generates a professional GitHub repository social preview image sized 1280x640 pixels as a JPG under 1 MB. Always trigger immediately when the user's message starts with "gsp". Also trigger on "generate github social preview", "create repo preview image", or any request to generate a social preview or OG image for a GitHub repository.

Огляд

Видавецьmickpletcher
РепозиторійAI-Skills
Назва навичкиgithub-social-preview
Зірки
21
Форки
3
Файли в пакеті
6
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 6

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем mickpletcher. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Github Social Preview у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/mickpletcher/AI-Skills/tree/main/claude/skills/github-social-preview
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mickpletcher/AI-Skills.git /tmp/AI-Skills
mkdir -p .claude/skills
cp -r /tmp/AI-Skills/claude/skills/github-social-preview .claude/skills/github-social-preview
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Github Social Preview в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Github Social Preview, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Github Social Preview не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

GitHub Social Preview Skill

Intent

Generate branded GitHub social preview images using repo metadata, visual rules, and the included preview generator.

Do Not Use When

  • Do not use for unrelated image generation, manual graphic design requests, or previews without enough repo identity context.
  • Required context is missing and cannot be reasonably inferred.
  • A more specific skill in this repo is a better match.

Constraints

  • Do not fabricate missing facts, measurements, dates, sources, or user context.
  • Keep output aligned with Mick's direct, practical communication style unless the skill says otherwise.
  • Preserve safety, legal, medical, financial, and operational boundaries stated in this file.
  • Prefer concise, usable output over broad explanation.

Validation Checklist

  • The output matches the skill's intended task and platform.
  • Required inputs, assumptions, and uncertainty are explicit.
  • Safety, scope, and source limits are respected.
  • The response follows the requested format or the skill's default output format.
  • The result is practical enough to use without another cleanup pass.

Generate a clean, professional 1280x640 social preview image for any GitHub repository and export it as a JPG under 1 MB.

Primary Triggers

Use this skill when the user starts with gsp, or asks to create a social preview or Open Graph image for a GitHub repository.

text
gsp <repo_url>
generate github social preview <repo_url>
create repo preview image <repo_url>
make social preview for <repo_url>
og image for <repo_url>

Expected Inputs

  • A GitHub repository URL (required)
  • Optionally: a custom tagline, theme preset, accent color, layout hint, logo, screenshot, or background art

Expected Outputs

  • File: github-social-preview.jpg
  • Size: exactly 1280x640 pixels
  • Format: JPEG
  • File size: under 1 MB (auto-recompressed if needed)

Workflow

Step 1 — Fetch repository metadata

Using the GitHub URL, retrieve:

  1. Repository name (from URL path)
  2. Repository description (from GitHub page or API)
  3. README content (for fallback description and keyword extraction)
  4. Topics / tags (from GitHub topics)
  5. Primary programming language
  6. Owner or organization name

Use the WebFetch tool to read the GitHub repository page. Parse the HTML or JSON response for description, topics, and language. If a raw README is needed, fetch https://raw.githubusercontent.com/<owner>/<repo>/main/README.md (try master if main returns 404).

Step 2 — Derive display content

Build the four visual elements from the metadata gathered:

ElementSourceFallback
TitleRepository name, formatted (replace hyphens/underscores with spaces, title case)Raw repo name
SubtitleRepository descriptionFirst sentence of README
TagsTopics list (up to 5 tags)Top keywords extracted from README or repo name tokens
Language badgePrimary languageOmit if unknown

If no description, README, or topics exist, generate a minimal clean design with the title only.

Step 3 — Generate the image

Run scripts/generate_preview.py with the derived content as arguments. The script:

  1. Creates a 1280x640 canvas with the configured background gradient
  2. Applies a theme preset or accent override when requested
  3. Optionally places a repo logo, screenshot, or background art when the assets are available
  4. Renders the GitHub-style Octicon logo mark in the top-left corner
  5. Fits or truncates long title, subtitle, and tag text cleanly
  6. Renders the title as the dominant H1 text
  7. Renders the subtitle as a smaller H2 line below the title
  8. Renders tag pills at the bottom
  9. Renders the language badge bottom-right if known
  10. Exports as JPEG at quality 92

Step 4 — Enforce size constraint

After generation, check the output file size.

  • If under 1 MB: done
  • If 1 MB or larger: re-run export at progressively lower JPEG quality (85, 75, 65, 55) until the file is under 1 MB
  • If still over 1 MB at quality 55: scale the canvas to 90% and retry from quality 92

Step 5 — Confirm output

Report back:

  • Full path to github-social-preview.jpg
  • Final file size
  • JPEG quality used
  • Any fallbacks applied (missing description, missing topics, etc.)
  • Preview checklist results for contrast, crop safety, and file size

Step 6 — Local preview checklist

Before finalizing the output, verify:

  • title contrast is strong enough against the background
  • subtitle contrast is still readable
  • key content stays inside a safe crop zone
  • final file size is under 1 MB

If one of these fails, adjust theme, accent, text length, or asset placement and regenerate.

Design Specification

See templates/design_config.json for the full color, font, and layout specification.

Summary:

  • Background: dark gradient (#0d1117 to #161b22), GitHub dark theme
  • Title: white, bold, 72pt equivalent
  • Subtitle: muted gray (#8b949e), 36pt equivalent
  • Tag pills: rounded rectangles, #21262d fill, #30363d border, #58a6ff text
  • Language badge: colored dot + label, bottom-right
  • GitHub mark: top-left, low-opacity white watermark
  • No decorative clutter, no gradients on text, no drop shadows

Theme presets now include:

  • github-dark
  • docs-blue
  • builder-green
  • launch-warm

Accent Color Selection

When the user does not specify a theme or accent, derive the accent from the repo's primary language so previews are recognizable at a glance:

LanguageAccent
PowerShell#012456 deep blue
Python#3776ab blue
JavaScript / TypeScript#f1e05a yellow / #3178c6 blue
C# / .NET#512bd4 purple
Go#00add8 cyan
Rust#dea584 amber
Shell#89e051 green

A user-provided accent or theme always wins over the language mapping. When the user mentions a brand color or pastes a hex value, use it directly and check title contrast against it.

Layout Variants

Pick the layout emphasis from what the repo is:

  • library or toolkit (default): title dominant, subtitle, tag pills, language badge
  • docs repo: subtitle gets more weight since the description is the value; fewer tags, no language badge
  • app or product: screenshot placement preferred when one is available, title moves to the left column

Infer the variant from topics and README signals, and say which variant was used in the confirmation output.

Batch Mode

When the user provides multiple repo URLs (gsp url1 url2 ... or a pasted list):

  • process each repo through the full workflow, reusing one theme across the set unless told otherwise so the previews look like a family
  • name outputs github-social-preview-<repo>.jpg instead of overwriting the default filename
  • report one summary table at the end: repo, file, size, quality, fallbacks applied
  • if one repo fails to fetch, continue the batch and report the failure rather than stopping

Fallback Behavior

ConditionBehavior
No repository descriptionUse first non-heading sentence from README
README missing or too shortInfer from repo name tokens and topics
No topicsExtract top 3-5 keywords from README headings or repo name
No language detectedOmit language badge entirely
No metadata at allRender title-only design with GitHub mark
Image over 1 MB after quality 55Scale canvas to 90% and retry
Long repo or tag textFit to width first, then truncate with ellipsis only if needed
Logo or screenshot availableAdd them only if they improve the layout without crowding the text

Limitations

  • Requires Python 3 with Pillow installed (pip install Pillow)
  • Font rendering depends on system fonts; the script falls back to Pillow's built-in font if no system font is found
  • Does not authenticate with the GitHub API; rate limits on public pages may apply
  • Topics are not always visible without authentication; the script falls back to README keywords if the topics section is empty
  • JPEG compression removes alpha channel; transparency is not supported in the output format
  • The generated image is saved to the current working directory as github-social-preview.jpg

Script Reference

text
scripts/generate_preview.py   — Main image generation and compression script
templates/design_config.json  — Color, font, and layout configuration
examples/example_usage.md     — Worked examples with sample outputs described

Help And Examples

If the user is not sure how to use this skill, asks what it needs, or asks for examples:

  • Explain in plain language what this skill can do.
  • Tell the user the minimum input needed for a useful first pass.
  • Show the example prompts below.
  • Offer the fastest next prompt the user can send.

Minimum useful input:

  • A GitHub repository URL. Theme or tagline is optional.

Example prompts:

  • gsp https://github.com/microsoft/winget-cli
  • Use github-social-preview to create a social preview image for this repo with a builder-green theme.
  • Show me an example prompt for generating an OG image from a GitHub repository URL.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Github Social Preview?

Generates a professional GitHub repository social preview image sized 1280x640 pixels as a JPG under 1 MB. Always trigger immediately when the user's message starts with "gsp". Also trigger on "generate github social preview", "create repo preview image", or any request to generate a social preview or OG image for a GitHub repository.

Навіщо використовувати Github Social Preview у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Github Social Preview — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Github Social Preview у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/mickpletcher/AI-Skills/tree/main/claude/skills/github-social-preview. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Github Social Preview?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Github Social Preview?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Github Social Preview — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Github Social Preview?

Так. Навичку опубліковано на GitHub: mickpletcher, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇