pre-commit-review

Review staged git changes for security and compliance issues.

6|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/moberghr/mtk-agent-toolkit --skill pre-commit-review-moberghr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-review
Source: https://github.com/moberghr/mtk-agent-toolkit/tree/main/.claude/skills/pre-commit-review
Command: npx skills add https://github.com/moberghr/mtk-agent-toolkit --skill pre-commit-review-moberghr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Fast, security-focused review of staged changes before every commit to surface critical compliance issues early.

Core Features & Use Cases

  • Deterministic linter pass via hooks/pre-commit-linters.sh that detects secrets, raw SQL, and other policy violations.
  • Optional analyzer integration using .mtk/analyzer-output.json to surface findings related to changed files only.
  • Roslyn MCP tools support (DetectAntiPatterns) for .NET environments when available.
  • AI-assisted review pass to catch design, intent, and context-sensitive issues beyond automated checks.
  • Consolidated findings output in a standardized schema suitable for gate integration.

Quick Start

Run the pre-commit security review on the staged changes before committing to surface any critical issues.

Frequently Asked Questions about pre-commit-review

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

FAQPage Schema
How do I run a security review on staged git changes before committing?

To run a security review on staged changes, execute a pre-commit review that consumes the git diff, runs deterministic linters to detect secrets and raw SQL, and returns structured findings for gate decisions.

What does a pre-commit security review check for in my code?

A pre-commit security review checks staged changes for critical compliance issues like exposed secrets, raw SQL, and policy violations using deterministic linters, optionally merging cached analyzer results and AI-assisted review.

Can I use this pre-commit review with my .NET environment and Roslyn analyzer?

Yes, the pre-commit review supports .NET environments by utilizing Roslyn MCP tools like DetectAntiPatterns when available, alongside standard git-based linting and AI review passes.

Does the pre-commit security check work without cached analyzer output?

Yes, the pre-commit security check runs a deterministic linter pass independently, but it optionally merges findings from a cached .mtk/analyzer-output.json file to surface issues related specifically to changed files.

What is the best way to catch context-sensitive security issues before a git commit?

The best way to catch context-sensitive security issues before a commit is using an AI-assisted review pass that analyzes design and intent, combining automated linter checks with AI review for comprehensive coverage.

How do I integrate pre-commit security findings into my CI/CD gate?

You can integrate pre-commit security findings into your gate by consuming the standardized schema output generated from the linter, analyzer, and AI review passes, which provides structured data for automated gate decisions.