Token导航 LogoToken导航

Agent Skill · 开发

git-automation(git 自动化)

git-automation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

git-automation 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为权限未标注;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 21,446。

总安装 188周安装 8GitHub Stars 22下载 66核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-automation(git 自动化)
来源仓库:https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude
仓库路径:skills/git-automation
安装命令:
npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude --skill git-automation
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude --skill git-automation

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

git-automation 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,辅助整理项目状态与变更。适用于需要围绕仓库状态或协作事项进行整理的场景。通过 npx skills add 命令从 GitHub 仓库安装,需确认权限与维护状态。

使用前建议核实是否会触发联网、命令执行或文件读写操作。可结合原始 README 进一步验证具体用法和功能边界。

来源仓库内路径:skills/git-automation

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-cla…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    权限没有明确标注,第一次使用时只给一个无关紧要的任务,观察它到底读了哪些文件和网络。

常见问题

6 条

git-automation 怎么安装?

在终端执行 npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude --skil…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

git-automation 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

git-automation 需要什么权限?

权限级别没有明确标注。第一次使用时建议只给无关紧要的任务,观察它实际读写了哪些内容。

git-automation 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

git-automation 用的人多吗?

公开数据是累计安装 188 次,近一周安装 8 次,下载 66 次,GitHub 22 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

git-automation 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
git-automation

git 自动化 · 本页

18822权限未标注未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Overview

Comprehensive Git automation skill that provides intelligent repository management, advanced branching strategies, automated commit optimization, and sophisticated release workflows with continuous learning from repository patterns.

Git Repository Intelligence

Repository Analysis

# Analyze repository structure and patterns
analyze_repository() {
  local repo_path=$1

  # Repository metrics
  local total_commits=$(git rev-list --count HEAD)
  local total_branches=$(git branch -a | wc -l)
  local total_tags=$(git tag -l | wc -l)
  local repo_size=$(du -sh .git 2>/dev/null | cut -f1)

  # Activity metrics
  local recent_commits=$(git log --since="1 month ago" --oneline | wc -l)
  local active_contributors=$(git log --since="3 months ago" --format='%ae' | sort -u | wc -l)

  # Quality metrics
  local merge_conflicts=$(git log --grep="conflict" --oneline | wc -l)
  local large_files=$(git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort -nr | head -10 | wc -l)

  echo "Repository Analysis for $repo_path:"
  echo "  Total Commits: $total_commits"
  echo "  Total Branches: $total_branches"
  echo "  Total Tags: $total_tags"
  echo "  Repository Size: $repo_size"
  echo "  Recent Commits (1mo): $recent_commits"
  echo "  Active Contributors (3mo): $active_contributors"
  echo "  Merge Conflicts: $merge_conflicts"
  echo "  Large Files (>1MB): $large_files"
}

Branching Strategy Detection

# Detect current branching strategy
detect_branching_strategy() {
  local main_branch=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')
  local develop_branch=$(git branch -r | grep -E "origin/develop|origin/dev" | head -1 | sed 's@origin/@@')
  local release_branches=$(git branch -r | grep -E "origin/release|origin/rel" | wc -l)
  local feature_branches=$(git branch -r | grep -E "origin/feat|origin/feature" | wc -l)

  if [[ -n "$develop_branch" ]] && [[ $release_branches -gt 0 ]]; then
    echo "GitFlow"
  elif [[ -z "$develop_branch" ]] && [[ $feature_branches -gt 0 ]]; then
    echo "GitHub Flow"
  elif [[ $feature_branches -eq 0 ]] && [[ $release_branches -eq 0 ]]; then
    echo "Trunk-Based Development"
  else
    echo "Custom Strategy"
  fi
}

Intelligent Commit Management

Semantic Commit Analysis

# Analyze commits for semantic versioning impact
analyze_commit_impact() {
  local commit_range=$1

  # Count commit types
  local breaking_changes=$(git log --oneline $commit_range | grep -c "BREAKING\|breaking")
  local features=$(git log --oneline $commit_range | grep -c "feat:")
  local fixes=$(git log --oneline $commit_range | grep -c "fix:")
  local performance=$(git log --oneline $commit_range | grep -c "perf:")
  local refactors=$(git log --oneline $commit_range | grep -c "refactor:")

  # Determine version bump
  if [[ $breaking_changes -gt 0 ]]; then
    echo "major ($breaking_changes breaking changes)"
  elif [[ $features -gt 0 ]]; then
    echo "minor ($features features added)"
  else
    echo "patch ($fixes fixes, $performance improvements)"
  fi
}

# Generate intelligent commit messages
generate_commit_message() {
  local changes=$(git diff --cached --name-only)
  local commit_type=""
  local scope=""
  local description=""

  # Analyze changed files to determine commit type
  if echo "$changes" | grep -q "test\|spec"; then
    commit_type="test"
  elif echo "$changes" | grep -q "doc\|readme\|md"; then
    commit_type="docs"
  elif echo "$changes" | grep -q "package\|requirements\|setup"; then
    commit_type="chore"
  elif echo "$changes" | grep -q "\.py\|\.js\|\.ts\|\.java\|\.cpp"; then
    commit_type="feat"  # Default to feature for code changes
  fi

  # Extract scope from file paths
  scope=$(echo "$changes" | head -1 | cut -d'/' -f1)

  # Generate description from file changes
  description=$(echo "$changes" | head -3 | tr '\n' ', ' | sed 's/,$//')

  echo "$commit_type($scope): $description"
}

Automated Commit Optimization

# Optimize commit history
optimize_commit_history() {
  local target_branch=$1
  local since_date=${2:-"1 month ago"}

  # Identify fixup commits
  local fixup_commits=$(git log --since="$since_date" --oneline --grep="fixup!" --grep="squash!" | wc -l)

  if [[ $fixup_commits -gt 0 ]]; then
    echo "Found $fixup_commits fixup/squash commits"

    # Interactive rebase to squash fixups
    local base_commit=$(git merge-base $target_branch HEAD)
    git rebase -i --autosquash $base_commit
  fi

  # Remove empty commits
  git filter-branch --commit-filter '
    if git rev-parse --verify HEAD^1 >/dev/null 2>&1 &&
       [ "$(git diff-tree --no-commit-id --root -r --name-only HEAD | wc -l)" = 0 ]; then
      skip_commit "$@";
    else
      git commit-tree "$@";
    fi
  ' HEAD~50..HEAD
}

Advanced Release Automation

Intelligent Version Bumping

# Smart version bump based on changes
smart_version_bump() {
  local current_version=$(get_current_version)
  local commit_range=$(get_last_release_range)
  local version_impact=$(analyze_commit_impact "$commit_range")

  echo "Current version: $current_version"
  echo "Version impact: $version_impact"

  case $version_impact in
    major*)
      local new_version=$(bump_version "$current_version" major)
      ;;
    minor*)
      local new_version=$(bump_version "$current_version" minor)
      ;;
    patch*)
      local new_version=$(bump_version "$current_version" patch)
      ;;
  esac

  echo "New version: $new_version"
  update_version_files "$new_version"
}

# Update version across all files
update_version_files() {
  local new_version=$1

  # Common version files
  local version_files=(
    "package.json"
    "setup.py"
    "pyproject.toml"
    "Cargo.toml"
    "composer.json"
    "pom.xml"
    "__init__.py"
    "version.py"
    "Dockerfile"
  )

  for file in "${version_files[@]}"; do
    if [[ -f "$file" ]]; then
      case "$file" in
        "package.json")
          npm version $new_version --no-git-tag-version
          ;;
        "setup.py"|"pyproject.toml")
          bump2version $new_version --allow-dirty
          ;;
        "Cargo.toml")
          cargo bump $new_version
          ;;
        *)
          # Generic version update
          sed -i "s/version\s*=\s*[\"'][0-9]\+\.[0-9]\+\.[0-9]\+[\"']/version = \"$new_version\"/" "$file"
          ;;
      esac
    fi
  done
}

Release Workflow Automation

# Complete release workflow
execute_release_workflow() {
  local new_version=$1
  local release_notes_file=$2

  echo "Starting release workflow for v$new_version"

  # 1. Pre-release validation
  validate_release_readiness || exit 1

  # 2. Update version files
  update_version_files "$new_version"

  # 3. Generate changelog
  generate_changelog "$new_version" > CHANGELOG.md.tmp
  cat CHANGELOG.md.tmp >> CHANGELOG.md
  rm CHANGELOG.md.tmp

  # 4. Commit version changes
  git add .
  git commit -m "chore(release): v$new_version"

  # 5. Create release branch/tag
  git checkout -b "release/v$new_version"
  git tag -a "v$new_version" -m "Release v$new_version"

  # 6. Merge to main
  git checkout main
  git merge "release/v$new_version" --no-ff

  # 7. Push changes
  git push origin main
  git push origin "v$new_version"

  # 8. Create GitHub release
  if command -v gh >/dev/null 2>&1; then
    if [[ -f "$release_notes_file" ]]; then
      gh release create "v$new_version" --title "Release v$new_version" --notes-file "$release_notes_file"
    else
      gh release create "v$new_version" --title "Release v$new_version" --generate-notes
    fi
  fi

  # 9. Cleanup
  git branch -d "release/v$new_version"

  echo "Release v$new_version completed successfully!"
}

# Pre-release validation
validate_release_readiness() {
  local errors=0

  # Check working directory is clean
  if [[ -n $(git status --porcelain) ]]; then
    echo "❌ Working directory is not clean"
    ((errors++))
  fi

  # Run tests
  if command -v npm >/dev/null 2>&1; then
    npm test || ((errors++))
  elif command -v pytest >/dev/null 2>&1; then
    pytest || ((errors++))
  fi

  # Check for linting issues
  if command -v npm >/dev/null 2>&1; then
    npm run lint || ((errors++))
  elif command -v flake8 >/dev/null 2>&1; then
    flake8 . || ((errors++))
  fi

  # Security scan
  if command -v npm >/dev/null 2>&1; then
    npm audit --audit-level high || ((errors++))
  fi

  if [[ $errors -gt 0 ]]; then
    echo "❌ Pre-release validation failed with $errors errors"
    return 1
  fi

  echo "✅ Pre-release validation passed"
  return 0
}

Multi-Platform Integration

GitHub Integration

# GitHub operations automation
github_operations() {
  local operation=$1
  local repo_name=$2

  case $operation in
    "create-pr")
      local title=$3
      local body=$4
      local head_branch=$5
      local base_branch=${6:-"main"}

      gh pr create \
        --title "$title" \
        --body "$body" \
        --head "$head_branch" \
        --base "$base_branch"
      ;;

    "merge-pr")
      local pr_number=$2
      local merge_method=${3:-"merge"}

      gh pr merge "$pr_number" --"$merge_method" --delete-branch
      ;;

    "create-release")
      local tag=$2
      local title=$3
      local notes_file=$4

      if [[ -f "$notes_file" ]]; then
        gh release create "$tag" --title "$title" --notes-file "$notes_file"
      else
        gh release create "$tag" --title "$title" --generate-notes
      fi
      ;;

    "update-repo-info")
      local description=$2
      local homepage=$3
      local topics=$4

      gh repo edit \
        --description "$description" \
        --homepage "$homepage" \
        --add-topic $topics
      ;;
  esac
}

GitLab Integration

# GitLab operations automation
gitlab_operations() {
  local operation=$1

  case $operation in
    "create-mr")
      local title=$2
      local description=$3
      local source_branch=$4
      local target_branch=${5:-"main"}

      glab mr create \
        --title "$title" \
        --description "$description" \
        --source-branch "$source_branch" \
        --target-branch "$target_branch"
      ;;

    "create-release")
      local tag=$2
      local name=$3
      local description=$4

      glab release create "$tag" \
        --name "$name" \
        --description "$description"
      ;;
  esac
}

Repository Health Management

Repository Cleanup

# Cleanup repository for better performance
cleanup_repository() {
  echo "Cleaning up repository..."

  # Remove unreachable objects
  git prune --expire=now

  # Compress repository
  git gc --aggressive --prune=now

  # Remove stale references
  git remote prune origin

  # Clean up large files (requires git-filter-repo)
  if command -v git-filter-repo >/dev/null 2>&1; then
    git-filter-repo --strip-blobs-bigger-than 10M
  fi

  # Check for sensitive data
  if command -v git-secrets >/dev/null 2>&1; then
    git-secrets --scan-history
  fi

  echo "Repository cleanup completed"
}

# Analyze repository health
analyze_repository_health() {
  local issues=0

  echo "Repository Health Analysis:"

  # Check for large files
  local large_files=$(git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | awk '$2 > 1048576 { print $2, $3 }')
  if [[ -n "$large_files" ]]; then
    echo "⚠️  Found large files in repository:"
    echo "$large_files"
    ((issues++))
  fi

  # Check for many small commits
  local small_commits=$(git log --stat --oneline | awk '{if($2 < 10) count++} END {print count+0}')
  if [[ $small_commits -gt 50 ]]; then
    echo "⚠️  High number of small commits ($small_commits). Consider squashing."
    ((issues++))
  fi

  # Check for old branches
  local old_branches=$(git branch -r | while read branch; do
    local last_commit=$(git log -1 --format='%ci' "$branch" 2>/dev/null)
    if [[ -n "$last_commit" ]]; then
      local days_old=$(( ($(date +%s) - $(date -d "$last_commit" +%s)) / 86400 ))
      if [[ $days_old -gt 90 ]]; then
        echo "$branch ($days_old days old)"
      fi
    fi
  done)

  if [[ -n "$old_branches" ]]; then
    echo "⚠️  Found old branches:"
    echo "$old_branches"
    ((issues++))
  fi

  if [[ $issues -eq 0 ]]; then
    echo "✅ Repository is healthy"
  else
    echo "❌ Found $issues health issues"
  fi
}

Integration Patterns

Continuous Learning Integration

{
  "git_patterns": {
    "commit_frequency": {
      "average": 5.2,
      "peak_day": "friday",
      "peak_time": "14:00 UTC"
    },
    "branch_strategy": "github_flow",
    "release_cadence": "bi_weekly",
    "common_issues": [
      "merge_conflicts",
      "version_inconsistencies",
      "documentation_drift"
    ],
    "optimization_opportunities": [
      "automated_changelog_generation",
      "pre_commit_validation",
      "automated_dependency_updates"
    ]
  },
  "automation_success_rates": {
    "release_automation": 0.95,
    "version_bumping": 0.98,
    "branch_creation": 0.99,
    "commit_optimization": 0.87
  }
}

Error Recovery Patterns

# Handle common Git operation failures
handle_git_failure() {
  local operation=$1
  local error_code=$2

  case $operation in
    "merge")
      if [[ $error_code -eq 1 ]]; then
        echo "Merge conflict detected. Attempting resolution..."
        git merge --abort
        # Analyze conflicts and suggest resolution strategy
      fi
      ;;
    "push")
      if [[ $error_code -eq 1 ]]; then
        echo "Push failed. Checking for issues..."
        # Check if remote is ahead
        git fetch origin
        local behind=$(git rev-list --count HEAD..origin/$(git branch --show-current))
        if [[ $behind -gt 0 ]]; then
          echo "Local branch is $behind commits behind. Pulling first..."
          git pull origin $(git branch --show-current)
        fi
      fi
      ;;
  esac
}

When to Apply

Use Git Automation when:

  • Managing complex branching strategies and release workflows
  • Need to standardize commit messages and version bumping
  • Automating GitHub/GitLab operations and releases
  • Optimizing repository performance and health
  • Implementing continuous deployment pipelines
  • Coordinating multi-platform repository operations

The Git Automation skill provides comprehensive repository management with intelligent automation, learning capabilities, and seamless integration with modern development workflows.

平台分布

Codex

32.98%
按下载量换算22

Claude

30.3%
按下载量换算20

Cursor

17.74%
按下载量换算12

Gemini CLI

9.82%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

权限未标注

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills