pre-commit-validation

Validate staged Aspire .NET code, runtime logs, and Playwright login flows.

56|14|Updated Dec 30, 2024
One-click install
npx skills add https://github.com/xin-lai/CodeSpirit --skill pre-commit-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-validation
Source: https://github.com/xin-lai/CodeSpirit/tree/main/.cursor/skills/pre-commit-validation
Command: npx skills add https://github.com/xin-lai/CodeSpirit --skill pre-commit-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill ensures that staged changes are safe to commit by combining static code review, runtime health checks, and automated functional login tests to catch issues early and reduce broken builds.

Core Features & Use Cases

  • Static Code Review: Integrates with the project's code-review guidance to detect security, correctness, and stylistic issues in staged files.
  • Runtime Validation: Checks Aspire resource states, aggregates console and structured logs, and highlights errors or failing services.
  • Functional Login Tests: Executes Playwright-based or dotnet-script login tests for system and tenant admin flows to verify real user paths.
  • Use Case: Before pushing a feature branch, run this skill to verify no critical code issues, ensure services start correctly, and confirm tenant/admin logins succeed.

Quick Start

Run the pre-commit validation on staged changes to perform code review, runtime health checks, and login tests.

Frequently Asked Questions about pre-commit-validation

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

FAQPage Schema
How do I run pre-commit validation on staged changes in an Aspire .NET project?

Pre-commit validation analyzes staged git changes, Aspire resource states, and structured logs, executing Playwright login tests to generate a consolidated report verifying runtime stability and code quality.

What does pre-commit code review and runtime validation check for?

Pre-commit code review and runtime validation detect security, correctness, and stylistic issues in staged files, while aggregating Aspire console logs to highlight errors or failing services before you commit.

Do I need Playwright and Aspire MCP availability to run automated login tests?

Yes, automated login tests require Playwright and Aspire MCP availability or a local Aspire runtime, along with optional login scripts under Scripts/login-tests to verify system and tenant admin flows.

Can I use this pre-commit validation skill in CI pipelines for .NET projects?

Yes, pre-commit validation applies to Aspire-based .NET projects during developer pre-commit checks or CI pipelines to run static code review, resource state checks, and structured log analysis.

What is the best way to verify tenant and admin login flows before pushing a feature branch?

The best way to verify login flows is executing Playwright-based or dotnet-script login tests for system and tenant admin paths, ensuring real user paths succeed before pushing your feature branch.

Why does pre-commit validation require staged git changes to run?

Pre-commit validation requires staged git changes because static code review targets specifically staged files to detect security, correctness, and stylistic issues, ensuring only safe changes are committed.