본문으로 건너뛰기
Skillpedia
일반 코딩48k · #5814

smart-git-automation

하는 일

이 도구는 코드 변경 사항을 더 똑똑하게 관리하도록 돕습니다. 관련 파일을 묶고, 새 '브랜치'(코드의 버전)의 이름을 제안하며, 변경 사항을 저장하고 보내는 과정의 일부를 자동화합니다.

사용하는 경우

  • ✓작은 변경이 많아서 그것들을 묶고 싶을 때.
  • ✓새 기능을 만들면서 코드 버전에 명확한 이름이 필요할 때.
  • ✓코드를 검토받기 위해 저장하고 보내는 과정을 빠르게 하고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/smart-git-automation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/smart-git-automation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 코드 변경 사항을 저장하고 싶습니다.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

수정된 파일을 분석해 유사성에 따라 묶습니다. 그다음 새 코드 버전에 대한 설명적인 이름을 만들고, 더 적은 수동 단계로 변경 사항을 저장하고 보내도록 돕습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

What I do

  • Intelligently detect and group related changes
  • Auto-generate descriptive branch names from changes
  • Streamlined workflow: scan → branch → commit → push → PR with fewer prompts

When to Use

Use this when you want a faster, smarter git workflow that groups changes logically and reduces manual confirmation overhead.

Workflow Steps

1. Smart Detection & Grouping

Run in parallel:

  • git status - check what's changed
  • git diff --stat - see file modification summary
  • git diff --name-only - list changed files only
  • git diff --staged --stat - see what's already staged

Analyze changes to group them logically:

  • Files in the same module/directory → likely related
  • Files that were modified together in recent edits → likely related
  • New files that complement each other → likely related

Present grouped changes in a clear format, e.g.:

📁 Group 1: UI Components
  - src/components/Button.tsx (modified)
  - src/components/Button.test.tsx (modified)

📁 Group 2: API Layer
  - src/api/client.ts (new)
  - src/api/types.ts (modified)

2. Auto Branch Name Generation

Generate branch name from dominant change pattern:

  • Use format: <type>/<short-description>
  • Types: feature, fix, refactor, docs, test, chore
  • Derive description from most significant changed file/feature
  • Convert to kebab-case, max 50 chars
  • Examples:
    • feature/add-user-auth (from auth-related files)
    • fix/login-validation (from validation changes)
    • refactor/api-cleanup (from API refactoring)

Show the proposed branch name and ask for one-word confirmation (or type alternative).

3. Streamlined Branch & Commit

  • If not on main/master: check if current branch matches proposed name
    • If yes: stay on it
    • If no: ask to switch or create new
  • Create branch only after validating the branch name, then use git checkout -b "$branch_name"
  • Stage explicit pathspecs only: git add -- path/to/file ...
    • If file paths are generated, keep them NUL-delimited (git diff -z --name-only) and pass them as pathspec arguments.
    • Never concatenate untrusted filenames into a shell command and never run the placeholder text literally.
  • Auto-generate commit message from changes:
    • First line: <type>: <short description> (max 72 chars)
    • Body: grouped file changes with brief descriptions
  • Commit with generated message, show preview first
  • Ask for one-word confirmation to proceed

4. Push & Optional PR

  • After commit, ask: "Push to remote? (yes/no/abort)"
  • If yes: git push -u origin <branch-name>
  • Then ask: "Create PR? (yes/no)"
  • If yes:
    • Check remote: git remote -v
    • If fork: use fork's remote (e.g., mskadu/repo-name)
    • Auto-generate PR description from commit messages
    • Use gh pr create with:
      • Title from branch name
      • Body: summary of changes + file breakdown + follow-up notes

Key Rules

  • Group related files automatically, but allow user to adjust
  • Generate branch names from actual changes, don't ask user to name them
  • Reduce confirmations: ask for one-word answers or single confirmation points
  • Never commit secrets, credentials, or large binaries
  • Check if GitHub repo exists before PR creation
  • Skip PR step if user says "no" at any point
  • If branch already exists with changes, offer to amend or add new commit

Limitations

  • Do not bypass repository-specific maintainer rules, branch policies, or required review gates.
  • Confirm destructive or publishing actions explicitly; this skill should streamline routine Git flow, not remove accountability.
자주 묻는 질문

Git의 「변경 사항」과 「브랜치」란 무엇인가요?

변경 사항은 프로젝트 파일에 하는 수정입니다. 브랜치는 기본 버전에 영향을 주지 않고 새 기능이나 수정 작업을 할 수 있는 프로젝트의 병렬 복사본과 같습니다.

관련 파일을 묶는 이유는 무엇인가요?

관련 파일을 묶으면 코드의 어떤 부분이 연결되어 있는지 이해하기 쉽고, 더 정확한 브랜치 이름과 명확한 커밋 메시지를 만드는 데 도움이 됩니다.

도구가 제 코드를 자동으로 저장하나요?

도구는 단계를 자동화하고 제안하지만, 코드 저장(커밋)이나 전송(푸시) 같은 중요한 작업은 항상 사용자의 확인을 받은 후에 진행합니다.

상세 정보

작성자의 원본 설명

Smart change detection, auto branch naming, and streamlined commit/PR workflow

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5814
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬