security

Automate GitLeaks secret detection in Husky pre-commit workflows.

1|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/ruchernchong/claude-kit --skill security-ruchernchong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security
Source: https://github.com/ruchernchong/claude-kit/tree/main/skills/security
Command: npx skills add https://github.com/ruchernchong/claude-kit --skill security-ruchernchong

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the setup of GitLeaks in a project's pre-commit workflow and coordinates targeted security audits of codebases.

Core Features & Use Cases

  • Husky pre-commit integration: automatically enforces secrets scanning on staged changes with GitLeaks.
  • Security-auditor orchestration: uses the security-auditor agent to analyze code for secrets and OWASP-related issues.
  • Optional history scan: perform a historical scan of the repository with gitleaks detect to surface leaked secrets.
  • Guided remediation: provides steps to rotate secrets and secure the repository after findings.

Quick Start

Set up GitLeaks in Husky, then run a security audit using the security-auditor agent. Optionally perform a history scan if needed.

Frequently Asked Questions about security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate secret detection in pre-commit hooks using GitLeaks?

Automating secret detection with GitLeaks involves integrating it into Husky pre-commit hooks to scan staged changes. This prevents secrets from being committed by running targeted scans automatically before code is saved to the repository.

How do I scan Git history for leaked secrets with GitLeaks?

Scanning Git history for leaked secrets requires running a gitleaks detect history scan across the repository. This optional scan surfaces previously exposed credentials so you can remediate and rotate compromised secrets.

Do I need Husky installed to enforce GitLeaks scanning at commit time?

Yes, Husky must be installed to enforce GitLeaks scanning at commit time. The setup requires Husky and lint-staged to automatically execute secret detection on staged changes during the pre-commit workflow.

What is the best way to secure a repository after GitLeaks finds exposed secrets?

Securing a repository after GitLeaks finds exposed secrets requires guided remediation to rotate compromised credentials. The security-auditor agent provides actionable steps to analyze code for vulnerabilities and secure sensitive data.

Can I use a security audit to detect OWASP-related issues alongside secrets?

Yes, you can detect OWASP-related issues alongside secrets using a security-auditor agent. The agent analyzes the codebase to identify both leaked credentials and broader security vulnerabilities during the audit process.

Why use lint-staged with Husky for pre-commit secret scanning?

Using lint-staged with Husky for pre-commit secret scanning restricts GitLeaks execution to staged files only. This approach optimizes performance by ensuring the security audit runs solely on changes ready for commit.