z-gate
/z-gate
Unified Quality, Security & Code Review Gate. Enforces Net Engineering Value (R_NEV), Security Invariants (SQLi, Secrets), Concurrency Deadlock Defense, Asset Reuse (R_REUSE), and z-brain historical gotcha cross-referencing. Triggered by /z-gate [review|find|audit|status].
- Author
- kzxl ↗
- Repository
- z-plugin ↗
- Licence
- MIT
- Last repository change
- 12.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 12.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Unified Quality, Security & Code Review Gate. Enforces Net Engineering Value (R_NEV), Security Invariants (SQLi, Secrets), Concurrency Deadlock Defense, Asset Reuse (R_REUSE), and z-brain historical gotcha cross-referencing. Triggered by /z-gate [review|find|audit|status].
Original author description
Unified Quality, Security & Code Review Gate. Enforces Net Engineering Value (R_NEV), Security Invariants (SQLi, Secrets), Concurrency Deadlock Defense, Asset Reuse (R_REUSE), and z-brain historical gotcha cross-referencing. Triggered by /z-gate [review|find|audit|status].
How it works
- 1. Unified Code Review (/z-gate review & zgatereview)
- 2. Asset-First Helper Discovery (/z-gate find)
- 3. Pre-Commit Hook Invariant Blocker
SKILL.md preview
---
name: z-gate
description: Unified Quality, Security & Code Review Gate. Enforces Net Engineering Value (R_NEV), Security Invariants (SQLi, Secrets), Concurrency Deadlock Defense, Asset Reuse (R_REUSE), and z-brain historical gotcha cross-referencing. Triggered by /z-gate [review|find|audit|status].
---
# 🛡️ Z-Gate: Unified Quality, Security & Code Review Gate
Z-Gate is the comprehensive gatekeeper for software changes. It combines deterministic static analysis, security leak detection, concurrency defense, Net Engineering Value (R_NEV), and cross-plugin memory mesh to ensure clean, secure, and regression-free commits.
---
## 1. Unified Code Review (`/z-gate review` & `zgate_review`)
Run deep multi-dimensional reviews across staged diffs, working changes, or branches:
```bash
# Terminal table report of staged changes
z-gate review
# Review against main branch or specific commit
z-gate review --branch=main --format=table
z-gate review --commit=HEAD~1 --format=markdown
# Focus on specific pillars
z-gate review --focus=security
z-gate review --focus=concurrency
z-gate review --focus=architecture
```
Or via MCP Tool in pair programming sessions:
```json
{
"name": "zgate_review",
"arguments": {
"staged": true,
"focus": "all",
"format": "markdown"
}
}
```
### Review Pillars & Severity Tiers
| Severity | Category | What is Checked |
| :--- | :--- | :--- |
| **🔴 P0 (Critical Blocker)** | **Security & Core Invariants** | • Raw SQL string concatenation / injection (`R_DB`)<br>• Hardcoded secrets, API keys, tokens, passwords<br>• Shell command injection via string concatenation<br>• WinForms / WPF `BindingSource` violation (`R_WPF`) |
| **🟡 P1 (Warning)** | **Concurrency & Deadlocks** | • Sync-over-async blocking calls: `.Result`, `.GetAwaiter().GetResult()`, `.Wait()` (`R_CS`)<br>• `async void` methods that swallow exceptions and crash processes<br>• `Thread.Sleep` inside async workflows<br>• Single-implementation interfaces without seams (Wrapper Hell - `R_NEV`)<br>• LOC expansion > 30% on refactoring tasks |
| **🟣 P2 (Rule Violation)** | **Craftsmanship & Gotchas** | • Cross-references modified files against past gotchas in `z-brain`<br>• UI Anti-Slop (neon gradients, dead click handlers - `R_ANTI_SLOP`) |
| **⚪ P3 (Nitpick)** | **Clean Code & Git** | • Deep nesting & cognitive complexity (indentation depth ≥ 5 levels)<br>• Conventional Commit syntax violations (`R_GIT`) |
---
## 2. Asset-First Helper Discovery (`/z-gate find`)
Before writing any custom date formatting, string truncation, or parsing utility, scan existing repository helpers:
```bash
z-gate find "<intent or keyword>"
```
Or via MCP Tool:
```json
{
"name": "zgate_find_helpers",
"arguments": { "query": "format date" }
}
```
---
## 3. Pre-Commit Hook Invariant Blocker
The `PreToolUse` hook intercepts `git commit` and `git add`:
- **Targeted Staging**: Warns against lazy `git add -A` / `git add .` (`R_GIT`).
- **P0 Blocker**: Rejects commits containing critical security leaks, SQL injection, or sync-over-async deadlocks before code enters the repository.
Versions
The database has no other skills named z-gate.
Database snapshot: 13.11.2026 · package version 49e9f2f1e347 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Similar skills
- 100code-review
Review code for quality, bugs, security issues, and suggest improvements. Use when asked to review, audit, or improve code. - 100quality-review
Use as the code-quality gate after spec-compliance and constitution checks pass, or when the user says "review my code", "quality check", "security review", or "is this code good". Runs as an independent sub-agent when the Task tool is available. - 100review-pr
Review a pull request for code quality and security issues. Use when the user wants to review a PR, check PR code changes, or audit a pull request. Triggers on: "review PR", "review pull request", "check this PR", "the `review-pr` skill". - 82review-code
Use to review code. - 84review-code
Review code changes for quality, security, and performance. Use when user says "review my changes", "do a code review", "check this for issues", "analyze code quality", "security review", "performance review", "is this PR ready", or needs architecture, security, performance, and style analysis. - 100review-work
Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.