kit/plugins/social-media-tools/skills/scan-for-shares/SKILL.md
Scans git history or a codebase path for shareable code. Drafts social media prompts for code-share or digest generation from recent commits. Use when the user asks to find commits worth sharing, create a code digest, or generate a post.
npx skillsauth add shawn-sandy/agentics scan-for-sharesInstall 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.
Discover shareable code, scrub for secrets, and draft code-share prompts. Writes a digest file the user reviews before posting.
| Arguments | Mode | Source |
|-----------|------|--------|
| (default) | History | git log on current branch |
| --codebase <path> | Codebase | Read/Glob on given path |
Parse $ARGUMENTS:
--days=N — how far back to scan (default: 7, history mode only)--base=BRANCH — base branch for diff (auto-detect main or master if omitted, history mode only)--max=N — max candidates before scoring (default: 20)--codebase <path> — activates codebase mode; value is the path to scan--background — skip interactive review gate (auto-include PASS, auto-exclude BLOCKED/WARN)Guard (history mode only): run git rev-parse --git-dir 2>/dev/null — if it fails, output:
Not a git repository. Run from a git repo root or use --codebase <path> for codebase mode.
Then stop.
# By time window
git log --oneline --after="N days ago" --format="%H %s" HEAD
# By branch delta (deduplicate with above)
git log --oneline [base]..HEAD --format="%H %s"
Deduplicate by hash. For each unique hash get stats:
git show --stat --format="" [hash]
(git show handles root commits safely; git diff [hash]~1 fails when there is no parent.)
Limit to --max candidates before scoring.
Use Glob to find source files under the given path (exclude: node_modules, .git, dist, build, *.min.js, *.map, lock files).
For each file use Read to load content. Collect {file_path, excerpt} as the candidate unit (excerpt = first 100 lines or the most interesting block).
Read the references/interesting-patterns.md file adjacent to this SKILL.md to load the current scoring table.
Include candidates with score ≥ 2. If fewer than 3 qualify, fill up with score ≥ 1 candidates until you have 3 (or exhaust the list).
For each candidate:
git show --format="" -U3 [hash]security-scrub skill on the content.SCRUB RESULT: BLOCKED or ALLOWLIST verdict: BLOCKED → remove candidate, note reasonSCRUB RESULT: WARN → keep but flag as ⚠ WARN in the digestCandidates that were BLOCKED are excluded from the digest entirely. WARN candidates appear with a warning label.
Before building digest entries, check docs/media/social/ for already-saved posts that match each candidate. This prevents surfacing content that has already been shared.
MEDIA_DIR="${PWD}/docs/media/social"
For each candidate:
tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g') and check if any file in $MEDIA_DIR contains those tokens: ls "$MEDIA_DIR" 2>/dev/null | grep -i "<slug-tokens>"If a match is found, mark the candidate with SAVED=true and the matching file path SAVED_PATH.
In background mode (--background): auto-skip SAVED candidates (exclude them from the digest entirely; they are already shared).
In interactive mode: include SAVED candidates but tag them with [SAVED] in the review gate options and in the digest output.
For each surviving candidate, build a structured entry using the card-type decision tree and platform heuristics from references/interesting-patterns.md:
### [N]. <subject>
- **Source:** `<commit hash>` or `<file path>`
- **Card type:** <feature-card | diff-card | quote-card>
- **Platform:** <LinkedIn | Twitter/X | Bluesky>
- **Summary:** <one sentence describing what makes this shareable>
- **Key change / highlight:** <the most interesting line or pattern>
- **Security:** PASS ✓ (or ⚠ WARN — <reason>)
- **Already saved:** [SAVED: `docs/media/social/{filename}`] (omit this line if not saved)
- **code-share prompt:**
/code-share:code-share <card-type> for <platform>: <description>
--background absent)Present all PASS and WARN candidates in a single AskUserQuestion call with multiSelect: true. Options list each candidate by number and subject. Include a note on any WARN entry.
Ask: "Which entries should go into the digest?" — options are the candidates, plus "None — discard all".
Use only the user-selected entries in the final digest.
--background present)Auto-include all PASS entries. Auto-exclude all BLOCKED and WARN entries. Skip the AskUserQuestion call entirely.
mkdir -p .claude/digests
Write the digest to .claude/digests/code-digest-YYYY-MM-DD.md using today's date. The file contains the selected entries from Step 5 plus a header:
# Code Digest — YYYY-MM-DD
Mode: <history (last N days) | codebase (path)>
Generated: <timestamp>
Entries: <count>
---
<entries>
Report the output path and entry count to the user.
STOP. Do not invoke code-share automatically. The user reviews the digest and picks which prompts to run.
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.