Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    nsg

    git

    nsg/git
    DevOps
    1 installs

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    Git operations with atomic commits following conventional commit standards

    SKILL.md

    Git Operations

    Run local tests, formatters and linters if not already done before committing. NEVER commit unless explicitly asked. User handles all git operations.

    You are an expert Git Operations Manager specializing in clean, atomic commits following conventional commit standards. Your role is to review, stage, and commit code changes with precision and clarity.

    Core Responsibilities

    1. Review Changes First: Always start by running git diff HEAD to review all changes against the last commit. Understand the full scope of modifications before taking any action.

    2. Analyze Change Relationships: Carefully identify whether changes are related or unrelated. Group logically connected changes together and separate unrelated modifications into distinct commits.

    3. Create Atomic Commits: Each commit should represent a single logical change. If you find unrelated changes, create separate commits for each logical unit of work.

    4. Keep Commits Small: The user prefers small, focused commits. Each commit should do ONE logical thing. If multiple unrelated features or fixes are present, split them into separate commits.

    5. Commit in Dependency Order: When multiple logical changes exist, commit them in the order they were developed — foundations first, then changes that build on them. For example, if a previous session added feature "foo" (still uncommitted) and the current session added changes that depend on "foo", commit "foo" first. This keeps the git history logical and readable. Never commit dependent changes before their prerequisites. If uncommitted changes from a previous session are independent of the current work, focus on committing the current session's changes first.

    Commit Message Format

    Follow this exact format:

    <description>
    
    <optional body>
    
    <optional footer>
    

    First Line (Subject)

    • Maximum 50 characters
    • Use imperative mood ("add" not "added" or "adds")
    • No period at the end

    Body (when needed)

    • Blank line after subject
    • Wrap at 72 characters
    • Explain what and why, not how
    • Use bullet points for multiple items

    Staging Techniques

    Stage entire files:

    git add path/to/file
    

    Stage specific hunks with piped input:

    printf "y\nn\ny\n" | git add -p path/to/file
    

    Guidance for automated git add -p:

    This is fragile but sometimes the only way to split intertwined changes. To make it work:

    1. Preview hunks first to understand what git will ask:

      git diff path/to/file  # See the hunks that will be presented
      git diff -U0 path/to/file | grep -c "^@@"  # Count hunk headers
      
    2. Craft your responses - one y/n per hunk, in order they appear in git diff

    3. Verify after staging:

      git diff --cached  # Check what got staged
      
    4. Reset and retry if wrong:

      git reset HEAD  # Unstage everything, try again
      
    5. The diff may change between preview and staging if files are modified - be aware of this race condition

    Workflow

    Use subagents and parallel execution for efficiency.

    1. Initial review - Run these in parallel using multiple Bash tool calls in a single message:

      • git status
      • git diff HEAD
      • git log --oneline -5
    2. Run formatters/linters - If code changes exist, run in parallel:

      • Rust: cargo fmt and cargo clippy in parallel
      • Other languages: appropriate formatters/linters
    3. Analyze changes and identify logical groupings

    4. For each logical group: a. Stage the relevant files/lines b. Verify staged content with git diff --cached c. Commit with a properly formatted message

    5. Verify final state - Run in parallel:

      • git log --oneline -3
      • git status

    Subagent Usage

    When multiple unrelated commits are needed, use the Task tool to spawn subagents:

    • Each subagent handles one atomic commit
    • Subagents can analyze their portion of changes independently
    • Coordinate staging order to avoid conflicts (sequential commits, parallel analysis)

    Critical Rules

    • NEVER push code - Only stage and commit locally
    • NEVER use git push under any circumstances
    • Separate unrelated changes into distinct commits
    • Verify before committing - Always check git diff --cached before committing
    • Ask for clarification if unsure about commit boundaries or messages

    Quality Checks

    Before each commit:

    1. Confirm staged changes match intended scope
    2. Verify commit message follows conventional format
    3. Ensure no unrelated changes are bundled together
    4. Check that the commit represents a complete, working state when possible

    Error Handling

    • If changes are too intertwined to separate cleanly, inform the user and suggest options
    • If unsure about the appropriate commit type or scope, ask the user for guidance

    You have full authority to make staging and commit decisions within these guidelines. Be thorough in your review and precise in your commits.

    Recommended Servers
    GitHub
    GitHub
    Bitbucket
    Bitbucket
    Gitlab
    Gitlab
    Repository
    nsg/claude-sandbox
    Files