configure-git-repository
Acerca de
Esta habilidad configura un repositorio Git con archivos .gitignore específicos por lenguaje, estrategias de ramificación, convenciones de commits y hooks. Proporciona patrones de configuración para proyectos de R, Node.js y Python durante la configuración inicial de control de versiones. Úsala para establecer una base adecuada de Git o para agregar exclusiones y automatizaciones específicas de un framework a un proyecto existente.
Instalación rápida
Claude Code
Recomendadonpx 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-repositoryCopia y pega este comando en Claude Code para instalar esta habilidad
Documentación
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
Repositorio GitHub
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.
Habilidades relacionadas
LlamaGuard es el modelo de Meta de 7-8B parámetros para moderar las entradas y salidas de LLM en seis categorías de seguridad como violencia y discurso de odio. Ofrece una precisión del 94-95% y puede implementarse usando vLLM, Hugging Face o Amazon SageMaker. Utiliza esta skill para integrar fácilmente filtrado de contenido y barreras de seguridad en tus aplicaciones de IA.
Esta Skill de Claude ayuda a los desarrolladores a optimizar los costes en la nube mediante el ajuste de tamaño de recursos, estrategias de etiquetado y análisis de gastos. Proporciona un marco para reducir los gastos en la nube e implementar una gobernanza de costes en AWS, Azure y GCP. Úsala cuando necesites analizar los costes de infraestructura, ajustar el tamaño de los recursos o cumplir con restricciones presupuestarias.
Esta habilidad de Claude analiza los mercados de apuestas deportivas, incluyendo spreads, over/unders y apuestas de propuestas, mediante el examen de tendencias históricas y estadísticas situacionales para identificar apuestas de valor. Proporciona una salida en markdown estructurado con recomendaciones accionables con fines educativos. Los desarrolladores deben utilizar esto para herramientas de análisis de apuestas deportivas, teniendo en cuenta que está diseñado únicamente para entretenimiento/educación.
Esta habilidad cuantiza LLMs a precisión de 8 o 4 bits utilizando bitsandbytes, logrando una reducción de memoria del 50-75% con pérdida mínima de precisión. Es ideal para ejecutar modelos más grandes en memoria GPU limitada o para acelerar la inferencia, admitiendo formatos como INT8, NF4 y FP4. La habilidad se integra con HuggingFace Transformers y permite entrenamiento QLoRA y optimizadores de 8 bits.
