Token导航 LogoToken导航TokenDH.com
待分类权限需确认github未标认证来源可访问许可证需确认审计未展示

github-social-previewGitHub social preview 工具

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

194

周安装

8

GitHub Stars

28

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:github-social-preview(GitHub social preview 工具)
来源仓库:https://github.com/laurigates/claude-plugins
仓库路径:skills/github-social-preview
安装命令:
npx skills add https://github.com/laurigates/claude-plugins --skill github-social-preview
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill github-social-preview

简介

生成 GitHub 仓库社交分享预览图的实用工具。

  • 自动提取 README 关键信息生成缩略图。
  • 提升开源项目在社交媒体的传播效果。
  • 图片缓存策略影响实时更新及时性。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • github-social-preview 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

created
2025-12-16
modified
2026-02-06
reviewed
2025-12-16
name
github-social-preview
description
Generate 1280x640 PNG social preview images for GitHub repositories using nano-banana-pro. Use when user mentions social preview, Open Graph image, or needs repository images for social media sharing.
user-invocable
false
allowed-tools
Bash, Read, Grep, Glob

GitHub Social Preview Image Generator

Generate professional social preview images for GitHub repositories. These images appear when repository links are shared on social media platforms like Twitter, LinkedIn, Slack, and Discord.

Requirements

This skill piggybacks on the nano-banana-pro skill for image generation. Ensure:

  • GOOGLE_API_KEY or GEMINI_API_KEY is set
  • Dependencies: pip install google-genai Pillow (or use uv run)

GitHub Specifications

RequirementValue
Minimum dimensions640 × 320 pixels
Recommended dimensions1280 × 640 pixels
Aspect ratio2:1 (width:height)
File formatsPNG, JPG, GIF
Max file size1 MB
TransparencySupported (PNG only)

Best Practices for Social Previews

Design Guidelines

  1. Keep it simple: Social previews appear at various sizes; complex details get lost
  2. Bold text/titles: If including text, make it large and readable at thumbnail size
  3. Brand consistency: Use project colors, logos, or mascots
  4. High contrast: Ensure visibility in both light and dark modes
  5. Safe zone: Keep important content away from edges (10-15% margin)

Content Suggestions

  • Project name/logo: Primary visual identifier
  • Brief tagline: What the project does in 3-5 words
  • Visual metaphor: Icon or illustration representing functionality
  • Brand colors: Consistent with README badges or documentation

Transparency Considerations

PNG transparency can be beneficial for dark mode, but test against:

  • White backgrounds (default Twitter, LinkedIn)
  • Dark backgrounds (Discord, Slack dark mode)
  • Colored backgrounds (various platforms)

Usage

Quick Generation

# Generate a social preview for your repository
uv run python .claude/scripts/nano_banana_pro.py \
  "Professional GitHub social preview image for [PROJECT NAME]: [DESCRIPTION]. \
   Modern, clean design with bold typography. Tech-focused aesthetic. \
   Include visual elements representing [KEY FEATURE]. \
   Optimized for social media sharing." \
  --aspect 16:9 \
  --resolution 2K \
  --output social-preview.png

Note: Use 16:9 aspect ratio (closest to 2:1) for optimal display.

Prompt Templates

Developer Tool / CLI

Professional GitHub social preview for a developer tool called "[NAME]".
Modern terminal aesthetic with code-inspired elements.
Bold, readable project name. Dark background with syntax highlighting colors.
Clean, minimalist design suitable for social media sharing.

Library / Framework

GitHub social preview for "[NAME]" - a [LANGUAGE] library for [PURPOSE].
Abstract geometric patterns representing [CONCEPT].
Project name in bold modern typography.
Professional tech aesthetic with gradients.

Application / Service

Social preview image for "[NAME]" application.
Illustrate the core functionality: [DESCRIPTION].
Clean UI mockup or abstract representation.
Vibrant colors with professional polish.

Data / ML Project

GitHub preview for "[NAME]" - [DESCRIPTION].
Data visualization or neural network inspired graphics.
Modern scientific aesthetic with clean typography.
Blue and purple color scheme.

With Reference Image (Style Transfer)

If you have an existing brand image or style reference:

uv run python .claude/scripts/nano_banana_pro.py \
  "GitHub social preview in the style of the reference. \
   Include project name '[NAME]' prominently. \
   Maintain brand consistency." \
  --aspect 16:9 \
  --resolution 2K \
  --reference brand-logo.png \
  --output social-preview.png

Post-Generation Steps

1. Verify Dimensions

# Check image dimensions
magick identify social-preview.png
# Should show: 1280x640 or similar 2:1 ratio

2. Resize if Needed

# Resize to exact GitHub recommended dimensions
magick social-preview.png -resize 1280x640! github-preview.png

# Or resize maintaining aspect ratio (adds letterboxing)
magick social-preview.png -resize 1280x640 \
  -gravity center -background '#1a1a1a' \
  -extent 1280x640 github-preview.png

3. Optimize File Size

# Optimize PNG (must be under 1MB)
magick social-preview.png -strip -quality 95 optimized-preview.png

# Check file size
ls -lh optimized-preview.png

4. Preview in Context

Before uploading, preview how the image will appear:

  • Open in browser at small sizes (200px, 400px width)
  • Test on light and dark backgrounds
  • Verify text is readable

Uploading to GitHub

  1. Navigate to repository Settings
  2. Scroll to Social preview section
  3. Click EditUpload an image
  4. Select your optimized PNG file
  5. Click Save

The preview may take a few minutes to propagate across platforms.

Example Workflow

# 1. Generate the image
uv run python .claude/scripts/nano_banana_pro.py \
  "GitHub social preview for 'dotfiles' - a cross-platform configuration manager. \
   Show abstract connected nodes representing configuration sync. \
   Modern dark theme with blue accents. Bold 'dotfiles' text." \
  --aspect 16:9 \
  --resolution 2K \
  --output generated/social-preview.png

# 2. Resize to exact dimensions
magick generated/social-preview.png \
  -resize 1280x640^ \
  -gravity center \
  -extent 1280x640 \
  social-preview-final.png

# 3. Verify size (must be < 1MB)
ls -lh social-preview-final.png

# 4. Check dimensions
magick identify social-preview-final.png

Troubleshooting

Image not displaying on social media

  • Clear platform cache (Twitter has a card validator)
  • Ensure repository is public (private repos can't share previews)
  • Wait 5-10 minutes for propagation

File too large

# Reduce quality
magick social-preview.png -quality 85 -strip smaller.png

# Convert to JPEG (smaller but no transparency)
magick social-preview.png -quality 85 preview.jpg

Text not readable at small sizes

  • Increase font size in prompt
  • Simplify design
  • Use high contrast colors
  • Consider removing text entirely

When to Use This Skill

Use this skill when...Use other skills instead when...
Creating or refreshing a repository's social preview imageGenerating arbitrary images from a text prompt — use nano-banana-pro directly
Producing project thumbnails for documentationResizing or optimizing an existing image — use imagemagick-conversion
Generating Open Graph images for GitHub PagesProducing complex illustrations or pixel-perfect layouts (use a dedicated design tool)
You want repo metadata (name, language, description) auto-fed into the promptProducing animated GIF previews (use video editing tools)

Related Skills

  • nano-banana-pro - Core image generation capability
  • imagemagick-conversion - Image resizing and optimization
  • git-repo-detection - Detect repository context for automated prompts

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.04%
按下载量换算21

Claude

32.17%
按下载量换算20

Cursor

17.95%
按下载量换算11

Gemini CLI

9.74%
按下载量换算6

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills