share-selection

Converts selected or pasted code into platform-aware social copy and dark-mode card images.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/shawn-sandy/agentics-kit --skill share-selection-shawn-sandy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: share-selection
Source: https://github.com/shawn-sandy/agentics-kit/tree/main/kit/plugins/social-media-tools/skills/share-selection
Command: npx skills add https://github.com/shawn-sandy/agentics-kit --skill share-selection-shawn-sandy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Sharing code on social media requires manually writing platform-specific copy, scrubbing secrets, and creating presentable visuals. This Skill automates that pipeline for code you have selected, highlighted, or pasted. ## Core Features & Use Cases - Selection-driven capture: Uses highlighted lines, the open file, or pasted code as the source, with guards against non-code files and oversized snippets. - Security scrub gate: Runs a secrets scan on the code before anything is rendered, blocking publication if credentials are detected. - Platform-aware copy and cards: Drafts copy tailored to LinkedIn, Twitter/X, Bluesky, or Substack, then populates a snippet-card or diff-card HTML template and screenshots it via Playwright. - Use Case: Highlight a function in your editor, ask to share it on Twitter/X, and receive a scrubbed, objective-framed post plus a PNG card saved to docs/media/social/. ## Quick Start Ask the assistant to share the currently selected code as a Twitter/X post with a card image.

Frequently Asked Questions about share-selection

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

FAQPage Schema
How do I share selected code as a social media post?▼

Highlight lines in your editor or paste a fenced code block, then ask to share it on a target platform. The skill captures the code, scrubs secrets, drafts platform-specific copy, and renders a card image via Playwright.

How does the skill prevent leaking secrets in shared code?▼

Selected code is written to a temp file and passed to a security-scrub skill before rendering. If the gate returns BLOCKED or CANCELLED, the workflow stops and nothing is published or rendered.

Which social platforms does the code card support?▼

Copy is drafted for LinkedIn, Twitter/X, Bluesky, and Substack, each with its own length limits, tone, and framing rules defined in the plugin's platforms reference. The card image itself is platform-agnostic.

Can I share a diff instead of a code snippet?▼

Yes. The skill classifies the input as diff-like when lines start with + or - or contain @@ hunk headers, then renders a diff-card template with addition and deletion stats instead of a snippet card.

What happens if the selected file is too long or not code?▼

Non-code files such as binaries, lockfiles, or minified bundles are rejected with a request to pick a code file. Files over roughly 80 lines prompt you to choose a region, since the snippet card caps at about 80 lines.