new-feature-branch

new-feature-branch is a command for Claude Code from atretyak1985/swarmery. It costs 27 tokens per session (1,140 once invoked), scanned A, original, Apache-2.0.

A command that starts feature work by updating the local main branch, creating a named Git branch, and publishing it to the remote repository.

In plain words
What is it for?
Use it to start feature, bug-fix, documentation, maintenance, refactoring, or test branches with consistent names.
Why use it?
It standardizes the steps needed to begin isolated work from the latest main branch and makes the branch available for protection.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the core plugin — 36 skills, 8 commands, 13 agents shipped together

Good fit Use it to start feature, bug-fix, documentation, maintenance, refactoring, or test branches with consistent names.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/atretyak1985/swarmery/new-feature-branch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/atretyak1985/swarmery

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 36 skills, 8 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for new-feature-branch

README.md
[![agentmods](https://agentmods.dev/badge/commands/atretyak1985/swarmery/new-feature-branch/github.svg)](https://agentmods.dev/commands/atretyak1985/swarmery/new-feature-branch)
Your own site
<a href="https://agentmods.dev/commands/atretyak1985/swarmery/new-feature-branch"><img src="https://agentmods.dev/badge/commands/atretyak1985/swarmery/new-feature-branch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for new-feature-branch

Your own site · 80×15
<a href="https://agentmods.dev/commands/atretyak1985/swarmery/new-feature-branch"><img src="https://agentmods.dev/badge/commands/atretyak1985/swarmery/new-feature-branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,140 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01140
Opus 5 $0.00014 $0.00570
Sonnet 5 $0.00005 $0.00228
Haiku 4.5 $0.00003 $0.00114

Measured 8d ago against content hash 454e0b1036cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

new-feature-branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/core/commands/new-feature-branch.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/new-feature-branch — start work on fresh main

Automates the per-issue branch workflow that every operator task in this project starts with, so the four-step recipe becomes one command.

Usage

/new-feature-branch <slug-describing-the-work>

Examples:

  • /new-feature-branch fix/rollback-drift-check
  • /new-feature-branch feat/maps-api-key-secret
  • /new-feature-branch docs/runtime-maps-env-usage
  • /new-feature-branch chore/check-chart-sync-helper

What it does

  1. git checkout main — switch to the main branch.
  2. git pull origin main — fast-forward local main.
  3. git checkout -b <slug> — create feature branch.
  4. git push -u origin <slug> — push empty branch so it can be protected in GitHub before substantive commits land.

Total: four commands replaced by one invocation.

Branch naming convention

Prefix describes intent:

Prefix Use for
feat/ New functionality
fix/ Bug fix
docs/ Docs-only changes
chore/ Tooling / dev-experience / maintenance
refactor/ Code structure changes, no behaviour change
test/ Test-only changes

Slug after prefix: dash-separated, lowercase, short but meaningful.

Implementation

#!/usr/bin/env bash
set -Eeuo pipefail
slug="${1:?usage: new-feature-branch <prefix/slug>}"
git checkout main
git pull --ff-only origin main
git checkout -b "$slug"
git push -u origin "$slug"
echo "✓ Branch '$slug' created at main HEAD and pushed. Protect it in GitHub before substantive commits if desired."

Prerequisites

  • You are inside the target git repo's working tree.
  • Working tree is clean (no uncommitted changes) OR your changes are stashed.
  • origin remote is configured.
  • The staging health command (if the project ships one, e.g. /<envAlias>-health) — first diagnostic after starting any deploy-related work
  • Commit-message convention: see skills/git-commit/

How to use

What it does

Starting a branch the right way takes four commands, and skipping one leaves you branching off a stale main or with an unpushed branch that nobody can protect. This command does all four for you: it switches to main, fast-forwards it, cuts your new branch, and pushes it empty so branch protection can be applied before any real commit lands.

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 129 lines · 27 tokens per session scan A 454e0b1036cf

Subscribe to this mod's changes

new-feature-branch is a command published in the GitHub repository atretyak1985/swarmery (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 27 tokens to every session and 1,140 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.