secret-scanning

secret-scanning is a skill for Claude Code, Codex from PracticalSwan/agent-skills. It costs 51 tokens per session (2,659 once invoked), scanned A, original, MIT.

A workflow for finding credentials accidentally placed in source code or Git history, using GitHub scanning, push protection, and local checks before commits.

In plain words
What is it for?
Enabling secret scanning, handling blocked pushes and alerts, defining custom patterns, and auditing a repository before commit.
Why use it?
It helps prevent API keys, passwords, and other secrets from reaching a repository or being pushed publicly.

Skill for Claude CodeCodex

Written for Claude Code and Codex: Claude Code plugin machinery, but also reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Enabling secret scanning, handling blocked pushes and alerts, defining custom patterns, and auditing a repository before commit.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/secret-scanning
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 PracticalSwan/agent-skills --skill secret-scanning
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Claude Code, Codex.

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 secret-scanning

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/secret-scanning/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/secret-scanning)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/secret-scanning"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/secret-scanning/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 secret-scanning

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/secret-scanning"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/secret-scanning.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,659 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 Prompt Injection · line 123
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
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.00051 $0.02659
Opus 5 $0.00026 $0.01329
Sonnet 5 $0.00010 $0.00532
Haiku 4.5 $0.00005 $0.00266

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

Security

Grade A, and why

secret-scanning 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 4d 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.

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.

secret-scanning/SKILL.md · 296 lines

How it starts

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

Secret Scanning

This skill provides procedural guidance for configuring GitHub secret scanning — detecting leaked credentials, preventing secret pushes, defining custom patterns, and managing alerts.

When to Use This Skill

Use this skill when the request involves:

  • Enabling or configuring secret scanning for a repository or organization
  • Setting up push protection to block secrets before they reach the repository
  • Defining custom secret patterns with regular expressions
  • Resolving a blocked push from the command line
  • Triaging, dismissing, or remediating secret scanning alerts
  • Configuring delegated bypass for push protection
  • Excluding directories from secret scanning via secret_scanning.yml
  • Understanding alert types (user, partner, push protection)
  • Enabling validity checks or extended metadata checks
  • Scanning local code changes for secrets before committing (via MCP / AI coding agent) — see the Pre-Commit Scanning via AI Coding Agents section below for the recommended plugin

How Secret Scanning Works

Secret scanning automatically detects exposed credentials across:

  • Entire Git history on all branches
  • Issue descriptions, comments, and titles (open and closed)
  • Pull request titles, descriptions, and comments
  • GitHub Discussions titles, descriptions, and comments
  • Wikis and secret gists

Availability

Repository Type Availability
Public repos Automatic, free
Private/internal (org-owned) Requires GitHub Secret Protection on Team/Enterprise Cloud
User-owned Enterprise Cloud with Enterprise Managed Users

Core Workflow — Enable Secret Scanning

Step 1: Enable Secret Protection

  1. Navigate to repository SettingsAdvanced Security
  2. Click Enable next to "Secret Protection"
  3. Confirm by clicking Enable Secret Protection

For organizations, use security configurations to enable at scale:

  • Settings → Advanced Security → Global settings → Security configurations

Step 2: Enable Push Protection

Read the full file on GitHub · 296 lines

Files

What ships with it

4 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. 4d ago Changed · +142 lines 0486533af0c9
  2. 6d ago Changed d9c330608d85
  3. 8d ago First seen · 154 lines · 51 tokens per session scan A 346672dc128a

Subscribe to this mod's changes

secret-scanning is a skill published in the GitHub repository PracticalSwan/agent-skills (14 stars, last pushed 4d ago), licensed MIT. It adds 51 tokens to every session and 2,659 once invoked, about $0.0003 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-09-03.