code-validator

Scans changed .NET files for BLOCKS MERGE violations before commit.

Updated Nov 19, 2020
One-click install
npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill code-validator-kwojtasinski-repo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-validator
Source: https://github.com/kwojtasinski-repo/ECommerceApp/tree/main/.github/skills/code-validator
Command: npx skills add https://github.com/kwojtasinski-repo/ECommerceApp --skill code-validator-kwojtasinski-repo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Catching critical architecture, security, and coding violations late in review wastes time and blocks merges. This Skill runs a fast pre-commit check on changed files in the ECommerceApp .NET codebase, reporting only merge-blocking issues without the overhead of a full code review. ## Core Features & Use Cases - Critical Violation Scanning: Checks changed files against a curated list of BLOCKS MERGE rules covering architecture layering, exception handling, domain model integrity, async misuse, DI registration, security, testing, and frontend patterns. - Focused Context Loading: Loads only the anti-patterns context file, skipping ADRs and instruction files for speed. - Concise Reporting: Outputs one line per blocker with file path, line number, and a one-line fix, or a clean-pass confirmation. - Use Case: Before committing changes to an Order controller, run the validator to confirm there is no business logic in the controller, no raw try/catch without the mapping helper, and no hardcoded role strings. ## Quick Start Ask the assistant to run the code validator on your current changes or on a specific file before committing.

Frequently Asked Questions about code-validator

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

FAQPage Schema
How do I check my .NET code for critical violations before committing?▼

Run the code validator on your changed files or pass a specific file path. It scans for BLOCKS MERGE violations only and reports each issue with the file path, line number, and a one-line fix, or confirms the code is safe to commit.

What is the difference between code-validator and a full code review?▼

The code validator checks only merge-blocking violations using a single anti-patterns context file, with no ADR loading or RAG. Advisory, P2, and P3 warnings are excluded and belong in a full code-reviewer session.

What kinds of violations does the pre-commit check detect?▼

It detects business logic in controllers, cross-layer EF Core leakage, blocking async calls like .Result or .Wait(), public setters on behavioral aggregates, hardcoded credentials or role strings, raw try/catch in controllers, and global JavaScript functions outside RequireJS modules.

Can I validate a single file instead of all changes?▼

Yes. Provide an optional file path or bounded context name as an argument, and the validator inspects only that target instead of the full changeset.

When should I not use this validator?▼

Do not use it when you need advisory feedback, style suggestions, or architecture decision guidance. It intentionally reports only merge-blocking issues; use a full code review for comprehensive analysis.