configurar-repo

Configures GitHub repository metadata, labels, branches, and protection rules using the gh CLI.

15|22|Updated May 5, 2024
One-click install
npx skills add https://github.com/brayandiazc/project-starter-template-es-ai --skill configurar-repo-brayandiazc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: configurar-repo
Source: https://github.com/brayandiazc/project-starter-template-es-ai/tree/main/.claude/skills/configurar-repo
Command: npx skills add https://github.com/brayandiazc/project-starter-template-es-ai --skill configurar-repo-brayandiazc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up a new GitHub repository involves many scattered manual steps — description, topics, labels, default branch, branch protection, merge settings — that are easy to forget or misconfigure, leaving the project's Git Flow and CI rules unenforced. ## Core Features & Use Cases - Repository metadata setup: Derives the description and 3-6 topics from the product definition and applies them with gh repo edit. - Labels and branch flow: Runs the label setup script, creates and publishes develop, and sets it as the default branch so PRs and Dependabot target it correctly. - Branch protection and merge hygiene: Applies protection rules with required check runs (Calidad, Gitleaks), enables squash merge and branch deletion, and explicitly handles the 403 case where private free-plan repos cannot have protection. - Use Case: After instantiating a new project from the template, ask the assistant to configure the repository so labels, the develop branch, protection rules, and merge settings are all in place and documented in the CHANGELOG. ## Quick Start Ask the assistant to configure the GitHub repository for this project, including labels, the develop branch, and branch protection.

Frequently Asked Questions about configurar-repo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a GitHub repository with the gh CLI?▼

Use gh repo edit to set the description, homepage, and topics, then gh api to set the default branch and apply branch protection rules. This skill walks through each step, showing commands before executing them.

How do I set up branch protection rules with gh api?▼

Apply protection via gh api repos/{owner}/{repo}/branches/{branch}/protection, requiring pull requests, resolved conversations, and required status checks. Required checks must use the check run name (e.g. Calidad, Gitleaks), not the workflow name, or PRs wait forever.

Why does GitHub return 403 when enabling branch protection?▼

Private repositories on the free GitHub plan do not support branch protection, so the API returns HTTP 403. Making the repository public enables protection for free; otherwise local git hooks are the only enforcement and can be bypassed with --no-verify.

How do I change the default branch to develop on GitHub?▼

Run gh api -X PATCH repos/{owner}/{repo} -f default_branch=develop after creating and publishing the develop branch. This ensures new pull requests and Dependabot target develop instead of main.

What are the limitations of this repository setup approach?▼

It requires an authenticated gh CLI and only operates on the current project's repository. On private free-plan repos, server-side protection is unavailable, so enforcement depends on local hooks that each clone must enable manually via core.hooksPath.