agentleFS
AgnesAI-LabsAgnesAI-Labs/agnet-skills-cn/create-branch/SKILL.md

create-branch

Skill1 starsChanged 3 months agoApache-2.0View on GitHub

Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.

6 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use create-pr.

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.
  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 7 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a git branch following Sentry naming conventions.

    line 38
  2. Distinctive:

    Keep this workflow non-interactive unless the user explicitly asks to choose the name manually.

    line 39
  3. Very specific:

    If $ARGUMENTS is present, use it

    line 44
  4. Distinctive:

    If there are local changes, derive a short description from the diff

    line 51
  5. Very specific:

    If there are no local changes, use a generic description like repo-maintenance, tooling-update, or work-in-progress

    line 52
  6. Very specific:

    When unsure: use feat for new things, ref for restructuring, chore for maintenance.

    line 71
  7. Very specific:

    Keep <short-description> kebab-case, ASCII-only, and ideally 3 to 6 words.

    line 74
  8. Distinctive:

    If default branch detection fails, fall back to main, then master, then the current branch

    line 82
  9. Distinctive:

    If on a detached HEAD, branch from the current commit

    line 83
  10. Distinctive:

    If already on a non-default branch, branch from the current branch

    line 84
  11. Distinctive:

    Only switch to the default branch when the user explicitly asks

    line 85
  12. Very specific:

    Avoid collisions by appending -2, -3, and so on until the name is unused locally and remotely.

    line 87

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

Create Branch

Create a git branch following Sentry naming conventions. Keep this workflow non-interactive unless the user explicitly asks to choose the name manually.

Workflow

  1. Resolve the work description:
    • If $ARGUMENTS is present, use it
    • Otherwise inspect:
      git diff
      git diff --cached
      git status --short
    • If there are local changes, derive a short description from the diff
    • If there are no local changes, use a generic description like repo-maintenance, tooling-update, or work-in-progress
  2. Classify the branch type:
TypeUse when
featNew functionality
fixBroken behavior now works
refBehavior stays the same, structure changes
choreMaintenance of existing tooling/config
perfSame behavior, faster
styleVisual or formatting only
docsDocumentation only
testTests only
ciCI/CD config
buildBuild system
metaRepo metadata
licenseLicense changes

When unsure: use feat for new things, ref for restructuring, chore for maintenance.

  1. Generate <type>/<short-description>. Keep <short-description> kebab-case, ASCII-only, and ideally 3 to 6 words.
  2. Choose the base without prompting:
    git branch --show-current
    git remote | grep -qx origin && echo origin || git remote | head -1
    git symbolic-ref refs/remotes/<remote>/HEAD 2>/dev/null | sed 's|refs/remotes/<remote>/||' | tr -d '[:space:]'
    • If default branch detection fails, fall back to main, then master, then the current branch
    • If on a detached HEAD, branch from the current commit
    • If already on a non-default branch, branch from the current branch
    • Only switch to the default branch when the user explicitly asks
  3. Avoid collisions by appending -2, -3, and so on until the name is unused locally and remotely.
  4. Create the branch:
    git checkout -b <branch-name>
    Report the final branch name, but do not stop for confirmation.

References

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.