osprey-pre-commit

als-apg's avatarfrom als-apg

Validates code before committing. Runs linting, formatting, and tests to catch issues early. Use when ready to commit, before pushing, or when the user asks to run checks, validate, or verify their changes.

⭐44stars🔀13forks📁View on GitHub🕐Updated Jan 8, 2026⬇️1downloads

When & Why to Use This Skill

The osprey-pre-commit skill is a comprehensive code validation tool designed to automate linting, formatting, and testing workflows. By integrating essential quality checks directly into the pre-commit phase, it helps developers identify syntax errors, style inconsistencies, and logic regressions early, ensuring that only clean and verified code is pushed to the repository.

Use Cases

  • Automated Code Formatting: Automatically fix linting issues and reformat source code using tools like Ruff to maintain a consistent style across the codebase.
  • Pre-Commit Regression Testing: Execute fast-running unit tests (e.g., via Pytest) to catch bugs immediately after making changes and before they are committed.
  • Local CI/CD Validation: Run full integration and system checks locally to ensure the code is ready for pull requests and will pass remote CI pipelines.
  • Code Quality Enforcement: Use as a gatekeeper to verify that all changes meet project-specific standards, reducing the overhead of manual code reviews.
nameosprey-pre-commit
description>
allowed-toolsRead, Glob, Grep, Bash, Edit

Pre-Commit Validation

This skill helps you validate your code changes before committing.

Instructions

Follow the validation workflow in instructions.md.

Quick Command Reference

Quick Check (Before Commits)

# Auto-fix code style
ruff check src/ tests/ --fix --quiet || true
ruff format src/ tests/ --quiet

# Run fast tests
pytest tests/ --ignore=tests/e2e -x --tb=line -q

Or use the script:

./scripts/quick_check.sh

Full CI Check (Before Pushing)

./scripts/ci_check.sh

Workflow

  1. Auto-fix formatting and simple lint issues
  2. Run tests to catch regressions
  3. Fix failures if any tests fail
  4. Re-run until all checks pass
  5. Commit with confidence

When to Use Each Check

Situation Command
Ready to commit ./scripts/quick_check.sh
Ready to push ./scripts/ci_check.sh
Creating PR ./scripts/premerge_check.sh main