agentleFS
puku0xpuku0x/agent-skills-test/.github/skills/git-branch/SKILL.md

git-branch

Skill1 starsChanged 7 months agoMITView on GitHub

Create Git branches with automatic type detection and project-specific naming conventions. Use when asked to "create a branch", "make a new branch", "create branch for changes", or when ready to organize code changes into a new branch. Supports feat, fix, docs, refactor, test, build, ci, chore, revert, and perf branch types with automatic type selection based on changed file patterns.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 12
  2. Distinctive:

    Use the following command to view staged changes:

    line 21
  3. Distinctive:

    Important: If there are staged changes, proceed to the next step.

    line 27
  4. Distinctive:

    If there are no staged changes, check unstaged changes with:

    line 29
  5. Distinctive:

    If there are only staged changes, base the branch name on the staged changes.

    line 43
  6. Distinctive:

    If there are only unstaged changes, base the branch name on the unstaged changes.

    line 44
  7. Distinctive:

    If there are both staged and unstaged changes, base the branch name on the staged changes.

    line 45
  8. Distinctive:

    description: should concisely describe the changes made, using hyphens to separate words.

    line 60
  9. Distinctive:

    Use git switch -c to create and switch to the new branch.

    line 64

“Common” is measured: kept by at least 6 in 10 of the 4 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

Git Branch Skill

This skill guides the creation of Git branches with project-specific naming conventions.

When to Use

Use this skill when:

  • You have made changes to the codebase and need to create a new branch for those changes.
  • You want to ensure that the branch name follows the project's naming conventions.

Instructions

Step 1: Check staged changes

Use the following command to view staged changes:

git diff --staged

Important If there are staged changes, proceed to the next step.

If there are no staged changes, check unstaged changes with:

git diff --name-only

Step 2: Determine branch type and description

The format for branch names is:

<type>-<description>
  • If there are only staged changes, base the branch name on the staged changes.
  • If there are only unstaged changes, base the branch name on the unstaged changes.
  • If there are both staged and unstaged changes, base the branch name on the staged changes.

type is determined based on the patterns of the changed files:

  • feat-: New features or changes to existing features
  • fix-: Bug fixes
  • refactor-: Refactoring (changes that do not add features or fix bugs)
  • test-: Adding or modifying tests (e.g., changes to *.spec.* or *.spec.*.snap files)
  • docs-: Documentation-only changes (e.g., changes to *.md files)
  • ci-: CI-related changes (e.g., changes to files in .github/workflows/* or .github/actions/*)
  • chore-: Other changes (e.g., changes to *.json, configuration files like *.config.js, .gitignore, etc.)
  • revert-: Reverting previous commits
  • build-: Changes related to the build system or external dependencies
  • perf-: Performance improvements

description should concisely describe the changes made, using hyphens to separate words.

Step 3: Create the branch

Use git switch -c to create and switch to the new branch.

Example:

git switch -c feat-user-authentication

[!NOTE]

When the name of the branch already exists, append a unique suffix to the branch name to avoid conflicts. For example, if feat-user-authentication already exists, create feat-user-authentication-1, feat-user-authentication-2, etc.

References

  • branch-name.md

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.