agentleFS
bryanus1bryanus1/agent-skills/skills/github/gh-cli/SKILL.md

gh-cli

Skill0 starsChanged 3 months agoMITView on GitHub

Automatización de flujos de GitHub con gh CLI y scripts: Pull Requests con Conventional Commits, emojis y labels verificados, diagnóstico de GitHub Actions, issues y releases con notas generadas. Úsala al crear o revisar PRs, depurar workflows fallidos o publicar releases.

  • Deletes or force-pushes
  • Commits and pushes

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-commit, frontend-design and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GitHubSkill

    git-commit

    Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

    Also in 4 projects that use this

  • VercelSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

    Also in 6 projects that use this

  • OpenAISkill

    writing-plans

    Use when you have a spec or requirements for a multi-step task, before touching code

    Also in 3 projects that use this

  • AnthropicSkill

    pptx

    Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

    Also in 3 projects that use this

  • AnthropicSkill

    docx

    Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

    Also in 3 projects that use this

  • OpenAISkill

    test-driven-development

    Use when implementing any feature or bugfix, before writing implementation code

    Also in 3 projects that use this

  • +1 more from openai
  • +1 more from anthropics

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No aplica a repositorios de GitLab: usa la skill glab-cli.

    line 33

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

🐙 GitHub CLI (gh) Workflow & Automation

🎯 Propósito

Guiar al asistente en la gestión de repositorios de GitHub con gh CLI y scripts auxiliares. Estandariza la creación de Pull Requests (Conventional Commits, emoji por tipo, scope solo con issue, labels que ya existen en el repo), el diagnóstico de GitHub Actions fallidos, el trabajo con issues y la publicación de releases con notas generadas por GitHub.

⚡ Cuándo Activar esta Skill

  • Al trabajar en repositorios alojados en GitHub (github.com o GitHub Enterprise).
  • Al crear, revisar, aprobar o fusionar Pull Requests (gh pr o scripts/create_pr.sh).
  • Al diagnosticar workflows o checks fallidos de GitHub Actions (gh run, gh pr checks o scripts/diagnose_run.sh).
  • Al crear, listar o comentar issues, o al publicar releases y tags.
  • No aplica a repositorios de GitLab: usa la skill glab-cli.

📋 Flujo de Trabajo Paso a Paso

flowchart TD
    A["Verificar Entorno\n(scripts/check_env.sh)"] --> B{"Tarea Requerida"}
    B -->|"Crear Pull Request"| C["scripts/create_pr.sh --dry-run\n→ confirmar → sin --dry-run"]
    B -->|"Depurar Actions"| D["scripts/diagnose_run.sh\n(gh run view --log-failed)"]
    B -->|"Issues"| E["gh issue list/view/create/comment"]
    B -->|"Releases"| F["scripts/release_helper.sh\n(gh release create --generate-notes)"]
  1. Paso 1: Verificación de Estado y Autenticación:
    bash <skill-dir>/scripts/check_env.sh
    Si falla la autenticación, pide al usuario que ejecute gh auth login; nunca pidas ni escribas tokens.
  2. Paso 2: Creación Estandarizada de Pull Requests:
    • Previsualiza siempre primero y muestra al usuario título, labels y rama base:
      # Issue detectado de la rama (feat/42-login-form) o explícito:
      bash <skill-dir>/scripts/create_pr.sh --issue 42 --domain auth --dry-run
      
      # Sin issue (título sin scope: <type>: <emoji> <desc>):
      bash <skill-dir>/scripts/create_pr.sh --dry-run
    • Tras la confirmación, repite el comando sin --dry-run. Añade --push solo si la rama no está publicada y el usuario lo aprueba; --draft si el trabajo no está listo.
    • Alternativa manual: gh pr create --title "<título>" --body "<cuerpo>" --base main.
  3. Paso 3: Revisión y Fusión de PRs:
    gh pr view <n> --comments        # contexto y conversación
    gh pr diff <n>                   # cambios
    gh pr checks <n>                 # estado de CI
    gh pr review <n> --approve       # o --request-changes --body "..."
    gh pr merge <n> --squash --delete-branch   # solo con aprobación explícita del usuario
  4. Paso 4: Diagnóstico de GitHub Actions:
    # Último run fallido de la rama actual, solo logs de pasos fallidos:
    bash <skill-dir>/scripts/diagnose_run.sh
    
    # Checks de un PR y logs de un job concreto:
    bash <skill-dir>/scripts/diagnose_run.sh --pr 57 --job lint --lines 50
    Lee el log, identifica la causa y corrige el código. Reintenta (gh run rerun <id> --failed) solo si el fallo es transitorio (red, runner caído).
  5. Paso 5: Issues y Releases:
    gh issue list --assignee @me --state open
    gh issue view 42 --comments
    bash <skill-dir>/scripts/release_helper.sh draft-notes
    bash <skill-dir>/scripts/release_helper.sh create v1.4.0 --dry-run

🛠️ Scripts y Herramientas Auxiliares

Rutas: <skill-dir> es el directorio que contiene este SKILL.md (p. ej. .claude/skills/<name>/ o .agents/skills/<name>/). Ejecuta los scripts desde la raíz del proyecto del usuario, no desde <skill-dir>.

  • scripts/check_env.sh: Valida git, gh, la sesión activa y el repositorio de GitHub detrás de origin.
  • scripts/create_pr.sh: Crea el PR con:
    • Título con issue: <type>(#<issue-id>): <emoji> <description>; sin issue: <type>: <emoji> <description>.
    • Label de tipo con los labels por defecto de GitHub (enhancement, bug, documentation) y domain: <nombre> opcional.
    • Dominios permitidos: si existe .gh-domains en la raíz del repo (uno por línea), --domain debe estar en esa lista.
    • Verificación previa de que todos los labels existen, de que no hay ya un PR abierto para la rama y de que la rama tiene upstream.
    • Cuerpo con Closes #<id>, resumen de commits y la plantilla .github/pull_request_template.md si existe.
  • scripts/diagnose_run.sh: Último run fallido de la rama o PR y logs de los pasos fallidos, filtrables por job.
  • scripts/release_helper.sh: list, view, draft-notes y create <tag> con validación SemVer y notas generadas por GitHub.

⚠️ Reglas Críticas

  1. Regla de Título y Scope del PR:
    • Con issue: <type>(#<issue-id>): <emoji> <description> (ej. feat(#42): ✨ login form).
    • Sin issue: <type>: <emoji> <description> (ej. chore: 🔧 upgrade dependencies).
    • NUNCA usar carpetas, paquetes ni apps como scope (feat(web): ... está PROHIBIDO).
  2. Labels existentes, nunca inventados:
    • Usa solo labels que ya existen en el repositorio (gh label list). No ejecutes gh label create sin permiso explícito del usuario.
    • Los dominios válidos son los de .gh-domains; nunca inventes uno.
  3. Acciones con efectos externos requieren confirmación:
    • Crear o fusionar PRs, aprobar, cerrar issues, publicar releases, relanzar workflows o hacer push: muestra primero lo que se hará (--dry-run) y espera confirmación.
    • PROHIBIDO git push --force hacia ramas compartidas, gh pr merge --admin para saltarse protecciones y gh repo delete.
  4. No interactividad: Pasa siempre --title/--body (o --fill) y flags explícitos; nunca dejes gh esperando un prompt.
  5. Credenciales: Nunca imprimas, pidas ni guardes tokens (GH_TOKEN, gh auth token). La autenticación la hace el usuario con gh auth login.
  6. Salida estructurada: Para leer datos usa --json <campos> --jq <filtro> en lugar de parsear texto formateado.

📚 Referencias Adicionales

  • Estándares de GitHub: títulos, emojis, labels y cuerpo del PR
  • CheatSheet de comandos gh
  • GitHub Actions y resolución de problemas
  • Ejemplos de flujos de trabajo

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.