Skip to content
Debugging
Skill

/requirement-branch

Use when feature, requirement, defect, or delivery work needs confirmation that development is happening on the correct requirement branch.

From plugin
nucleus-marketplace
16527 skills1 agent

Claude Code

$ npx -y skills add protect-my-hair/nucleus-marketplace --skill requirement-branch --agent claude-code

SKILL.md

requirement-branch.SKILL.md
name: requirement-branch
description: Use when feature, requirement, defect, or delivery work needs confirmation that development is happening on the correct requirement branch.

Requirement Branch

核心原则

需求特性开发只能在明确的需求分支内推进。

<HARD-GATE> 当前分支是主干、版本分支、保护分支、未知分支或 detached HEAD,且没有明确创建或切换需求分支授权时,必须 `ALERT_AND_BLOCK`。不得写源码、测试、正式特性文档、提交或准备 MR/PR。 </HARD-GATE>

解决什么

本 Skill 只解决一个问题:让 coding agent 在任何需求特性写操作前确认自己处于正确需求分支。

它不创建 PMS 状态,不批准分支策略,不替人工决定版本排期,也不负责实现具体特性。

行为纪律

1. 先读取当前任务上下文,确认 requirement id、目标版本分支、期望需求分支命名和 planned writes。 2. 读取 git 当前分支、worktree 状态和 dirty 状态。 3. 如果已经在明确需求分支,记录证据后返回当前 task。 4. 如果不在需求分支,向用户呈现:

  • 当前分支。
  • 目标需求或需求分支。
  • 本次计划写入范围。
  • 在当前分支继续的风险。

5. 只问一个问题:是否授权创建或切换到需求分支。 6. 没有明确授权前停住。

STOP 点

  • 未读取上下文:`ALERT_AND_BLOCK`。
  • 当前分支是主干、版本分支或保护分支:`ALERT_AND_BLOCK`。
  • 当前分支无法识别且计划有写操作:`ALERT_AND_BLOCK`。
  • 需要创建或切换分支但缺少明确授权:`ALERT_AND_BLOCK`。
  • 工作区 dirty 且 dirty 文件和 planned writes 有交叉:`ALERT_AND_BLOCK`。

反模式

| 反模式 | 为什么错 | 修正 | |---|---|---| | “当前是 master,但只是小改,可以继续” | 需求特性会污染主干 | 停住并请求创建或切换需求分支 | | “result.json 写了 branch,所以算确认” | 机器结果不能制造授权事实 | 分支授权必须来自上下文或明确回复 | | “先写代码,最后再建分支” | 变更归属和证据会错位 | 分支确认先于任何写操作 | | “PMS 会管分支,Nucleus 不用检查” | Nucleus 装在 coding agent 内部,执行前仍要保护现场 | 本地执行前必须检查 |

证据

可记录的机器事实:

  • 当前分支。
  • worktree root。
  • dirty 文件摘要。
  • planned writes。
  • 用户或 PMS 提供的分支授权 fact id。

这些证据只证明检查发生过,不代表人工已批准开发、PR 审查、合入或发布。

@protect-my-hair
Ships withnucleus-marketplace

Engineering Workflow Discipline Plugin · For Claude Code / Codex Nucleus is a workflow plugin installed inside an AI coding agent.

16527 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
165
Star history of protect-my-hair/nucleus-marketplace on GitHub, a chart by star-history.com

Other skills on nucleus-marketplace.

More skills from other plugins.

cpu-high

cpu-high

排查 JVM / 应用 CPU 飙高(线程定位 + 代码路径分析)

arthas10d38k
@alibaba@alibabaInstall Skill
analyze-dump

analyze-dump

Triage a Windows crash dump - identify the exception, the faulting frame, and what to look at next. Use when the user points at a…

@svnscha@svnschaInstall Skill
d3k

d3k

Test and debug a web app in its existing d3k browser, including local Chrome connected to a Vercel Sandbox over CDP. Use for UI…

dev30008d1.6k
@vercel-labs-2@vercel-labs-2Install Skill

Questions about requirement-branch.

Which coding agents can use requirement-branch?
requirement-branch installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.