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
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.