social-share-generator
When the user wants to add, optimize, or audit social share buttons (share article to X, LinkedIn, Facebook, etc.). Also use when the user mentions "share buttons," "social share," "share to X," "share to LinkedIn," "social sharing," "share icons," "share widget," "native share," "Web Share API," or "share intent URLs." For link previews, use open-graph.
Best use case
social-share-generator is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
When the user wants to add, optimize, or audit social share buttons (share article to X, LinkedIn, Facebook, etc.). Also use when the user mentions "share buttons," "social share," "share to X," "share to LinkedIn," "social sharing," "share icons," "share widget," "native share," "Web Share API," or "share intent URLs." For link previews, use open-graph.
Teams using social-share-generator should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/social-share/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How social-share-generator Compares
| Feature / Agent | social-share-generator | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
When the user wants to add, optimize, or audit social share buttons (share article to X, LinkedIn, Facebook, etc.). Also use when the user mentions "share buttons," "social share," "share to X," "share to LinkedIn," "social sharing," "share icons," "share widget," "native share," "Web Share API," or "share intent URLs." For link previews, use open-graph.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Components: Social Share Buttons
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.
## Scope
- **Share buttons**: Share current page URL to X, LinkedIn, Facebook, WhatsApp, etc.
- **Not** social profile links (e.g. "Follow us on X") — those live in footer/nav
## Why It Matters
- Websites with visible social share icons tend to see higher social engagement
- Share buttons amplify reach; Open Graph and Twitter Cards control preview — see **open-graph**, **twitter-cards**
## Placement (Article Pages)
**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).
## Share URLs (Intent Links)
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}` |
| **LinkedIn** | `https://www.linkedin.com/sharing/share-offsite/?url={url}` |
| **Facebook** | `https://www.facebook.com/sharer/sharer.php?u={url}` |
| **WhatsApp** | `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**.
## Platform Brand Guidelines (Icons)
Use official brand assets. Minimum sizes and color rules:
| Platform | Min size | Colors | Notes |
|----------|----------|--------|-------|
| **Facebook** | 16px | Blue #1877F2 or monochrome | No rotation, animation without permission |
| **X (Twitter)** | 32px | Black or white only | Use current X logo, not deprecated bird |
| **LinkedIn** | 21px height | Blue #0A66C2 or monochrome | Use "in" bug for icons |
| **Instagram** | 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.
## Design & Technical
| 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 |
## Native Share API (Mobile)
On supported browsers, `navigator.share` lets users share via system dialog (includes more apps). Fallback to intent links when unsupported:
```javascript
if (navigator.share) {
navigator.share({ title, url, text }).catch(() => {});
} else {
window.open(shareUrl, '_blank', 'noopener');
}
```
## Output Format
- **Placement** recommendation for page type
- **Platforms** to include (3–5)
- **Share URL** examples with placeholders
- **Icon** guidelines (size, source)
- **Accessibility** checklist
## Related Skills
- **article-page-generator**: Share buttons on article pages; placement after intro, end of article
- **blog-page-generator**: Share buttons on blog index and post cards
- **open-graph**: OG tags control share preview (og:image, og:title, etc.) — required for share buttons to show rich cards on Facebook, LinkedIn
- **twitter-cards**: Twitter Cards control X preview — required for share buttons to show rich cards when shared to X
- **footer-generator**: Footer has social *profile* links (Follow us); this skill is for *share* buttons (share this page)Related Skills
status-page-generator
When the user wants to create, optimize, or structure a status page. Also use when the user mentions "status page," "status.yourdomain.com," "uptime," "service health," "incident page," or "system status." For incident comms, use public-relations.
signup-login-page-generator
When the user wants to create, optimize, or audit signup and login pages. Also use when the user mentions "signup page," "login page," "registration page," "auth page," "sign up form," "create account," "student discount at signup," or "auth subdomain." For indexing/auth URLs, use indexing.
feedback-page-generator
When the user wants to create, optimize, or audit a feedback or roadmap page. Also use when the user mentions "feedback page," "roadmap," "feature requests," "vote on features," "Canny," "UserVoice," or "product feedback." For sitewide page planning, use website-structure.
disclosure-page-generator
When the user wants to create, optimize, or audit an affiliate, sponsor, or paid partnership disclosure page. Also use when the user mentions "disclosure," "affiliate disclosure," "sponsored content," "FTC disclosure," or "paid partnership." For sitewide page planning, use website-structure.
changelog-page-generator
When the user wants to create, optimize, or structure a changelog or release notes page. Also use when the user mentions "changelog," "release notes," "what's new," "updates," "product updates," "version history," or "changelog.yourdomain.com." For sitewide page planning, use website-structure.
use-cases-page-generator
When the user wants to create, optimize, or audit use case pages. Also use when the user mentions "use cases," "use case page," "for [role]," "by persona," "by scenario," "by business goal," "ICP pages," or "audience-specific pages." For sitewide page planning, use website-structure.
startups-page-generator
When the user wants to create, optimize, or audit a startups, education, or special program page. Also use when the user mentions "startups program," "for startups," "education discount," "student plan," "for students," or "special pricing." For education discounts, use education-program.
solutions-page-generator
When the user wants to create, optimize, or audit solutions pages. Also use when the user mentions "solutions," "solutions page," "by industry," "industry solutions," "by company size," "SMB," "enterprise," "by outcome," "business outcomes," or "how we solve X." For sitewide page planning, use website-structure.
showcase-page-generator
When the user wants to create, optimize, or audit a showcase or gallery page for user-generated content. Also use when the user mentions "showcase," "gallery," "user work," "UGC," "creator showcase," "examples," or "made with [product]." For social proof components, use testimonials-generator.
services-page-generator
When the user wants to create, optimize, or audit a services page. Also use when the user mentions "services page," "what we offer," "service offerings," "consulting services," "service page," "offerings page," "service catalog," or "professional services." For sitewide page planning, use website-structure.
products-page-generator
When the user wants to create, optimize, or audit a product listing or category page. Also use when the user mentions "product page," "product listing," "shop," "e-commerce products," "product catalog," "product grid," "product cards," or "product overview." For category SEO, use category-page-generator.
pricing-page-generator
When the user wants to create, optimize, or audit pricing page content and structure. Also use when the user mentions "pricing page," "pricing table," "plans," "subscription," "pricing plans," "pricing tiers," "pricing comparison," "SaaS pricing," "enterprise pricing," "API pricing," "contact sales," "pricing in nav," "public pricing," "hide pricing," or "pricing objection handling." For pricing strategy, use pricing-strategy.