GitGuardian Agent Skills
Beta — this distribution is pre-1.0. The skills work today, but they may change shape between releases: no stability guarantee yet on skill names, slash commands, or file layout.
Find exposed credentials before attackers abuse them, block new leaks before they ship, and plant honeytokens to detect future misuse. This repo ships skill files that teach AI coding agents how to use GitGuardian through the GitGuardian CLI (ggshield), the Developer MCP server, and API-backed workflows where appropriate - when to scan, which flags to use, how to interpret findings, how to walk the user through removal and rotation, and when and where to plant honeytokens.
Supported agents: Claude Code, Codex, Cursor, VS Code (GitHub Copilot), Kiro. Install into your agents with curl -fsSL agents.gitguardian.com | sh - details below.
Skills and Commands
Four skills map to four slash commands:
Scan secrets — /gitguardian:scan-secrets
scan-secrets
Find hardcoded secrets in paths, staged changes, commits, full history, Docker images, and packages.
Use when: requesting a one-off scan, auditing existing files or history, or investigating a suspected leak.
Key rule: run the scan the user asked for, then remediate from the structured findings. Routine edits, commits, and pushes use hooks, not repeated agent scans.
Create honeytokens — /gitguardian:create-honeytokens
create-honeytokens
Generate and place decoy AWS credentials.
Use when: planting decoys in .env.example, docs, runbooks, archived repos, or other attractive leak surfaces.
Key rule: plant where attackers look, not where engineers import.
Scan machine — /gitguardian:scan-machine
scan-machine
Audit a whole developer machine for credentials across local repos, dotfiles, cloud CLI configs, shell history, AI agent caches, and abandoned project trees.
Use when: wiping, selling, returning, or auditing a developer machine.
Key rule: this is a broad endpoint scan and requires endpoint scanning on the GitGuardian workspace.
Check HMSL — /gitguardian:check-hmsl
check-hmsl
Check known credentials against HasMySecretLeaked without exposing plaintext to the agent.
Use when: you already have a token, key, .env, vault inventory, or inherited credential list and want to know whether any value has appeared in indexed public leaks.
Key rule: user-run handoff only; the agent must not read or run against the credential file.
Install hooks — /gitguardian:install-hooks
install-hooks
Install recurring protection with ggshield. Pre-commit hooks check staged changes before a commit. Pre-push hooks check outgoing commits before a push. AI hooks check supported prompts and tool actions in Claude Code, Cursor, Codex, Copilot, and Mistral Vibe.
Use when: asking to install Claude/Cursor/Copilot hooks, setting up secret prevention on a repo, asking to block or stop secrets from being committed or pushed, configuring pre-commit hooks, or hardening after a secret was caught.
Key rule: check the existing protection, reuse a matching hook, and offer an installation or a repair one time. Keep existing hook managers. A global installation needs an explicit request or approval. A hook installation does not audit existing code or history.
Triage incidents — /gitguardian:triage-incidents
triage-incidents
Read the secret incidents already detected in your GitGuardian dashboard, rank them by validity, severity, blast radius, and exposure, and drive remediation — rotation first, HMSL for unverifiable validity, history rewrite only when it earns its cost.
Use when: triaging or reviewing GitGuardian incidents, asking what's leaking in the org or what to fix first, remediating or rotating a credential flagged in an incident, responding to a Public Monitoring alert, or assigning/tagging/resolving incidents.