commit-push-pr

Validate Rust formatting, linting, and tests before committing and pushing changes.

77|10|Updated Feb 1, 2025
One-click install
npx skills add https://github.com/ahtavarasmus/lightfriend --skill commit-push-pr-ahtavarasmus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-push-pr
Source: https://github.com/ahtavarasmus/lightfriend/tree/main/.claude/skills/commit-push-pr
Command: npx skills add https://github.com/ahtavarasmus/lightfriend --skill commit-push-pr-ahtavarasmus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually managing code quality and PR workflows is error-prone and time-consuming. This skill automates the process of formatting, linting, testing, and creating a PR when changes exist.

Core Features & Use Cases

  • Format, lint, and test: ensures code quality before committing.
  • Automated PR creation: opens a PR if there isn't one for the current branch.
  • Safe, auditable workflow: enforces checks and avoids committing with issues.
  • Use Case: a team wants to maintain consistent code standards across a Rust backend by automatically validating changes and surfacing a PR upon success.

Quick Start

Run the commit-push-pr skill to format, lint, test, commit changes, push to the branch, and create a PR if one does not exist.

Frequently Asked Questions about commit-push-pr

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

FAQPage Schema
How do I automate Rust formatting, linting, and testing before a Git push?

Automate Rust formatting, linting, and testing before a Git push by running a workflow that enforces cargo fmt, cargo clippy, and cargo test. This coordinates code quality checks and prevents pushing changes if any validation fails.

What is the best way to automatically create a GitHub PR after committing changes?

The best way to automatically create a GitHub PR after committing changes is to use an automated workflow that pushes to the current branch and opens a pull request if one does not already exist, ensuring all checks pass first.

Can I enforce cargo clippy and cargo test checks on a Rust backend workspace before committing?

Yes, you can enforce cargo clippy and cargo test checks on a Rust backend workspace before committing. The workflow validates formatting and linting, halting the commit and push process if any code quality issues are detected.

Does automated PR creation work with existing Git-based workflows for Rust projects?

Automated PR creation works directly with Git-based workflows for Rust projects. It evaluates git status, stages changes, pushes to the branch, and coordinates GitHub PR creation only when updates exist and validations succeed.

Why does my automated commit and push workflow fail when cargo fmt finds formatting issues?

Your automated commit and push workflow fails when cargo fmt finds formatting issues because the process enforces cargo fmt --check. This safety mechanism avoids committing code that does not meet formatting standards.

When do I need an automated workflow for Rust commits and PRs?

You need an automated workflow for Rust commits and PRs when manually managing code quality becomes error-prone. It ensures consistent standards across a team by validating formatting, linting, and tests before pushing changes and creating a PR.