github-social-preview

Generate 1280x640 GitHub social preview JPEGs from repository URLs.

14|2|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/mickpletcher/AI-Skills --skill github-social-preview
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-social-preview
Source: https://github.com/mickpletcher/AI-Skills/tree/main/claude/skills/github-social-preview
Command: npx skills add https://github.com/mickpletcher/AI-Skills --skill github-social-preview

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

GitHub repos often show a generic or missing social preview when shared, so links look unprofessional and get less engagement; this skill generates a correct branded 1280x640 Open Graph image directly from a repository URL.

Core Features & Use Cases

  • Auto-fetches repo metadata: Pulls repo name, description (with README fallback), topics (with README keyword fallback), owner/org, and primary language when available.
  • Produces GitHub-ready output: Exports a JPEG sized to GitHub’s social preview dimensions (1280x640) and ensures it stays under 1 MB via recompression and optional scaling.
  • Theme presets and layout rules: Supports multiple theme presets (including GitHub dark, docs-blue, builder-green, launch-warm) and smart text fitting with truncation to keep things readable.
  • Optional richer visuals: Can include optional logo, screenshot, or background art when provided, with graceful fallbacks if assets are missing.

Quick Start

Use the github-social-preview skill by starting your message with gsp followed by a GitHub repository URL.

Frequently Asked Questions about github-social-preview

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a GitHub social preview image from a repository URL?

To generate a GitHub social preview, provide a repository URL to trigger the workflow. It fetches repository metadata like name, description, topics, and primary language to create a branded 1280x640 JPEG image.

Does the generated Open Graph image meet GitHub's 1MB file size constraint?

Yes, the generated Open Graph image stays under 1 MB. The workflow enforces this file-size constraint by applying recompression and optional scaling to the exported 1280x640 JPEG.

What happens if my GitHub repository is missing a description or topics?

If repository description or topics are missing, the generator uses defined fallbacks. It pulls text from the README to ensure the social preview image still contains relevant context.

Can I customize the theme of my GitHub social preview image?

You can customize the social preview using theme presets like GitHub dark, docs-blue, builder-green, and launch-warm. The generator applies smart text fitting and truncation to keep things readable.

How do I add a logo or screenshot to my repository's Open Graph image?

You can include optional richer visuals like a logo, screenshot, or background art. The generator gracefully falls back to standard text layouts if these optional assets are missing.