MCP HubMCP Hub
SKILL·4AF523

configure-git-repository

pjt222
업데이트됨 1 month ago
8 조회
26
3
26
GitHub에서 보기
기타general

정보

이 스킬은 R, Node.js, Python 프로젝트를 위해 언어별 .gitignore 파일, 브랜치 전략, 커밋 규칙, 그리고 훅을 설정하여 Git 저장소를 구성합니다. 새 프로젝트의 버전 관리를 초기화하거나 브랜치 보호 및 커밋 표준을 설정할 때 사용하세요. 초기 설정과 일반적인 Git 워크플로 패턴을 모두 처리합니다.

빠른 설치

Claude Code

추천
기본
npx skills add pjt222/agent-almanac -a claude-code
플러그인 명령대체
/plugin add https://github.com/pjt222/agent-almanac
Git 클론대체
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/configure-git-repository

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Configure Git Repository

Set up Git repo with appropriate config for project type.

When Use

  • Initialize version control for new project
  • Add .gitignore for specific language/framework
  • Set up branch protection, conventions
  • Configure commit hooks

Inputs

  • Required: Project directory
  • Required: Project type (R package, Node.js, Python, general)
  • Optional: Remote repo URL
  • Optional: Branch strategy (trunk-based, Git Flow)
  • Optional: Commit message convention

Steps

Step 1: Initialize Repository

cd /path/to/project
git init
git branch -M main

Got: .git/ directory created. Default branch named main.

If fail: git init fails? Ensure Git installed (git --version). Directory already has .git/? Repo already initialized — skip.

Step 2: Create .gitignore

R Package:

# R artifacts
.Rhistory
.RData
.Rproj.user/
*.Rproj

# Environment (sensitive)
.Renviron

# renv library (machine-specific)
renv/library/
renv/staging/
renv/cache/

# Build artifacts
*.tar.gz
src/*.o
src/*.so
src/*.dll

# Documentation build
docs/
inst/doc/

# IDE
.vscode/
.idea/

# OS
.DS_Store
Thumbs.db

Node.js/TypeScript:

node_modules/
dist/
build/
.next/
.env
.env.local
.env.*.local
*.log
npm-debug.log*
.DS_Store
Thumbs.db
.vscode/
.idea/
coverage/

Python:

__pycache__/
*.py[cod]
*.egg-info/
dist/
build/
.eggs/
.venv/
venv/
.env
*.log
.mypy_cache/
.pytest_cache/
htmlcov/
.coverage
.DS_Store
.idea/
.vscode/

Got: .gitignore created with entries appropriate for project type. Sensitive files (.Renviron, .env) and generated artifacts excluded.

If fail: Unsure which entries to include? Use gitignore.io or GitHub .gitignore templates as starting point, customize for project.

Step 3: Create Initial Commit

git add .gitignore
git add .  # Review what's being added first with git status
git commit -m "Initial project setup"

Got: First commit created containing .gitignore and initial project files. git log shows one commit.

If fail: git commit fails with "nothing to commit"? Ensure files staged with git add. Fails with author identity error? Set git config user.name and git config user.email.

Step 4: Connect Remote

# Add remote
git remote add origin [email protected]:username/repo.git

# Push
git push -u origin main

Got: Remote origin configured. git remote -v shows fetch and push URLs. Initial commit pushed to remote.

If fail: Push fails with "Permission denied (publickey)"? Configure SSH keys (see setup-wsl-dev-environment). Remote already exists? Update with git remote set-url origin <url>.

Step 5: Set Up Branch Conventions

Trunk-based (recommended for small teams):

  • main: production-ready code
  • Feature branches: feature/description
  • Bug fixes: fix/description
# Create feature branch
git checkout -b feature/add-authentication

# After work is done, merge or create PR
git checkout main
git merge feature/add-authentication

Got: Branch naming convention established, documented. Team members know which prefix to use for each type of work.

If fail: Branches already named inconsistently? Rename with git branch -m old-name new-name, update any open PRs.

Step 6: Configure Commit Conventions

Conventional Commits format:

type(scope): description

feat: add user authentication
fix: correct calculation in weighted_mean
docs: update README installation section
test: add edge case tests for parser
refactor: extract helper function
chore: update dependencies

Got: Commit message convention documented, agreed by team. Future commits follow type: description format.

If fail: Team members not following convention? Enforce with commit-msg hook that validates format (see Step 7).

Step 7: Set Up Pre-Commit Hooks (Optional)

Create .githooks/pre-commit:

#!/bin/bash
# Run linter before commit

# For R packages
if [ -f "DESCRIPTION" ]; then
  Rscript -e "lintr::lint_package()" || exit 1
fi

# For Node.js
if [ -f "package.json" ]; then
  npm run lint || exit 1
fi
chmod +x .githooks/pre-commit
git config core.hooksPath .githooks

Got: Pre-commit hook runs automatically on each git commit. Linting errors block commit until fixed.

If fail: Hook does not run? Verify core.hooksPath set (git config core.hooksPath), hook file executable (chmod +x).

Step 8: Create README

# Minimal README
echo "# Project Name" > README.md
echo "" >> README.md
echo "Brief description of the project." >> README.md
git add README.md
git commit -m "Add README"

Got: README.md committed to repo. Project has minimal but informative landing page on GitHub.

If fail: README.md already exists? Update rather than overwrite. Use usethis::use_readme_md() in R projects for template with badges.

Checks

  • .gitignore excludes sensitive and generated files
  • No sensitive data (tokens, passwords) in tracked files
  • Remote repo connected, accessible
  • Branch naming conventions documented
  • Initial commit created cleanly

Pitfalls

  • Committing before .gitignore: Add .gitignore first. Files already tracked aren't affected by later .gitignore entries.
  • Sensitive data in history: Secrets committed remain in history even after deletion. Use git filter-repo or BFG to clean.
  • Large binary files: Don't commit large binaries. Use Git LFS for files > 1MB.
  • Line endings: Set core.autocrlf=input on Windows/WSL to prevent CRLF/LF issues.

See Also

  • commit-changes - staging and committing workflow
  • manage-git-branches - branch creation and conventions
  • create-r-package - Git setup as part of R package creation
  • setup-wsl-dev-environment - Git installation and SSH keys
  • create-github-release - creating releases from repo
  • security-audit-codebase - check for committed secrets

GitHub 저장소

pjt222/agent-almanac
경로: i18n/caveman/skills/configure-git-repository
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams
FAQ

Frequently asked questions

What is the configure-git-repository skill?

configure-git-repository is a Claude Skill by pjt222. Skills package instructions and resources that Claude loads on demand, so Claude can perform configure-git-repository-related tasks without extra prompting.

How do I install configure-git-repository?

Use the install commands on this page: add configure-git-repository to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.

What category does configure-git-repository belong to?

configure-git-repository is in the Other category, tagged general.

Is configure-git-repository free to use?

Yes. configure-git-repository is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.

연관 스킬

llamaguard
기타

LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.

스킬 보기
cost-optimization
기타

이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.

스킬 보기
sports-betting-analyzer
기타

이 Claude Skill은 스프레드, 오버/언더, 프로프 베트를 포함한 스포츠 베팅 시장을 분석합니다. 역사적 추이와 상황별 통계를 검토하여 가치 베트를 발견하고, 교육적 목적으로 실행 가능한 권장 사항이 담긴 구조화된 마크다운 결과를 제공합니다. 개발자는 이 기능을 스포츠 베팅 분석 도구에 활용할 수 있으며, 단순히 엔터테인먼트/교육 목적으로만 설계되었음을 유의해야 합니다.

스킬 보기
quantizing-models-bitsandbytes
기타

이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.

스킬 보기