safe-commit

Run pre-commit checks and auto-fixes for staged Python, Shell, and Markdown files.

Updated Jan 10, 2026
One-click install
npx skills add https://github.com/jas-ho/jason-agent-skills --skill safe-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-commit
Source: https://github.com/jas-ho/jason-agent-skills/tree/main/plugins/safe-commit
Command: npx skills add https://github.com/jas-ho/jason-agent-skills --skill safe-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manual code-quality checks before commits are error-prone and time-consuming; this skill automates fixes and runs validations to improve reliability and consistency across teams.

Core Features & Use Cases

  • Auto-fixes fixable issues in staged changes for Python, Shell, and Markdown files.
  • Runs ruff, mypy, shellcheck, and markdownlint to surface issues before commit.
  • Enforces safety by warning about sensitive files, blocking commits when local files are detected, and providing a clear summary for decision making.

Quick Start

Stage your changes and run the safe-commit script to auto-fix and validate them before committing.

Frequently Asked Questions about safe-commit

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

FAQPage Schema
How do I automate pre-commit quality checks for Python and Shell files?

Automating pre-commit quality checks is done by running safe-commit on staged changes to auto-fix issues and run validations across Python, Shell, and Markdown files. It executes linters and type-checkers to surface problems before you commit.

Can I use ruff and mypy to auto-fix staged changes before committing?

Yes, you can use safe-commit to auto-fix staged changes by running ruff and mypy. It applies fixes directly to staged files and surfaces raw linter outputs for human review, ensuring code quality before the final commit.

Does safe-commit work without a pyproject.toml file in my repository?

Yes, safe-commit works without a pyproject.toml file. When project configuration is absent, it uses locally installed tools instead of project-aware execution to run validations and surface raw outputs for your review.

What is the best way to prevent committing sensitive or local files in git?

Preventing sensitive file commits is handled by safe-commit through its built-in safeguards. It detects local or sensitive files, warns about them, blocks the commit, reports commit size, and provides a summary to guide your final decision.

How do I run shellcheck and markdownlint on staged changes before a commit?

Running shellcheck and markdownlint on staged changes is automated by safe-commit. It validates Shell and Markdown files alongside Python, enforcing quality assurance by surfacing any detected issues before you finalize the commit.