kit/plugins/social-media-tools/skills/social-share/SKILL.md
Social media share router — classifies content type and runs the right skill. Dispatches to the right share-* skill based on content type. Use when asked to share what you're working on.
npx skillsauth add shawn-sandy/agentics social-shareInstall 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.
Route a natural-language share request to the right social media workflow.
| Phase | Action |
|-------|--------|
| 0 — Locate | Locate templates/ and derive PLUGIN_DIR |
| 1 — Classify | Identify content type using first-match-wins rules |
| 2 — Capture | For code selections: write code to a temp file before dispatching |
| 3 — Defaults | Resolve --platform and any extra flags |
| 4 — Dispatch | Exit plan mode silently; invoke target skill directly via Skill(...) |
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 not found: output "Templates not found. Install the plugin or load it with --plugin-dir." and STOP.
Check for a SOCIAL.md at the project root (see $PLUGIN_DIR/references/social-config.md
for format details):
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 SOCIAL_CONFIG is non-empty, Read it silently. Extract:
DEFAULT_PLATFORM from ## Defaults → Platform: lineDEFAULT_TONE from ## Defaults → Tone: lineFOCUS_AREAS from ## Focus bullet listAUDIENCE from ## Audience sectionThese values inform the router's platform resolution in Phase 3. Downstream
skills also load SOCIAL.md independently via their own Phase 0b, so the
router does not need to forward all fields — only --platform is passed
as a dispatch flag.
Evaluate rules top-to-bottom; first match wins. Do not ask the user anything.
| # | Condition on $ARGUMENTS or session context | Target | Extra flags |
|---|----------------------------------------------|--------|-------------|
| 1 | URL matching github\.com/.*/blob/ or raw\.githubusercontent\.com/ | share-github | --source=<url> |
| 2 | URL matching youtube\.com, youtu\.be, or vimeo\.com | share-video | --source=<url> |
| 3 | Any other https?:// URL or a path ending .md/.mdx/.markdown | share-blog | --source=<url-or-path> |
| 4 | File path ending .tsx or .jsx in the message/arguments, or IDE context's highlighted selection or open file is a .tsx/.jsx file, or a pasted fenced block is tagged tsx/jsx — and the source defines a React component (a function/class component, or a default/named export that returns JSX). Non-component .tsx/.jsx — tests (*.test.*/*.spec.*), Storybook stories (*.stories.*), route modules, hooks-only or utility files, arbitrary JSX fragments — does not match and falls through to rule 5 (share-selection) | share-react | --source=<path> when a concrete path is known; otherwise (none) — share-react captures selection/paste itself |
| 5 | Fenced code block (```) present in the message, or IDE context includes a highlighted selection or open code file | share-selection | --code-file= + --objective= (see Phase 2) |
| 6 | Matches: launch, release, shipped, announcing, went live, or v\d | share-project | --topic=release |
| 7 | Matches: progress, update, working on, lately, this week, building | share-project | --topic=features |
| 8 | Matches: browse, library, saved posts, prior post, media library, my posts, gallery, view shares | media-library | (none) |
| 9 | Matches: explain, how does, how do, how it works, what is, what does, describe — unless the phrase also contains my session, session recap, session summary, session stats, this session, what I worked on, what I did, tokens today, or usage today (those fall through to rule 10) | share-explanation | EXTRA_FLAGS = $ARGUMENTS with only the --platform=... token removed; all other text and flags (including --tone, the query text, etc.) are forwarded as-is. Phase 3 then prepends --platform=<PLATFORM> to avoid duplicates. |
| 10 | Matches: my session, session recap, session summary, session stats, tokens today, usage today, this session, what I worked on, what I did today, or standalone session | share-session | (none) |
| 11 | Fallback A — git diff has changes: git rev-parse --git-dir 2>/dev/null && git diff HEAD~1 --stat 2>/dev/null \| grep -c . returns a positive integer | share-code | (none) |
| 12 | Fallback B — nothing else matched | share-project | --topic=changes |
If no rule 1–10 matched and no git repository exists and no source URL/code was provided: output
social-share: nothing to share — no git repository and no source provided. and STOP.
Set TARGET_SKILL and EXTRA_FLAGS from the matching row before continuing.
If rule 5 matched:
Extract CODE_RAW from the matched source:
Infer OBJECTIVE from the user's prompt (e.g. "highlight the perf win" → "highlight the performance win"). If not inferable from the prompt, use "demonstrate this code".
Write CODE_RAW to a temp file:
mkdir -p ~/.claude/tmp
Write the raw code content to ~/.claude/tmp/social-share-selection.txt.
EXTRA_FLAGS="--code-file=~/.claude/tmp/social-share-selection.txt --objective=<OBJECTIVE>".Set PLATFORM using this priority:
$ARGUMENTS (e.g. "post to twitter" → twitter)DEFAULT_PLATFORM from SOCIAL.md (if loaded in Phase 0b)all (fallback)For the canonical platform name list, see $PLUGIN_DIR/references/platforms.md.
--platform=<value>.Build DISPATCH_FLAGS:
--platform=<PLATFORM> <EXTRA_FLAGS>
For share-project, also include --topic=<value> from Phase 1:
--topic=<value> --platform=<PLATFORM>
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.
Invoke the target skill directly:
Skill(skill: "social-media-tools:<TARGET_SKILL>", args: "<DISPATCH_FLAGS>")
Wait for the skill to complete and report its output to the user.
development
Checks whether the branch's PR is ready and merges it when green. Runs the readiness gate, lint, and an approval prompt. Use when the user asks "merge?" or if a PR is ready to merge.
development
Implements a plan file that already exists. Walks its steps, ticks the spec, re-renders, and runs the completion gates. Use when asked to implement an existing plan.
development
Audits and optimizes CLAUDE.md project memory files. Checks adherence to Claude Code best practices and produces actionable fixes. Use when the user asks to audit, optimize, or diagnose a CLAUDE.md.
development
Converts an HTML artifact or Markdown file into a draft post for a static site. Scopes CSS to keep interactive blocks alive and escapes prose for MDX. Use when asked to turn an artifact into a post.