validate-protection

Enforce pre-commit protection checks on staged files with approval validation.

1|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/AEtherlight-ai/lumina --skill validate-protection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-protection
Source: https://github.com/AEtherlight-ai/lumina/tree/main/.claude/skills/validate-protection
Command: npx skills add https://github.com/AEtherlight-ai/lumina --skill validate-protection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the enforcement of code protection policies, preventing unauthorized modifications to stable code. It ensures that critical code changes are properly justified and approved, reducing the risk of regressions and maintaining system integrity.

Core Features & Use Cases

  • Pre-Commit Enforcement: Creates and updates Git hooks to validate protection annotations before commits, blocking unapproved changes.
  • CI/CD Integration: Ensures protection checks run seamlessly in automated pipelines without manual prompts, guaranteeing continuous compliance.
  • Audit Trail Validation: Verifies that PROTECTED: commit messages are used for approved changes, creating a clear historical record.
  • Use Case: Before merging a pull request, use this skill to automatically verify that all changes to @protected or @immutable code have the required justifications in their commit messages, ensuring compliance with your team's code stability policies and preventing costly errors.

Quick Start

Build and test the pre-commit protection enforcement system. Validate protection enforcement via pre-commit hooks.

Frequently Asked Questions about validate-protection

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

FAQPage Schema
How do I prevent unauthorized changes to protected code in Git?

Pre-commit protection enforcement validates that changes to @protected and @immutable code have required approvals in commit messages before they're staged, blocking unapproved modifications automatically.

Can I enforce code protection checks in CI/CD pipelines?

Yes. The validation script runs seamlessly in automated pipelines without manual prompts, scanning staged files for protection annotations and verifying approvals to guarantee continuous compliance across builds and deployments.

What does a protection validation exit code indicate?

Exit code 0 means the commit is compliant with protection policies; code 1 indicates non-compliant changes requiring approval; code 2 signals a validation error that needs investigation.

How do I set up pre-commit hooks for code protection?

The Skill creates and updates Git hooks that trigger the validate-protection.js script, extracting lock dates and approval references from staged files to enforce protection policies before commits proceed.

Why should I use protection annotations for critical code?

Protection annotations like @protected and @immutable create an audit trail, enforce justification requirements, and reduce regression risk by ensuring critical code changes receive explicit approval before merging.

Related Skills