Skip to content
Agentmart
Submit a tool

gitleaks-preflight

Use before commit, push, or deploy when gitleaks or secret scans block work.

Skill by cococool13

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/cococool13-gitleaks-preflight

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use before commit, push, or deploy when gitleaks or secret scans block work.

Use cases: devops, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/gitleaks-preflight

What's inside

Skill name
gitleaks-preflight
Description
Use before commit, push, or deploy when gitleaks or secret scans block work.
License
MIT
Instructions
40 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (4)

  • SKILL.md
  • init-config.sh · scripts/
  • preflight.sh · scripts/
  • gitleaks.toml · templates/

SKILL.md (first lines)

# Gitleaks preflight

Run from the **current git repo root** before push or deploy. Never scan outside this repo.

```bash
bash ~/.agents/skills/gitleaks-preflight/scripts/preflight.sh
```

Exit codes: `0` clean, `1` leaks (fix or allowlist), `2` gitleaks missing.

## First time in a repo

If the repo has no `.gitleaks.toml`:

```bash
bash ~/.agents/skills/gitleaks-preflight/scripts/init-config.sh
git add .gitleaks.toml && git commit -m "chore: add gitleaks allowlists"
```

The template allowlists generated trees, owned worktrees, and **local gitignored secret files** (`.dev.vars`, `Secrets.swift`, `.env*`). Real credentials in tracked files still fail.

## When Cursor blocks deploy

Cursor scans the working tree (like `gitleaks detect --no-git`). A clean `git log` is not enough if gitignored locals contain key-shaped strings.

1. Run preflight in the repo.
2. If hits are gitignored locals → ensure `.gitleaks.toml` path allowlists cover them (init-config adds the standard set).
3. If hits are tracked → remove, rotate, and recommit. Never `--no-verify`.

## With /ship

After `ship.py --apply` and before `wrangler deploy`, run preflight. If it fails, fix allowlists or secrets before deploy — do not retry deploy blindly.

## Report

- Scan mode (git vs working tree)
- Finding count and file paths only — never print secret values
- Whether `.gitleaks.toml` was created or updated

From cococool13/agent-skills, MIT.

More from cococool13/agent-skills

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Oct 14, 2026 (15 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from cococool13

Cite this page

gitleaks-preflight skill. Agent Mart. https://agentmart.dev/skills/cococool13-gitleaks-preflight (last updated 2026-10-24)