Agent skill
osprey-pre-commit
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.
Install this agent skill to your Project
npx add-skill https://github.com/als-apg/osprey/tree/main/src/osprey/assist/integrations/claude_code/pre-commit
SKILL.md
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
- Auto-fix formatting and simple lint issues
- Run tests to catch regressions
- Fix failures if any tests fail
- Re-run until all checks pass
- 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 |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
osprey-migrate
Upgrades downstream OSPREY projects to newer versions. Applies API changes (method renames, class renames, import changes) from migration documents. Use when upgrading OSPREY version, migrating from old APIs, or when the user asks to upgrade, migrate, or update their OSPREY project.
osprey-release
Guides through the complete OSPREY release workflow. Use when the user wants to create a release, bump versions, publish to PyPI, create a tag, or needs help with pre-release testing and version consistency checks.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Didn't find tool you were looking for?