safe-push

safe-push is a cursor rule for Cursor from thatrebeccarae/claude-marketing. It costs 59 tokens per session (3,206 once invoked), scanned B, original, MIT.

A Git pre-push checklist that scans repository changes and commit messages for personal information, secrets, sensitive data, and repository-specific blocked patterns before sending code to GitHub.

In plain words
What is it for?
Useful before pushing code to GitHub, particularly public repositories, to inspect the target repository, scan the diff and commit messages, and limit push frequency.
Why use it?
It reduces the chance of publishing private data or triggering GitHub abuse controls during a push, especially for public repositories.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: reads .claude/ paths.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/thatrebeccarae/claude-marketing/safe-push
Clone the repo
git clone --depth 1 https://github.com/thatrebeccarae/claude-marketing

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for safe-push

README.md
[![agentmods](https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/safe-push.svg)](https://agentmods.dev/rules/thatrebeccarae/claude-marketing/safe-push)
Your own site
<a href="https://agentmods.dev/rules/thatrebeccarae/claude-marketing/safe-push"><img src="https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/safe-push.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,206 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.03206
Opus 5 $0.00030 $0.01603
Sonnet 5 $0.00012 $0.00641
Haiku 4.5 $0.00006 $0.00321

Measured 6d ago against content hash e98c98f65d2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

safe-push scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

PATTERNS=$(grep -v '^#' ~/.claude/safe-push-blocklist | grep -v '^$' | paste -sd '|' -)
integrations/cursor/safe-push.mdc · 337 lines

How it starts

The opening of the file, as written. The whole thing — 337 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Safe Push

Pre-push hygiene check for GitHub repositories. Use when the user asks to push code, especially to public repos.

Trigger

When the user says "push", "safe push", "push to GitHub", or runs /safe-push.

Procedure

1. Classify the repo

# Check if public repo
git remote -v
# Check for .public-repo marker
test -f .public-repo && echo "PUBLIC" || echo "private or unmarked"

If public (or pushing to a public remote): apply ALL checks below. If private: apply only the PII scan (step 2).

2. PII and secrets scan

Load your personal pattern list from ~/.claude/safe-push-blocklist and scan against it. The same patterns apply to diff content (step 2) AND commit messages (step 3) — both run from the same source of truth.

Default mode — scan the diff against the target branch:

# Load personal patterns (graceful fallback if file missing):
if [ -f ~/.claude/safe-push-blocklist ]; then
  PATTERNS=$(grep -v '^#' ~/.claude/safe-push-blocklist | grep -v '^$' | paste -sd '|' -)
else
  PATTERNS=""
  echo "WARNING: ~/.claude/safe-push-blocklist not found. Personal pattern checks skipped."
fi

git diff origin/main...HEAD
[ -n "$PATTERNS" ] && git diff origin/main...HEAD | grep -nE "$PATTERNS" \
  || echo "NO MATCHES IN DIFF"

Full repo mode (/safe-push --full) — scan ALL tracked files, not just the diff. Use this for baseline audits, first-time pushes of existing repos, or periodic hygiene checks:

git ls-files | xargs grep -n -E "$PATTERNS" \
  --include='*.md' --include='*.py' --include='*.js' --include='*.ts' \
  --include='*.html' --include='*.sh' --include='*.json' \
  --include='*.yml' --include='*.yaml'

Check for these categories (your ~/.claude/safe-push-blocklist covers the regex-able ones):

  • Client names or internal project codenames
  • Personal infrastructure: hostnames, internal directory names, device IDs, hardware models, self-hosted service names
  • Email addresses (personal or client), phone numbers, addresses
  • API keys, tokens, secrets (AWS, GitHub, Slack, Telegram, generic)
  • Private IP addresses, internal hostnames
  • Private key material
  • Slack tokens (xoxb-), Slack channel IDs
  • Tracking IDs: GA4 (G-XXXXXXXXXX), GTM (GTM-XXXXXXX)

Read the full file on GitHub · 337 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 337 lines · 59 tokens per session scan B e98c98f65d2c

Subscribe to this mod's changes

safe-push is a cursor rule published in the GitHub repository thatrebeccarae/claude-marketing (130 stars, last pushed 3mo ago), licensed MIT. It adds 59 tokens to every session and 3,206 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.