# Here Be Git > Inicializa un repositorio git con instrucciones opcionales de commit para el agente y un .gitignore. Fuente: https://skillsagentes.com/skills/intellectronica/agent-skills/here-be-git Markdown: https://skillsagentes.com/skills/intellectronica/agent-skills/here-be-git.md Repositorio: https://github.com/intellectronica/agent-skills Autor: intellectronica Licencia: CC0-1.0 Actualizado: hace 7 meses Coste de contexto: 58 tok instalada, 790 tok al activarse, 790 tok con todos los archivos del bundle Bundle: 1 archivo, 3 KB Permisos que pide: ninguno declarado ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add intellectronica/agent-skills --skill here-be-git --agent claude-code # Cursor npx -y skills add intellectronica/agent-skills --skill here-be-git --agent cursor # Codex npx -y skills add intellectronica/agent-skills --skill here-be-git --agent codex # Gemini CLI npx -y skills add intellectronica/agent-skills --skill here-be-git --agent gemini # Windsurf npx -y skills add intellectronica/agent-skills --skill here-be-git --agent windsurf # Cline npx -y skills add intellectronica/agent-skills --skill here-be-git --agent cline ``` ## Qué hace - Ejecuta git init en el directorio actual - Ofrece añadir a AGENTS.md instrucciones obligatorias para que el agente haga commit tras cada tarea - Ofrece generar un .gitignore según la tecnología o patrones indicados - Hace commit de AGENTS.md y .gitignore tras crearlos ## Cuándo usarla - El usuario dice "here be git", "init git" o "initialise git" - El usuario indica que quiere configurar control de versiones en el directorio actual ## Qué la activa - "here be git" - "init git en esta carpeta" - "initialise git aquí" ## Archivos - SKILL.md — 3 KB ## SKILL.md Reproducido tal cual desde intellectronica/agent-skills bajo CC0-1.0. Esta sección es el documento original y está en inglés. # Here Be Git Initialise a git repository with optional configuration for agent workflows. ## Workflow ### Step 1: Initialise Git Repository Run `git init` in the current working directory. Confirm to the user that the repository has been initialised. ### Step 2: Agent Commit Instructions Ask the user: > Would you like me to add instructions for the agent to always commit when it's done with a task? If the user confirms: 1. Check if `AGENTS.md` exists in the current directory 2. If it exists, append the commit instructions to it 3. If it doesn't exist, create it with the commit instructions The commit instructions to add: ```markdown ## Git Workflow — CRITICAL, MANDATORY, NO EXCEPTIONS > **THIS IS NOT OPTIONAL.** Every agent operating in this repository MUST follow this workflow after every change, no matter how small. There are ZERO exceptions to this rule. Skipping a commit is never acceptable. If you have made any change to any file, you MUST commit before moving on. ### Rules 1. **ALWAYS commit your changes immediately after completing a task or reaching any logical stopping point.** Do not defer. Do not batch. Do not skip. 2. **ALWAYS commit before ending your session.** The working directory MUST be clean (all changes committed) when you finish. Leaving uncommitted changes is a failure state. 3. **Use clear, descriptive commit messages** that explain what was done and why. 4. **If in doubt, commit.** It is always better to have one commit too many than one too few. ### To be absolutely clear - "I'll commit later" — **No. Commit now.** - "It's just a small change" — **Commit it.** - "I'm about to make another change" — **Commit the current one first.** - "The user didn't ask me to commit" — **Irrelevant. Commit anyway.** ``` After creating or updating `AGENTS.md`, commit it with an appropriate message. ### Step 3: Gitignore Configuration Ask the user: > Would you like me to create a .gitignore? If so, what flavour or patterns should I include? (e.g., Node.js, Python, macOS, IDE files, or specific files/patterns) If the user provides a flavour or patterns: 1. Generate an appropriate `.gitignore` based on their input 2. For common flavours, include standard patterns: - **Node.js**: `node_modules/`, `dist/`, `.env`, `*.log`, etc. - **Python**: `__pycache__/`, `*.pyc`, `.venv/`, `venv/`, `.env`, `*.egg-info/`, etc. - **macOS**: `.DS_Store`, `.AppleDouble`, `.LSOverride`, `._*` - **IDE files**: `.idea/`, `.vscode/`, `*.swp`, `*.swo`, `*.sublime-*` 3. Include any specific files or patterns the user mentions 4. Commit the `.gitignore` with an appropriate message If the user declines, skip this step. ## Notes - If git is already initialised in the directory, inform the user and skip to Step 2 - Use the AskUserQuestion tool for the confirmation prompts - Keep commits atomic and well-described ## Dónde encaja - Categoría: [Herramientas para desarrolladores](https://skillsagentes.com/categorias/herramientas-desarrollo.md) — Skills que cambian cómo tu agente escribe, revisa y despliega código. - Creador: [intellectronica](https://skillsagentes.com/creators/intellectronica.md) — 22 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)