Centralize the user-confirmation gate inside security-scrub so every caller automatically pauses for review after a scan — auto-proceeding only when the result is a clean PASS with zero findings, and hard-stopping (no Continue option) on any BLOCKED result.
add-security-scrub-user-gate.html
docs/plans/add-security-scrub-user-gate.html
Context
The security-scrub skill lives in kit/plugins/social-media-tools/skills/security-scrub/SKILL.md. It scans content for secrets and emits a structured SCRUB RESULT block, then stops. Five callers depend on it: share-session, share-github, share-selection, share-project, and share-scan.
In v2.3.2, a user-confirmation prompt was added directly inside share-session (lines 187–188). The other four callers have no gate at all, so a BLOCKED or WARN result silently allows sharing to continue. The fix was partial — every caller must now implement its own gate independently, leading to divergence and future drift.
Moving the gate into security-scrub itself enforces it uniformly for all callers. For the "auto-trigger" use case: when the result is a clean PASS (no findings whatsoever), the skill proceeds without prompting — this is the automatic continuation path. Any findings (LOW, MEDIUM, or HIGH) pause for explicit user input before returning.
Steps
AskUserQuestion to allowed-tools in security-scrub/SKILL.md
allowed-tools prevents a mid-run permission prompt; without it the harness blocks execution until the user manually approves.Verify
head -6 kit/plugins/social-media-tools/skills/security-scrub/SKILL.md and confirm AskUserQuestion appears in the allowed-tools: line alongside the existing Bash, Read, Grep entries.security-scrub skill body with four result-driven branches
Verify
Read the updated SKILL.md and confirm Step 6 is present with all four branches:
- BLOCKED (any HIGH finding or ALLOWLIST verdict BLOCKED) — hard stop message, no
AskUserQuestioncall, skill returns immediately. - WARN (MEDIUM finding, no HIGH) —
AskUserQuestionwith caution language; options: "Continue anyway" / "Cancel — stop here". - PASS with LOW findings —
AskUserQuestionwith informational note; options: "Continue" / "Cancel". - PASS with no findings — no prompt; skill states "Clean — auto-proceeding" and returns normally.
AskUserQuestion gate from share-session/SKILL.md Phase 2
share-session already calls security-scrub via Skill(); with the gate now inside the skill, leaving it in share-session too would double-prompt the user on every scrub.Verify
kit/plugins/social-media-tools/skills/share-session/SKILL.md and confirm lines referencing PASS → use AskUserQuestion (currently lines 187–188) are removed. Both the PASS → use AskUserQuestion instruction and the adjacent "BLOCKED = hard stop" documentation must also be removed — both are now enforced inside security-scrub and are redundant in the caller.social-media-tools to v2.4.0 in .claude-plugin/marketplace.json and add a CHANGELOG entry
.claude/rules/marketplace.md. Current version is 2.3.2.Verify
python3 -c "import json; d=json.load(open('.claude-plugin/marketplace.json')); print(next(p['version'] for p in d['plugins'] if p['name']=='social-media-tools'))" from the repo root and confirm it prints 2.4.0. Open kit/plugins/social-media-tools/CHANGELOG.md and confirm a v2.4.0 entry exists at the top.Verify
git status and confirm a clean working tree. Run git log -1 --oneline and confirm the commit message is a conventional commit of type feat(kit/plugins/social-media-tools) referencing the user gate change.Acceptance Criteria
Verification
Read kit/plugins/social-media-tools/skills/security-scrub/SKILL.md end-to-end and confirm Step 6 is present with all four branches (BLOCKED hard-stop, WARN gate, PASS-with-LOW gate, PASS-clean auto-continue). Confirm AskUserQuestion is in allowed-tools.
Read kit/plugins/social-media-tools/skills/share-session/SKILL.md Phase 2 and confirm the AskUserQuestion post-scrub instruction is removed.
Run the marketplace version check command from Step 4 and confirm it prints 2.4.0. Check the CHANGELOG for the v2.4.0 entry. Run git log -1 --oneline and confirm a single clean commit contains all four changed files: security-scrub/SKILL.md, share-session/SKILL.md, marketplace.json, CHANGELOG.md, and this plan file.