guard

Scan staged files for secrets, security antipatterns, test breakage, and lint issues.

23|4|Updated Sep 5, 2013
One-click install
npx skills add https://github.com/drn/dots --skill guard-drn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/drn/dots/tree/main/agents/skills/guard
Command: npx skills add https://github.com/drn/dots --skill guard-drn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill acts as a crucial gatekeeper before code commits, preventing the accidental inclusion of secrets, security vulnerabilities, or broken tests in your codebase.

Core Features & Use Cases

  • Secret Scanning: Detects and flags hardcoded API keys, passwords, and other sensitive credentials.
  • Security Antipatterns: Identifies common dangerous coding practices that could lead to vulnerabilities.
  • Test & Lint Checks: Ensures code changes do not break existing tests or violate linting rules.
  • Use Case: Before committing a change, run this skill to automatically scan staged files for accidentally exposed API keys or insecure code patterns, ensuring a cleaner and more secure commit history.

Quick Start

Run the guard skill to perform pre-commit safety checks on staged files.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I run pre-commit checks to scan staged files for secrets and security antipatterns?

Pre-commit checks scan staged and changed files to detect secrets, security antipatterns, test breakage, and lint issues. You can run this safety check on staged files to automatically identify hardcoded API keys, passwords, and dangerous code patterns before they enter your commit history.

What is the best way to prevent accidentally committing API keys and sensitive credentials?

Pre-commit secret scanning is the best way to prevent accidentally committing API keys and credentials. It analyzes staged files to detect and flag hardcoded sensitive information, ensuring a cleaner and more secure commit history before the commit is finalized.

How do pre-commit safety checks identify dangerous code patterns and lint issues?

Pre-commit safety checks identify dangerous code patterns and lint issues by running targeted linters based on your project type. They analyze staged files to flag common security antipatterns and ensure code changes do not violate existing linting rules.

Can I use pre-commit checks to ensure code changes do not break existing tests?

Yes, pre-commit checks can ensure code changes do not break existing tests. The safety scan runs targeted tests based on your project type alongside linting and secret scanning to prevent test breakage from entering your codebase.

Does pre-commit scanning detect common gitignore violations in changed files?

Yes, pre-commit scanning detects common gitignore violations in changed files. The safety checks scan staged files to identify sensitive credentials, dangerous patterns, and gitignore violations to maintain a clean repository.

Do I need any dependencies installed to run pre-commit lint and secret scanning?

No dependencies are required to run pre-commit lint and secret scanning. The safety checks operate independently on staged files to detect secrets, security antipatterns, and lint issues without needing external modules.