analyze-commit

Analyzes staged git changes for security vulnerabilities and code quality issues before commit.

Updated May 11, 2026
One-click install
npx skills add https://github.com/TomasGC/Meerkat --skill analyze-commit-tomasgc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyze-commit
Source: https://github.com/TomasGC/Meerkat/tree/main/skills/analyze-commit
Command: npx skills add https://github.com/TomasGC/Meerkat --skill analyze-commit-tomasgc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Catching security vulnerabilities, hardcoded secrets, and quality gate failures after code reaches CI/CD pipelines wastes time and blocks deployments. This Skill performs local static analysis on staged or uncommitted changes before commit, detecting issues that ORCA, SonarQube, and OWASP scanners would flag. ## Core Features & Use Cases - Security Analysis: Detects OWASP Top 10 vulnerabilities (injection, XSS, weak cryptography, broken access control) and ORCA-style hardcoded secrets such as passwords, API keys, and AWS credentials. - Quality Gate Enforcement: Checks SonarQube criteria including cognitive complexity, code duplication, test coverage of at least 80 percent, and blocks commits when tests fail. - Language-Specific Rules: Applies dedicated standards for Go, C#, TypeScript, and Dockerfiles, with severity classification (Critical/High/Medium) and actionable fix recommendations. - Use Case: Before committing a new C# payment endpoint, run the analysis to catch an MD5 password hash flagged as Critical, receive a BCrypt fix recommendation, and verify all tests pass before the commit proceeds. ## Quick Start Ask Claude to analyze your staged changes for security and quality issues before committing by running the analyze-commit skill.

Frequently Asked Questions about analyze-commit

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

FAQPage Schema
How do I check code for security vulnerabilities before committing?

Run the analyze-commit skill on staged changes to scan for OWASP Top 10 vulnerabilities, hardcoded secrets, and injection flaws. It classifies findings by severity and blocks the commit when Critical issues like weak cryptography or exposed credentials are detected.

How to detect hardcoded secrets in git commits?

Use pattern matching against ORCA-style signatures such as password=, apikey=, AWS_SECRET_ACCESS_KEY, and private key blocks. The analysis scans each changed file's diff and flags matches as Critical issues that block the commit until removed.

What is the difference between staged and uncommitted analysis?

Staged analysis uses git diff --cached to check only files added to the index, while the --all flag uses git diff to cover every uncommitted change. Choose staged for precise pre-commit checks or all for a broader working tree review.

Does pre-commit analysis work with Go and C# projects?

Yes, the skill applies language-specific standards for Go, C#, TypeScript, and Dockerfiles. Go checks cover error handling and SQL injection, C# checks cover [Authorize] attributes and weak crypto, and TypeScript checks cover XSS and unhandled promises.

Why does the commit get blocked even when tests exist?

Commits are blocked when any test fails or when Critical severity issues are found, regardless of test presence. The quality gate also requires at least 80 percent coverage on new code, so new methods without corresponding tests will be flagged as High severity.

What are the limitations of static pre-commit analysis?

Regex-based pattern matching can miss obfuscated secrets, dynamic injection paths, and runtime-only vulnerabilities. If a language-specific standards file is missing, only general security checks apply, so specialized issues like Python pickle vulnerabilities may go undetected.