kit/plugins/social-media-tools/skills/share-code/SKILL.md
Generates platform-aware social copy and a dark-mode card image for code changes. Detects from git, picks a template, and screenshots via Playwright. Use when asked to post or share a code change.
npx skillsauth add shawn-sandy/agentics share-codeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Draft platform-aware social media copy and generate a styled dark-mode card image for any
supported platform (see $PLUGIN_DIR/references/platforms.md).
| Phase | Action |
|-------|--------|
| 0 — Locate | Locate templates/ and derive PLUGIN_DIR |
| 1 — Clarify | Auto-detect from git; ask platform + tone |
| 1c — Reuse check | Scan docs/media/social/ for existing posts; offer reuse |
| 2 — Draft | Write platform-aware copy |
| 3 — Pick template | diff → diff-card, feature → feature-card, insight → quote-card |
| 4 — Populate | Read template, substitute {{VARIABLES}} including {{COPY_PANELS}} |
| 4b — Save | Persistent save to docs/media/social/ |
| 5 — Screenshot | Serve HTML locally, Playwright screenshot |
| 6 — Deliver | Present copy + attach PNG + show saved path |
ExitPlanMode is a deferred tool. Only call it if currently in plan mode — skip this step entirely when not in plan mode. When calling: use ToolSearch with select:ExitPlanMode first, then call ExitPlanMode silently.
Run silently:
[ -n "${CLAUDE_PLUGIN_ROOT}" ] && [ -d "${CLAUDE_PLUGIN_ROOT}/templates" ] && \
echo "${CLAUDE_PLUGIN_ROOT}/templates"
find ~/.claude/plugins -path "*/social-media-tools/templates" -type d 2>/dev/null | head -1
find ~/.claude -path "*/social-media-tools/templates" -type d 2>/dev/null | head -1
Use the first non-empty result as TEMPLATES_DIR. Derive:
PLUGIN_DIR=$(dirname "$TEMPLATES_DIR")
If no directory is found: output "Templates not found. Install the plugin or load it with --plugin-dir." and STOP.
Check for SOCIAL.md (see $PLUGIN_DIR/references/social-config.md):
SOCIAL_CONFIG=""
GIT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)"
if [ -f "$PWD/SOCIAL.md" ]; then
SOCIAL_CONFIG="$PWD/SOCIAL.md"
elif [ -n "$GIT_ROOT" ] && [ -f "$GIT_ROOT/SOCIAL.md" ]; then
SOCIAL_CONFIG="$GIT_ROOT/SOCIAL.md"
fi
If found, Read it silently. Extract DEFAULT_PLATFORM, DEFAULT_TONE,
DEFAULT_HASHTAGS, FOCUS_AREAS, and AUDIENCE from the parsed sections.
These serve as defaults — user input in $ARGUMENTS always overrides them.
Run silently:
git diff HEAD~1 --stat 2>/dev/null | head -20
git log --oneline -5 2>/dev/null
head -30 CHANGELOG.md 2>/dev/null
diff-cardfeat: prefix or version bump → auto-select feature-cardDEFAULT_PLATFORM and DEFAULT_TONE from SOCIAL.md if available)AskUserQuestionFOCUS_AREAS are set, use them to pick the most relevant commit or
change as the card's angleAUDIENCE is set, use it to calibrate vocabulary and detail levelDEFAULT_HASHTAGS are set, append them per platform rules in Phase 2FILE_PREFIX=<detected-card-type> # diff, feature, or quote
Read $PLUGIN_DIR/references/reuse-check.md and follow its procedure.
Read $PLUGIN_DIR/references/platforms.md for character limits, tone defaults, the
Instructional Voice doctrine, Learn-More CTA rule, Default Per-Platform Copy
Formats, and Draft Copy — Standard Procedure (present → approve → store variants).
Takeaway-first: every post must surface a concrete, applicable takeaway — what the reader can learn or apply from this code change (a pattern, technique, pitfall avoided, or design principle). The diff or feature is evidence for the lesson, not the headline.
diff-card.html — code changes, rule updates, config diffs, PR descriptionsfeature-card.html — releases, new features, version announcements, changelogsquote-card.html — insights, opinions, pull quotes, teachable principlesCARD_TYPE=<chosen> # diff, feature, or quote
TEMPLATE_FILE=$TEMPLATES_DIR/${CARD_TYPE}-card.html
TEMP_HTML=code-share-card.html
FILE_PREFIX=$CARD_TYPE
SLUG_INPUT=<commit subject, filename, or feature title>
Read TEMPLATE_FILE. For variable reference, read $PLUGIN_DIR/references/variables.md.
For {{COPY_PANELS}} markup and escaping rules, read $PLUGIN_DIR/references/copy-panels.md.
Write the populated HTML to ~/.claude/tmp/code-share-card.html:
mkdir -p ~/.claude/tmp
Variables set in Phase 3: FILE_PREFIX, SLUG_INPUT, TEMP_HTML.
Read $PLUGIN_DIR/references/saving-and-delivery.md — Persistent Save section.
Read $PLUGIN_DIR/references/rendering-pipeline.md and follow the full pipeline.
Read $PLUGIN_DIR/references/saving-and-delivery.md — Deliver section.
development
Turns a React component into a social card with preview, code, and props table. Builds a static preview and screenshots react-card.html via Playwright. Use when asked to share a React component.
data-ai
Refine-prompt: interviews users and assembles a structured AI prompt using Anthropic best-practice techniques. Use when the user runs /plan-agent:refine-prompt or asks to refine a prompt.
development
Plan review Agent Team. Reviews HTML implementation plans in parallel, synthesizes findings, and applies improvements in place. Use when the user asks to review or improve an implementation plan.
data-ai
Craft-prompt: interviews users and assembles a structured AI prompt using Anthropic best-practice techniques. Use when the user runs /plan-agent:craft-prompt or asks to craft a prompt.