Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/10CG/Arianpx agentmods add skills/10cg/aria/branch-managerWrote 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.
[](https://agentmods.dev/skills/10cg/aria/branch-manager)<a href="https://agentmods.dev/skills/10cg/aria/branch-manager"><img src="https://agentmods.dev/badge/skills/10cg/aria/branch-manager/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.
<a href="https://agentmods.dev/skills/10cg/aria/branch-manager"><img src="https://agentmods.dev/badge/skills/10cg/aria/branch-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00049 | $0.08263 |
| Opus 5.5 | $0.00020 | $0.03305 |
| Sonnet 5.5 | $0.00010 | $0.01653 |
| Haiku 4.5 | $0.00005 | $0.00826 |
Grade C, and why
branch-manager scanned grade C with 2 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 1mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf .git/worktrees/TASK-001-user-auth Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -X POST "${FORGEJO_API}/repos/10CG/todo-app/pulls" \ How it starts
The opening of the file, as written. The whole thing — 932 lines — stays where its author put it; the contents beside it link to each section on GitHub.
分支管理器 (Branch Manager)
版本: 2.0.0 | 十步循环: B.1, C.2 更新: 2026-01-20 - 自动模式决策 (单一入口架构)
快速开始
我应该使用这个 skill 吗?
使用场景:
- B.1: 开始新任务,需要创建功能分支
- C.2: 完成开发,需要推送并创建 PR
不使用场景:
- 简单的 commit 操作 → 使用
commit-msg-generator - 跨模块批量提交 → 使用
strategic-commit-orchestrator
核心功能
| 功能 | 十步循环 | 描述 |
|---|---|---|
| 自动模式决策 | B.1 | 根据任务复杂度智能选择 Branch/Worktree |
| 创建分支 | B.1 | 验证环境 + 创建规范分支 + 推送远程 |
| 创建 PR | C.2 | 推送分支 + 创建 Forgejo PR + 等待审批 |
自动模式决策 (Auto Mode Decision)
新增于 v2.0.0 - 单一入口架构
branch-manager 现在支持自动模式决策,根据任务复杂度智能选择:
- 模式 A (Branch): 常规分支创建流程,适用于简单修改
- 模式 B (Worktree): 隔离工作目录,适用于复杂功能开发
模式选择算法
系统根据 5 个维度评分,总分 >= 3 分时自动选择 Worktree 模式:
| 评分因素 | 权重 | 评分规则 | 分数 |
|---|---|---|---|
file_count |
低 | 1-3 个文件 | 0 |
| 4-10 个文件 | +1 | ||
| 10+ 个文件 | +3 | ||
cross_directory |
中 | 不跨目录 | 0 |
| 跨目录 | +2 | ||
task_count |
低 | 1-3 个任务 | 0 |
| 4-8 个任务 | +1 | ||
| 8+ 个任务 | +3 | ||
risk_level |
中 | 低 (typo, config) | 0 |
| 中 (小功能) | +1 | ||
| 高 (重构, API 变更) | +3 | ||
parallel_needed |
高 | 不需要并行 | 0 |
| 需要并行开发 | +5 |
决策阈值: score >= 3 → Worktree, score < 3 → Branch
模式选择示例
# 示例 1: 简单 bugfix → Branch 模式
输入:
files: ["lib/utils.py"]
task_count: 1
risk_level: low
评分: 0 + 0 + 0 + 0 + 0 = 0
结果: Branch 模式 (简单快速)
# 示例 2: 中等功能 → Branch 模式
输入:
files: 3 个 backend 文件
task_count: 2
risk_level: medium
评分: 0 + 0 + 0 + 1 + 0 = 1
结果: Branch 模式 (单目录修改)
# 示例 3: 跨模块功能 → Worktree 模式
输入:
files: 6 个文件 (backend + frontend)
task_count: 4
risk_level: high
评分: 1 + 2 + 1 + 3 + 0 = 7
结果: Worktree 模式 (隔离开发环境)
# 示例 4: 并行开发需求 → Worktree 模式
输入:
parallel_needed: true
评分: 0 + 0 + 0 + 0 + 5 = 5
结果: Worktree 模式 (并行隔离)
Mode 参数
| 参数 | 说明 | 默认值 |
|---|---|---|
mode |
auto (智能决策) | branch (强制分支) | worktree (强制隔离) |
auto |
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- CHANGELOG.md 2.5 KB
- internal/DIRECTORY_PRIORITY.md 10 KB
- internal/ENVIRONMENT_VALIDATOR.md 17 KB
- internal/GITIGNORE_VALIDATOR.md 10 KB
- internal/MODE_A_BRANCH_FLOW.md 6.2 KB
- internal/MODE_B_WORKTREE_FLOW.md 9.8 KB
- internal/MODE_DECISION_LOGIC.md 7.0 KB
- SUBMODULE_WORKFLOW.md 5.7 KB
- templates/worktree-cleanup.sh 5.1 KB runs code
- templates/worktree-create.sh 3.6 KB runs code
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.
- 1mo ago First seen · 932 lines · 49 tokens per session scan C e0bd8bb9b0d3
branch-manager is a skill published in the GitHub repository 10CG/Aria (2 stars, last pushed 18d ago), licensed MIT. It adds 49 tokens to every session and 8,263 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-23.
branch-manager compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| branch-manager10CG/Aria | Skill | 2 | 18d ago | MIT | C | 49 | Claude Code |
| workflow-branch-synclugassawan/swe-workbench | Skill | 3 | yesterday | MIT | A | 55 | Claude Code |
| workflow-cleanup-mergedlugassawan/swe-workbench | Skill | 3 | yesterday | MIT | A | 47 | Claude Code |
| workflow-pr-reviewlugassawan/swe-workbench | Skill | 3 | yesterday | MIT | A | 106 | Claude Code |
| workflow-address-feedbacklugassawan/swe-workbench | Skill | 3 | yesterday | MIT | A | 85 | Claude Code |
| workflow-commit-and-prlugassawan/swe-workbench | Skill | 3 | yesterday | MIT | A | 68 | Claude Code |
| workflow-developmentlugassawan/swe-workbench | Skill | 3 | yesterday | MIT | A | 181 | Claude Code |