Token导航 LogoToken导航

Agent Skill · 开发

git-config(git 配置)

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

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

总安装 186周安装 8GitHub Stars 61下载 65核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/melodic-software/claude-code-plugins --skill git-config

这个 Skill 是做什么的

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

git-config 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。通过 npx skills add 命令从指定 GitHub 仓库安装使用。

安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。git-config 属于开发类 Skill,可作为该场景下的辅助能力补充。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/melodic-software/claude-code-plugins --skill g…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

git-config 怎么安装?

在终端执行 npx skills add https://github.com/melodic-software/claude-code-plugins --skill git-config。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

git-config 支持哪些 AI 工具?

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

git-config 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

git-config 是免费的吗?

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

git-config 用的人多吗?

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

git-config 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

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

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

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

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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-config

git 配置 · 本页

18661接触敏感数据未明确未通过

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

SKILL.md 原文

Git Configuration

Comprehensive guidance for configuring Git beyond basic installation. This skill covers global configuration, performance optimization, aliases, credential management, maintenance, and advanced configuration topics.

Table of Contents

Overview

This skill helps you:

  • Configure Git globally for optimal performance and workflow
  • Set up powerful aliases to streamline common operations
  • Manage Git credentials securely (GitHub CLI, Windows Credential Manager)
  • Configure .gitattributes for line ending control
  • Enable Git maintenance for better repository performance
  • Understand repository-level vs global configuration
  • Troubleshoot common configuration issues

For basic Git installation and setup, see the setup skill.

Example Use Cases

This skill activates for questions like:

  • "How do I set up Git aliases for common operations?"
  • "Configure Git to use GitHub CLI for authentication"
  • "My Git is slow on large repos - how can I optimize performance?"
  • "Set up.gitattributes for cross-platform development"
  • "Enable Git background maintenance"
  • "Troubleshoot 'refusing to allow OAuth App to create workflow' error"
  • "Configure Git credential helpers on Windows"
  • "Set up clone shortcuts for frequently-used repositories"
  • "Configure rerere to remember merge conflict resolutions"

When to Use This Skill

Use this skill when:

  • Configuring Git beyond basic user identity
  • Setting up aliases for common Git operations
  • Optimizing Git performance (fsmonitor, untrackedCache, parallel operations)
  • Managing Git credentials (HTTPS, SSH, token scopes)
  • Setting up GitHub CLI as credential helper
  • Configuring .gitattributes for cross-platform line ending control
  • Enabling Git background maintenance
  • Setting up clone shortcuts for frequently-used repositories
  • Troubleshooting credential issues or line ending errors
  • Understanding Git configuration hierarchy (system/global/local)

Quick Start

Most impactful configuration settings to apply immediately:

# Performance improvements
git config --global core.fsmonitor true
git config --global core.untrackedCache true
git config --global fetch.parallel 8
git config --global checkout.workers 8

# Better pull/rebase workflow
git config --global pull.rebase true
git config --global rebase.autoStash true
git config --global rebase.updateRefs true

# Auto-prune deleted remote branches
git config --global fetch.prune true
git config --global fetch.pruneTags true

# Better merge conflict resolution
git config --global merge.conflictstyle zdiff3

# Auto-setup remote tracking on first push
git config --global push.autoSetupRemote true

# Better diff algorithm
git config --global diff.algorithm histogram
git config --global diff.colorMoved zebra

# Line ending safety check
git config --global core.safecrlf warn

Quick Reference

Common Git configuration settings organized by category for quick lookup (performance, pull/rebase, fetch, push, diff, merge, line endings, sorting, maintenance).

📚 Complete Quick Reference Table: references/quick-reference.md

The quick reference table provides copy-paste commands for all common settings with category organization and purpose explanations.


Configuration File Locations

For detailed information about Git configuration file locations, hierarchy, and viewing configuration, see references/configuration-basics.md.

Quick summary:

  • System: /etc/gitconfig (or Git install dir on Windows) - All users
  • Global: ~/.gitconfig or ~/.config/git/config - Current user
  • Local: .git/config - Single repository only
  • Priority: Local > Global > System

View configuration:

# View all configuration with source files
git config --list --show-origin

# View specific value
git config user.name

Global Configuration Settings

These settings are cross-platform and recommended for all users. They should be set at the global level unless you need repository-specific overrides.

Most Essential Settings (Quick Start):

# Pull & rebase (cleaner history)
git config --global pull.rebase true
git config --global rebase.autoStash true

# Fetch (auto-prune deleted branches/tags)
git config --global fetch.prune true
git config --global fetch.pruneTags true
git config --global fetch.parallel 8

# Push (auto-setup remote tracking)
git config --global push.autoSetupRemote true

# Diff & merge (better algorithms and conflict display)
git config --global diff.algorithm histogram
git config --global diff.colorMoved zebra
git config --global merge.conflictstyle zdiff3

# Performance (filesystem monitoring)
git config --global core.fsmonitor true
git config --global core.untrackedCache true

# Sorting (newest first)
git config --global branch.sort -committerdate
git config --global tag.sort -taggerdate

📚 Complete Global Configuration Guide: references/global-configuration.md

Topics covered: Pull & rebase strategy, fetch strategy, push strategy, checkout/switch strategy, commit settings, status settings, diff settings, merge settings, rerere (conflict resolution memory), color settings, sorting, log settings, performance settings, submodule strategy, miscellaneous settings, and advanced configuration options.


Managing rerere (Reuse Recorded Resolution)

Git's rerere feature remembers how you resolved merge conflicts and can reapply those resolutions automatically.

Enable rerere:

git config --global rerere.enabled true
git config --global rerere.autoUpdate true

For detailed information about how rerere works, safety considerations, and management commands, see references/configuration-basics.md

Line Ending Strategy (Defense in Depth)

Cross-platform line ending management uses a layered approach:

  1. System level (autocrlf): Platform-specific default (Windows: true, macOS/Linux: input)
  2. Global level (safecrlf): Warns about MIXED endings (actual problems) but allows legitimate conversions
  3. Repository level (.gitattributes): Explicit control per file type

Defense in depth: These settings are complementary, not conflicting:

  • autocrlf handles the conversion automatically
  • safecrlf=warn warns about PROBLEMS (mixed line endings) but doesn't block.gitattributes conversions
  • .gitattributes provides per-repo fine-grained control

Important: Don't use safecrlf=true when you have .gitattributes - it will block legitimate conversions and cause constant errors!

Platform-specific autocrlf settings:

  • Windows: git config --global core.autocrlf true (converts LF→CRLF on checkout, CRLF→LF on commit)
  • macOS/Linux: git config --global core.autocrlf input (converts CRLF→LF on commit, no conversion on checkout)
  • WSL: git config --global core.autocrlf input (same as Linux)

Global safecrlf setting (all platforms):

# Warn about mixed line endings (safeguard against problems)
# Use 'warn' not 'true' - allows .gitattributes to work without constant errors
git config --global core.safecrlf warn

For detailed.gitattributes setup and comprehensive line ending guidance, see the line-endings skill.


Aliases

Aliases provide shortcuts for common Git operations. Categories include: information & inspection, navigation, branch operations, staging/unstaging, committing, history editing, remote operations, and tag pushing workflows.

Most Common Aliases:

# Status and branch info
git config --global alias.st "status -sb"
git config --global alias.br "branch -vv"

# Modern branch switching
git config --global alias.co "switch"
git config --global alias.cob "switch -c"

# Quick amend
git config --global alias.amend "commit --amend --no-edit"

# Safe force push
git config --global alias.pfwl "push --force-with-lease"

📚 Complete Alias Guide: references/aliases.md

Topics covered: Information & inspection aliases, navigation utilities, branch operations, staging/unstaging shortcuts, committing helpers, history editing (DANGER!), remote operations, tag pushing workflows, clone shortcuts with url.insteadOf, organization/personal shorthand patterns, and customization templates.


Clone Shortcuts

Git's url.insteadOf feature creates shorthand prefixes for clone URLs. Example: git clone gh:username/repo instead of git clone git@github.com:username/repo.git.

Quick Example:

# Universal GitHub shorthand
git config --global url."git@github.com:".insteadOf "gh:"
# Usage: git clone gh:microsoft/vscode

📚 Complete Clone Shortcuts Guide: references/aliases.md#clone-shortcuts

Topics covered: Universal GitHub shorthand, organization/personal shortcuts, corporate Git servers, custom namespace templates, and usage examples.


Repository-Level Configuration

These settings are context-specific - use them in individual repos when needed, NOT as global defaults.

When to use repo-level config:

  • Repo-specific requirements (submodules, performance, size)
  • Overriding global settings for specific workflows
  • Team-specific conventions for that repository

Examples:

# Enable submodule recursion in a specific repo
git config submodule.recurse true

# Disable ahead/behind in a massive repo (performance)
git config status.aheadBehind false

# Override line ending strategy (with .gitattributes)
git config core.autocrlf false

Maintenance

Git can perform background maintenance to keep repositories fast (commit-graph updates, incremental repacking, loose object cleanup).

Quick Setup:

# Enable background maintenance once for your account
git maintenance start

# Register each active repo for maintenance
git maintenance register

# Enable commit-graph generation globally
git config --global gc.writeCommitGraph true

Common Commands:

# Run maintenance now
git maintenance run

# See which repos are registered
git config --global --get-all maintenance.repo

# Unregister a repo
git maintenance unregister

📚 Complete Maintenance Guide: references/global-configuration.md#maintenance

Topics covered: Background maintenance tasks, scheduling (hourly/daily/weekly), task configuration, disabling full gc, maintenance.auto setting, per-task enablement, troubleshooting maintenance issues.


Git Attributes

.gitattributes provides explicit control over line endings per file type. This is the recommended approach for cross-platform teams.

Best practice: Control endings in .gitattributes and use platform-appropriate autocrlf settings with safecrlf=warn.

Quick Example:

# Auto-detect text files and normalize line endings
* text=auto

# Force LF for scripts/config (shell and CI tools expect LF)
*.sh      text eol=lf
*.yml     text eol=lf
*.json    text eol=lf

# Force CRLF for Windows-specific files
*.ps1     text eol=crlf
*.cmd     text eol=crlf
*.bat     text eol=crlf

# Mark binaries
*.png binary
*.jpg binary
*.pdf binary

Normalize existing repos with mixed endings:

git add --renormalize .
git commit -m "Normalize line endings"

📚 For comprehensive.gitattributes setup, Git LFS patterns, and line ending strategy, see the line-endings skill.


Git Credential Management

Git uses credential helpers to store and retrieve authentication credentials for remote operations (clone, fetch, push). Understanding credential management is essential for secure, efficient Git workflows.

For comprehensive credential management guidance, see references/credential-management.md.

Quick overview:

  • Windows: Default credential helper is Windows Credential Manager (manager)
  • macOS: Default is macOS Keychain (osxkeychain)
  • Linux: Default is memory cache (cache) or libsecret for persistent storage
  • GitHub users: Hybrid setup recommended (gh CLI for GitHub, OS credential manager for others)

Quick setup for GitHub (hybrid approach):

# 1. Authenticate with gh CLI
gh auth login --scopes "repo,read:org,workflow" --git-protocol https

# 2. Configure gh CLI as credential helper for GitHub only
gh auth setup-git

# 3. Verify hybrid setup
git config --list | grep credential
# Should show:
# - credential.helper=manager (or osxkeychain/cache - OS default)
# - credential.https://github.com.helper=!gh auth git-credential (GitHub-specific)

Common credential issues:

  • "refusing to allow OAuth App to create or update workflow" → Need workflow scope
  • Git still uses old/wrong credentials → Clear OS credential cache
  • SSH vs HTTPS confusion → Check remote URL with git remote -v

For detailed troubleshooting, credential helper options, security best practices, and platform-specific guidance, see references/credential-management.md.


Troubleshooting

For comprehensive troubleshooting guidance, see references/troubleshooting.md.

Quick links:


Related Skills

  • setup: Basic Git installation and initial configuration
  • line-endings: Comprehensive line ending configuration, .gitattributes, Git LFS
  • gpg-signing: GPG commit signing setup and troubleshooting
  • gui-tools: Git GUI client installation and configuration

Test Scenarios

For test scenarios validating skill activation and response quality, see references/test-scenarios.md.

Coverage: 9 scenarios covering basic use (aliases, performance, maintenance), advanced use (credentials, line endings, repo config), troubleshooting (credential issues, rerere), and shortcuts (clone shortcuts, url.insteadOf).


Version History

  • v1.3.0 (2025-11-25): Audit compliance improvements

- Extracted Test Scenarios to references/test-scenarios.md - Reduced SKILL.md from 539 to ~475 lines (under 500-line recommendation) - Improved progressive disclosure compliance

  • v1.2.0 (2025-11-12): Quality improvements based on audit recommendations

- Extracted Configuration File Locations to references/configuration-basics.md - Extracted Managing rerere to references/configuration-basics.md - Extracted Troubleshooting to references/troubleshooting.md - Added multi-model testing notes - Added common real-world usage scenarios - Reduced SKILL.md line count from 959 to ~700 lines (improved performance) - Added tables of contents to all reference files for better navigation - Created references/troubleshooting.md with comprehensive troubleshooting guidance

  • v1.1.0 (2025-11-12): Usability enhancements based on audit feedback

- Added Example Use Cases section with concrete activation examples - Added Quick Reference Table for quick lookup of common settings - Improved autonomous activation reliability

  • v1.0.0 (2025-11-09): Initial release with comprehensive Git configuration guidance

Official Documentation


Last Updated

Date: 2025-11-28 Model: claude-opus-4-5-20251101

平台分布

Codex

32.75%
按下载量换算21

Claude

28.92%
按下载量换算19

Cursor

19.5%
按下载量换算13

Gemini CLI

10.15%
按下载量换算7

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills