configure-git-repository
정보
이 스킬은 언어별 .gitignore 파일, 브랜칭 전략, 커밋 규칙, 훅을 포함한 Git 저장소를 구성합니다. 초기 버전 관리 설정 단계에서 R, Node.js, Python 프로젝트를 위한 설정 패턴을 제공합니다. 적절한 Git 기반을 구축하거나 기존 프로젝트에 프레임워크 특화적인 무시 규칙과 자동화를 추가할 때 사용하세요.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/configure-git-repositoryClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Configure Git Repository
Set up Git repo w/ appropriate config for project type.
Use When
- Init version control for new project
- Add
.gitignorefor specific language/framework - Set up branch protection + conventions
- Configure commit hooks
In
- Required: Project dir
- Required: Project type (R pkg, Node.js, Python, general)
- Optional: Remote repo URL
- Optional: Branch strategy (trunk-based, Git Flow)
- Optional: Commit msg convention
Do
Step 1: Initialize Repo
cd /path/to/project
git init
git branch -M main
→ .git/ dir created. Default branch = main.
If err: git init fails → ensure Git installed (git --version). Dir already has .git/ → repo already init'd → skip step.
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/
→ .gitignore created w/ entries for project type. Sensitive files (.Renviron, .env) + generated artifacts excluded.
If err: Unsure which entries → use gitignore.io or GitHub's .gitignore templates as starting point, customize.
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"
→ First commit w/ .gitignore + initial project files. git log shows one commit.
If err: "Nothing to commit" → ensure files staged w/ git add. Author identity err → set git config user.name + 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
→ Remote origin config'd. git remote -v shows fetch + push URLs. Initial commit pushed.
If err: Push fails "Permission denied (publickey)" → configure SSH keys (see setup-wsl-dev-environment). Remote already exists → update w/ git remote set-url origin <url>.
Step 5: Set Up Branch Conventions
Trunk-based (rec'd for small teams):
main: prod-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
→ Branch naming convention established + doc'd. Team knows which prefix to use for each work type.
If err: Branches already named inconsistent → rename w/ 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
→ Commit msg convention doc'd + agreed. Future commits follow type: description format.
If err: Team not following → enforce w/ commit-msg hook validating 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
→ Pre-commit hook runs auto on each git commit. Lint errs block commit until fixed.
If err: Hook doesn't run → valid. 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"
→ README.md committed. Project has minimal but informative landing page on GitHub.
If err: README.md already exists → update vs. overwrite. R projects → use usethis::use_readme_md() for template w/ badges.
Check
-
.gitignoreexcludes sensitive + generated files - No sensitive data (tokens, passwords) in tracked files
- Remote repo connected + accessible
- Branch naming conventions doc'd
- Initial commit clean
Traps
- Commit before .gitignore: Add
.gitignorefirst. Files already tracked unaffected by later.gitignoreentries. - Sensitive data in history: Secrets committed → remain in history even after deletion. Use
git filter-repoor BFG to clean. - Large binary files: Don't commit large binaries. Use Git LFS for files > 1MB.
- Line endings: Set
core.autocrlf=inputon Windows/WSL → prevent CRLF/LF issues.
→
commit-changes- staging + committing workflowmanage-git-branches- branch creation + conventionscreate-r-package- Git setup as part of R pkg creationsetup-wsl-dev-environment- Git install + SSH keyscreate-github-release- creating releases from reposecurity-audit-codebase- check for committed secrets
GitHub 저장소
연관 스킬
llamaguard
기타LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.
cost-optimization
기타이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.
quantizing-models-bitsandbytes
기타이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.
dispatching-parallel-agents
기타이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.
