Skip to content
Back to skills

Axis New Branch

ASecurity

Create a <type>/<short-name> branch from an up-to-date main for an issue or a described change.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentsshellbashnodegit

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add Black-Axis/axis-hub --skill axis-new-branch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Axis New Branch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Axis New Branch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black-axis-axis-new-branch/badge)](https://www.skillsdirectory.com/skills/black-axis-axis-new-branch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: axis-new-branch
description: "Create a <type>/<short-name> branch from an up-to-date main for an issue or a described change."
argument-hint: "[issue number or short description]"
disable-model-invocation: true
allowed-tools: Bash(git status:*), Bash(node .githooks/finish.js), Bash(git switch:*), Bash(git log:*), Bash(gh issue view:*), PowerShell(git status:*), PowerShell(node .githooks/finish.js), PowerShell(git switch:*), PowerShell(git log:*), PowerShell(gh issue view:*)
---

Create a branch for: $ARGUMENTS

Repository `Black-Axis/axis-hub`. Run each command on its own (no `cd`, no chaining), so the pre-approved forms match.

## 1. Look up

- `git status --short`: with uncommitted changes the cleanup in step 3 does nothing. Ask whether they belong to the new branch; never commit, stash, or discard them yourself.
- An issue number: `gh issue view <n> --repo Black-Axis/axis-hub --json title,labels --jq '"\(.title) | \([.labels[].name] | join(","))"'`.

## 2. Propose, then ask

Name `<type>/<short-name>`, checked by `.githooks/guard.js`:

- type: `feat`, `fix`, `docs`, `test`, `ci`, `chore`, or `refactor` (label `bug` → `fix`, `enhancement` → `feat`, otherwise from the change);
- short name: 2-4 lowercase words joined by `-`, only `a-z` and `0-9` (no dots, no `#`, no issue number), naming the change, e.g. `feat/foreman-bug-command`.

Ask with `AskUserQuestion`: the proposed name first (Recommended), one or two alternatives.

## 3. Create

1. `node .githooks/finish.js` (what `git finish` runs): switches to `main`, pulls it, and deletes merged branches; it never deletes unmerged work.
2. `git switch -c <name>`

With uncommitted changes that belong to the new branch, skip step 1 when already on `main` (the branch then starts from the local `main`; say so); on another branch, stop and ask the user to commit or stash first. The PreToolUse hook denies a name that breaks the rules; then fix the name and ask again. Report one line: `On <name>, from main at <short hash>` (`git log -1 --format=%h`).

## 4. Continue with the issue

For a branch made for an issue, ask with `AskUserQuestion` whether to start fixing it now: `Start fixing #N` (Recommended) or `Not now`. On yes, read the issue body (`gh issue view <n> --repo Black-Axis/axis-hub --json body --jq .body`) and fix it in the same turn by the rules in CLAUDE.md: checks through `axis-test-runner`, an e2e step for a plugin change, nothing committed (the user opens the pull request with `/axis-open-pr`). The fix's edits and commands ask for permission as usual: this skill's `allowed-tools` cover only the branch steps. On no, or for a branch made from a description, stop after the report line.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.