agentsclimarketplace

Gh default branch

Skill puku0x/agent-skills-test/.github/skills/gh-default-branch

A sample repository for Agent Skills

Install
npx -y skills add puku0x/agent-skills-test --skill gh-default-branch

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Retrieve the default branch name of the current Git repository using GitHub CLI. Use when asked "What is the default branch?", "Get the default branch", "What is the main branch?", "Show me the base branch", "get repo default branch", or when git operations require the default branch name (creating PRs, comparing branches, checking out base branch). Returns branch names like main, master, or develop using GitHub CLI.

SKILL.md

1.1 KB, as published. Nobody here has run it

Get Default Branch

Overview

This skill retrieves the default branch name of the current Git repository using the GitHub CLI command gh repo view --json defaultBranchRef --jq .defaultBranchRef.name.

When to Use

Use this skill when:

  • The user requests the default branch name of the repository.
  • Performing git operations that require knowledge of the default branch (e.g., creating pull requests, comparing branches, checking out the base branch).

Instructions

To get the default branch name, run the command:

gh repo view --json defaultBranchRef --jq .defaultBranchRef.name

The command will output the default branch name (e.g., main, master, develop).

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.