Safe Git Split — Messy Diff to Clean Commit Plan

    by LINH RATHHENRY

    1

    Your agent plans the commits. You approve each one. Secrets get flagged — and their commit blocked — before they reach your history.

    Free

    Security scanned

    Works with the AI Agents you already use

    Safe Git Split — Messy Diff to Clean Commit Plan

    Example session with this skill installed

    I have a bunch of changes in my repo. Can you help me organize them into clean commits? Use the safe-git-split tool.

    • Read your context and instructions
    • Compiled the safe git split

    I have analyzed your working tree. I found changes across 12 files, including source code, tests, and configuration. I have flagged one potential secret that needs your attention before we proceed.

    Git Commit Plan

    🛑 DANGER FLAGS

    • Secrets Detected: config/settings.py (Line 42: possible API key pattern)
    • Large Changes: src/legacy_engine.py (+450 lines)
    • Generated Files: pnpm-lock.yaml

    Suggested Groups

    GroupFilesTypeSuggested Message
    1src/auth.py, src/utils.pyfeatfeat(auth): implement jwt validation logic
    2tests/test_auth.pytesttest(auth): add unit tests for validation
    3docs/api.md, README.mddocsdocs: update authentication documentation
    4package.json, pnpm-lock.yamlchorechore: update dependencies
    5src/ui_helpers.pystylestyle: fix indentation and whitespace

    Next steps

    1. Review the secret flag in config/settings.py line 42. Should we exclude this file or is it a false positive?
    2. Once the secret is addressed, let me know which group you want to commit first.
    3. We will proceed one group at a time to ensure the history remains clean.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Every agent session ends the same way: a working tree full of mixed changes — the fix, the tests for the fix, a README tweak, a config bump, a file that was only reindented, and (somewhere in there) an API key you pasted during debugging. Committing that as one blob ruins your history; splitting it by hand is tedious; letting the agent "just commit it" is how secrets get published. Safe Git Split is the middle path. Run it and you get a Markdown commit PLAN: changes grouped logically (code by module, tests, docs, config/build, formatting-only files in their own style: group); a Conventional Commits message suggested for every group, with the exact git add / git commit commands — as text in the plan, never executed; a danger section at the top: possible secrets (AWS/GitHub/Stripe/OpenAI-style keys, private keys, DB URLs with passwords, plain passwords — reported by file and line, values never shown), generated & lock files, and oversized changes; a hard stop where it matters: a group containing a secret-flagged file is marked STOP and its commit commands are withheld until the secret is removed and rotated; safety refusals: it will not emit a plan while a merge, rebase, or cherry-pick is in progress. Brand-new repos with no commits yet work fine. The included SKILL.md teaches your agent the full discipline: generate the plan, review it with you, then execute ONE group at a time — only after your explicit approval for that group — verifying git status after each commit. The tool is strictly read-only (a test proves the repo is byte-identical after a run), standard-library only, and ships with 32 passing tests and a demo that plants a fake secret and proves the plan flags it — and blocks its commit — without leaking it. One honest limit: splitting is file-level; two unrelated changes inside the same file land in the same group; use git add -p inside a group when you need hunk-level control. What's inside: safe_git_split/ CLI tool; SKILL.md agent workflow; demo/ one-command demo repo + generated sample plan; tests/ (32 pytest tests); README. Requirements: Python 3.10+, git. No pip dependencies.

    Does not support repositories in a merge, rebase, or cherry-pick state. Requires Python for the analysis script. Secret detection is a heuristic safety net, not a guarantee.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    • Free with an Agensi account

    Software
    PythonGit

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed9 days ago
    Updated8 days ago

    What's inside

    Creator

    LINH RATHHENRY

    LINH RATHHENRY

    7 skills on Agensi

    Frequently Asked Questions

    Safe Git Split analyzes your uncommitted changes and uses a specialized scanning engine to group them into atomic, logical commits (like separating logic from formatting) while scanning for secrets that manual 'git add' might miss.

    The skill works with any standard Git repository and supports common project structures like Python, Node.js, and Docker; it requires Python and the Git CLI to be installed on your local environment.

    You receive the complete skill package, including the analysis engine, the secret detection module, and a step-by-step workflow guide to integrate the agent into your local Git development cycle.

    For safety, the skill generates a Markdown plan for you to review first; no commits are executed or pushed until you have human-approved the grouped changes and messages.

    No, for safety reasons the tool will not run if your repository is currently in a merge, rebase, or cherry-pick state to prevent potential data loss or conflict resolution errors.

    Updates to the scanning patterns and logic are delivered through the marketplace platform, ensuring you have the latest protections against new secret formats and improved commit categorization.

    New in Code Quality & Review

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Code Quality & Review.

    Free