public-repo-guard

public-repo-guard is a skill for Claude Code from heptameta/heptabase-cli-skills. It costs 136 tokens per session (1,143 once invoked), scanned A, original, MIT.

A safety check for a public code repository, where committed files are visible to everyone and remain in version history. It scans changes for secrets, personal data, private links, and other internal details.

In plain words
What is it for?
Use it before commits, pushes, pull requests, releases, and edits to documentation, skills, scripts, or examples. It checks staged changes for credentials and other private or internal data.
Why use it?
It helps prevent sensitive information from being published accidentally. Public repositories and installed plugins can spread leaked details widely and make removal difficult.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the heptabase plugin — 4 skills shipped together

Good fit Use it before commits, pushes, pull requests, releases, and edits to documentation, skills, scripts, or examples. It checks staged changes for credentials and other private or internal data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/heptameta/heptabase-cli-skills/public-repo-guard
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.

Any agent
npx skills add heptameta/heptabase-cli-skills --skill public-repo-guard
Clone the repo
git clone --depth 1 https://github.com/heptameta/heptabase-cli-skills

Made for: Claude Code.

Or install heptabase, the plugin that ships this one along with the rest of its 4 skills.

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 public-repo-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/heptameta/heptabase-cli-skills/public-repo-guard/github.svg)](https://agentmods.dev/skills/heptameta/heptabase-cli-skills/public-repo-guard)
Your own site
<a href="https://agentmods.dev/skills/heptameta/heptabase-cli-skills/public-repo-guard"><img src="https://agentmods.dev/badge/skills/heptameta/heptabase-cli-skills/public-repo-guard/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for public-repo-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/heptameta/heptabase-cli-skills/public-repo-guard"><img src="https://agentmods.dev/badge/skills/heptameta/heptabase-cli-skills/public-repo-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,143 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 52
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00136 $0.01143
Opus 5 $0.00068 $0.00571
Sonnet 5 $0.00027 $0.00229
Haiku 4.5 $0.00014 $0.00114

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

Security

Grade A, and why

public-repo-guard scanned grade A with 0 findings 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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/install-git-hook.mjs, scripts/scan-sensitive.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/public-repo-guard/SKILL.md · 61 lines

How it starts

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

Public-repo guard

Everything in this repo ships to the world twice: it is a public GitHub repo, AND the whole repo is installed onto users' machines as a plugin. A leaked secret or internal detail is permanent — git history survives force-pushes in forks, caches, and mirrors. Prevention is the only cheap moment to act.

What counts as sensitive here

  • Credentials of any kind: API keys, tokens, private keys, passwords — including "test" or "expired" ones (they reveal naming schemes and invite confusion).
  • Personal / employee data: email addresses, personal home paths like /Users/<name>/... (they leak usernames), real names of non-maintainers.
  • Internal workspace links: Notion pages, Slack archives, Discord channels, Linear issues, Google Docs, Datadog dashboards. Public GitHub links and app.heptabase.com placeholder patterns are fine.
  • Real identifiers: actual card/workspace/chat UUIDs from anyone's Heptabase data. Docs must use placeholders like <cardId>, <workspaceId>.
  • Infrastructure details: non-loopback IPs, internal hostnames, unreleased product details.

Workflow

  1. Before every commit, scan the staged changes (this is also what the pre-commit hook runs):
    node .claude/skills/public-repo-guard/scripts/scan-sensitive.mjs --staged
    
  2. Judge each finding — the scanner errs toward flagging; a finding is a question, not a verdict:
    • Real sensitive data → remove it, replace with a placeholder (<your-token>, <cardId>), or move it to private notes. Never "temporarily" commit it.
    • False positive (e.g. a deliberate documentation example) → append a public-ok marker comment to that line and say why in the PR. The scanner skips marked lines.
  3. Before a release or when auditing, scan every tracked + untracked file:
    node .claude/skills/public-repo-guard/scripts/scan-sensitive.mjs --all
    
  4. The scanner is a net, not a guarantee. It only knows patterns. Also apply judgment to things regex cannot see: screenshots, real user data or support-conversation excerpts, names/handles of people who did not consent, anything you would not put in a tweet. When reviewing, read the actual diff (git diff --cached) — not just the scan output.

Read the full file on GitHub · 61 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago Changed · +2 lines c606f8690190
  2. 12d ago First seen · 59 lines · 136 tokens per session scan A 53d9143505bd

Subscribe to this mod's changes

public-repo-guard is a skill published in the GitHub repository heptameta/heptabase-cli-skills (152 stars, last pushed 5d ago), licensed MIT. It adds 136 tokens to every session and 1,143 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

github-automation

GitHub workflow automation, PR management, issue tracking, and code review coordination. Integrates with GitHub Actions and repository management. Use when: PR creation, code review, issue management, release automation, workflow setup. Skip when: local-only changes, non-GitHub repositories.

ruvnet/ruflo · 61 tokens

comet-safe-delivery

A Chinese-language procedure for safely delivering specified Comet changes through Git. It covers checking worktrees and unrelated edits, staging exact files, validating hooks, and authorized commits or pushes.

rpamis/comet · 78 tokens

close-task-commit-push-pr

Close the active backlog task (detected from branch name), commit all changes, push to remote, and open a pull request. Use when the user says "close task and ship it", "close task commit push pr", or invokes /close-task-commit-push-pr.

devoxx/DevoxxGenieIDEAPlugin · 64 tokens

changelog

Auto-generates a changelog from git commits, sprint data, and design documents. Produces both internal and player-facing versions.

Donchitos/Claude-Code-Game-Studios · 29 tokens

git-workflow

Guides you through Git workflows — branching strategies, commit conventions, merge conflict resolution, and release management. Use when working with Git repositories or when the user asks about version control best practices.

ownpilot/OwnPilot · 42 tokens

development-workflow

Detailed development workflow with modular patterns for git, review, testing, and deployment.

athola/claude-night-market · 20 tokens