kit/plugins/social-media-tools/skills/security-scrub/SKILL.md
Scans code and diffs for secrets and sensitive data. Detects credentials, tokens, and PII to prevent leaks before sharing. Use when the user asks to check for secrets or review a diff for leaks.
npx skillsauth add shawn-sandy/agentics security-scrubInstall 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.
Scan content for secrets and sensitive data. Produces a structured SCRUB RESULT block that callers must check before proceeding.
Six mandatory steps — none can be skipped. The caller (human or skill) provides the content to scan either as inline text or a file path.
Read the references/scrub-rules.md file adjacent to this SKILL.md to get the current pattern table, file-path block list, and masking format.
Run Grep against the content for HIGH, MEDIUM, and LOW patterns from the table. Also check any file paths referenced in the content against the file-path block list.
Key regex groups to scan:
sk-[A-Za-z0-9]{20,}
ghp_[A-Za-z0-9]{36}
ghs_[A-Za-z0-9]{36}
AKIA[A-Z0-9]{16}
xoxb-[0-9]{11}-[0-9]{11}-[A-Za-z0-9]{24}
xoxp-[A-Za-z0-9-]{72,}
eyJ[A-Za-z0-9_-]{20,}\.eyJ
[A-Z_]{3,}=[[:alnum:]_-]{32,}
password\s*[=:]\s*\S{4,}
secret\s*[=:]\s*\S{4,}
token\s*[=:]\s*\S{8,}
api_key\s*[=:]\s*\S{8,}
For the private-key pattern (-----BEGIN ...), pass via -e to avoid the leading dash being parsed as a grep option:
grep -E -e '-----BEGIN (RSA|EC|OPENSSH|PGP) PRIVATE KEY'
File path patterns to block: .env, credentials, id_rsa, .pem, ~/.ssh/, ~/.aws/credentials
Classify each match as HIGH / MEDIUM / LOW per the pattern table in references/scrub-rules.md.
BLOCKEDWARNPASS; list findings as informational notesPASSFor any matched value: show first 4 chars + *** + last 4 chars.
Example: sk-abcdefgh1234wxyz → sk-a***wxyz
Never output unmasked secret values.
Output exactly this block (fill in the brackets):
SCRUB RESULT: [PASS | BLOCKED | WARN]
---
Findings:
- [HIGH|MEDIUM|LOW] <pattern-name>: <masked-value> (line N)
ALLOWLIST verdict: [PASS | BLOCKED]
Reason: <one sentence>
If no findings, output:
Findings: none
ALLOWLIST verdict: BLOCKED when the content originates from a blocked file path (see file-path block list). This overrides SCRUB RESULT: PASS.
Callers must treat SCRUB RESULT: BLOCKED or ALLOWLIST verdict: BLOCKED as a hard stop — do not proceed with sharing.
After emitting the SCRUB RESULT block, apply the appropriate gate based on the result. Emit a GATE RESULT line at the end so callers have a machine-readable signal.
BLOCKED (SCRUB RESULT: BLOCKED or ALLOWLIST verdict: BLOCKED):
AskUserQuestion.GATE RESULT: BLOCKED — hard stop. Sharing is not permitted.WARN (MEDIUM findings, no HIGH):
AskUserQuestion with one question:
Security warningThe security scan found potential issues (see MEDIUM findings above). Are you sure you want to continue?Continue anyway (description: "Proceed despite warnings — review findings first") / Cancel — stop here (description: "Abort sharing; no content will be sent")GATE RESULT: CANCELLED — user declined to proceed. and return.GATE RESULT: APPROVED. and return.PASS with LOW findings only:
AskUserQuestion with one question:
Scrub passedSecurity scan passed with informational notes (see LOW findings above). Continue?Continue (description: "Proceed with sharing") / Cancel (description: "Abort sharing")GATE RESULT: CANCELLED — user declined to proceed. and return.GATE RESULT: APPROVED. and return.PASS with no findings:
AskUserQuestion.GATE RESULT: APPROVED (clean — auto-proceeding).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.