social-share-generator by kostja94/marketing-skills
npx skills add https://github.com/kostja94/marketing-skills --skill social-share-generator指导实现分享按钮,让用户将当前页面(文章、帖子、产品)分享到社交平台。区别于社交媒体资料链接(指向您品牌的 X、LinkedIn 等的页脚链接)——分享按钮分享的是_此_内容。
调用时:在首次使用时,如果合适,用 1-2 句话开场,说明此技能涵盖的内容及其重要性,然后提供主要输出。在后续使用或用户要求跳过时,直接进入主要输出。
数量更少、位置更优的按钮效果优于分散放置。 研究表明:移除 80% 的按钮,并将剩余的 20% 重新放置在情绪高点时刻,可以使分享操作的转化率提高 3 倍。
| 放置位置 | 最适合 | 备注 |
|---|---|---|
| 第一段之后 | 大多数文章 | 抓住快速阅读者;早期可见 |
| 粘性侧边栏 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 长文(桌面端) |
| 始终可见;考虑在移动端隐藏 |
| 标题/主图下方 | 短文 | 高可见度 |
| 文章末尾 | 所有 | 自然的完成点;可与行动号召搭配 |
| 文中(关键见解之后) | 长内容 | 放置在摩擦点(令人惊讶的数据之后,行动号召之前) |
避免:数十个图标;当受众只使用 2-3 个平台时,提供每个平台。选择 3-5 个与您受众匹配的平台(例如 B2B:X、LinkedIn;B2C:X、Facebook、WhatsApp)。
使用平台的分享/意图 URL,以便用户一键分享:
| 平台 | 分享 URL 模式 |
|---|---|
| X (Twitter) | https://twitter.com/intent/tweet?url={url}&text={text} |
https://www.linkedin.com/sharing/share-offsite/?url={url} | |
https://www.facebook.com/sharer/sharer.php?u={url} | |
https://wa.me/?text={url}%20{text} | |
| Telegram | https://t.me/share/url?url={url}&text={text} |
使用 encodeURIComponent() 对 url 和 text 进行编码。使用页面标题或预先写好的简短消息作为 text——带有预先写好消息的平台特定提示效果比通用图标好约 4 倍。
使用官方品牌素材。最小尺寸和颜色规则:
| 平台 | 最小尺寸 | 颜色 | 备注 |
|---|---|---|---|
| 16px | 蓝色 #1877F2 或单色 | 未经许可,不得旋转、动画 | |
| X (Twitter) | 32px | 仅限黑色或白色 | 使用当前的 X 徽标,而非已弃用的鸟形徽标 |
| 21px 高度 | 蓝色 #0A66C2 或单色 | 图标使用 "in" 徽标 | |
| 29×29px | 黑色、白色或官方渐变 | 社交图标使用字形 |
从官方品牌资源中心获取图标。过时或不合规的图标会降低感知的可分享性。
| 项目 | 指南 |
|---|---|
| 格式 | 首选 SVG(可缩放、体积小);PNG/WebP 需提供回退方案 |
| 性能 | 轻量级;避免使用拖慢 LCP 的重型分享插件 |
| 可访问性 | aria-label="在 X 上分享";支持键盘访问 |
| 移动端 | 触摸目标 ≥44×44px;在移动端考虑使用原生分享 API (navigator.share) |
在支持的浏览器上,navigator.share 允许用户通过系统对话框分享(包含更多应用)。在不支持时回退到意图链接:
if (navigator.share) {
navigator.share({ title, url, text }).catch(() => {});
} else {
window.open(shareUrl, '_blank', 'noopener');
}
每周安装量
184
仓库
GitHub 星标数
237
首次出现
2026年3月1日
安全审计
安装于
kimi-cli169
cursor169
gemini-cli168
codex168
github-copilot168
opencode168
Guides implementation of share buttons that let users share the current page (article, post, product) to social platforms. Distinct from social profile links (footer links to your brand's X, LinkedIn, etc.) — share buttons share this content.
When invoking : On first use , if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.
Fewer, better-placed buttons outperform scattered placement. Research: removing 80% of buttons and repositioning the remaining 20% at high-emotion moments can 3× conversion on share actions.
| Placement | Best For | Notes |
|---|---|---|
| After first paragraph | Most articles | Catches speed-readers; visible early |
| Sticky sidebar | Long-form (desktop) | Always visible; consider hiding on mobile |
| Below title / hero | Short posts | High visibility |
| End of article | All | Natural completion point; pair with CTA |
| Mid-article (after key insight) | Long content | Place at friction points (after surprising stat, before CTA) |
Avoid : Dozens of icons; every platform when audience uses 2–3. Choose 3–5 platforms that match your audience (e.g. B2B: X, LinkedIn; B2C: X, Facebook, WhatsApp).
Use platform share/intent URLs so users share with one click:
| Platform | Share URL pattern |
|---|---|
| X (Twitter) | https://twitter.com/intent/tweet?url={url}&text={text} |
https://www.linkedin.com/sharing/share-offsite/?url={url} | |
https://www.facebook.com/sharer/sharer.php?u={url} | |
https://wa.me/?text={url}%20{text} | |
| Telegram | https://t.me/share/url?url={url}&text={text} |
Encode url and text with encodeURIComponent(). Use page title or a short pre-written message for text — platform-specific prompts with pre-written messages perform ~4× better than generic icons.
Use official brand assets. Minimum sizes and color rules:
| Platform | Min size | Colors | Notes |
|---|---|---|---|
| 16px | Blue #1877F2 or monochrome | No rotation, animation without permission | |
| X (Twitter) | 32px | Black or white only | Use current X logo, not deprecated bird |
| 21px height | Blue #0A66C2 or monochrome | Use "in" bug for icons | |
| 29×29px | Black, white, or official gradient | Glyph for social icons |
Source icons from official brand resource centers. Outdated or non-compliant icons reduce perceived shareability.
| Item | Guideline |
|---|---|
| Format | SVG preferred (scalable, small); PNG/WebP with fallback |
| Performance | Lightweight; avoid heavy share plugins that slow LCP |
| Accessibility | aria-label="Share on X"; keyboard accessible |
| Mobile | Touch targets ≥44×44px; consider native share API (navigator.share) on mobile |
On supported browsers, navigator.share lets users share via system dialog (includes more apps). Fallback to intent links when unsupported:
if (navigator.share) {
navigator.share({ title, url, text }).catch(() => {});
} else {
window.open(shareUrl, '_blank', 'noopener');
}
Weekly Installs
184
Repository
GitHub Stars
237
First Seen
Mar 1, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
kimi-cli169
cursor169
gemini-cli168
codex168
github-copilot168
opencode168
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
113,700 周安装
承运商关系管理指南:资深运输经理的RFP、费率协商与绩效记分卡实战技巧
1,000 周安装
Claude API 使用指南:Python/TypeScript SDK 安装、模型选择与工具调用教程
1,000 周安装
Railway 文档助手 - 获取最新 Railway 平台部署、项目、定价等技术文档
1,000 周安装
Railway部署管理指南:列出、查看日志、重新部署与移除部署操作详解
1,000 周安装
UI/UX Pro Max - 智能设计助手:配色、字体、图表与最佳实践数据库
1,100 周安装
艺术家工作区搭建指南 - 快速创建智能体工作环境与目录结构
1,100 周安装