跳到正文
cccskills
免费在 GitHub 公开

speckit-git-validate

Validate current branch follows feature branch naming conventions

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md2.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Validate Feature Branch

Validate that the current Git branch follows the expected feature branch naming conventions.

Prerequisites

  • Check if Git is available by running git rev-parse --is-inside-work-tree 2>/dev/null
  • If Git is not available, output a warning and skip validation:
    [specify] Warning: Git repository not detected; skipped branch validation
    

Validation Rules

Get the current branch name:

git rev-parse --abbrev-ref HEAD

The branch name must match one of these patterns:

  1. Sequential: ^[0-9]{3,}- (e.g., 001-feature-name, 042-fix-bug, 1000-big-feature)
  2. Timestamp: ^[0-9]{8}-[0-9]{6}- (e.g., 20260319-143022-feature-name)

Execution

If on a feature branch (matches either pattern):

  • Output: ✓ On feature branch: <branch-name>
  • Check if the corresponding spec directory exists under specs/:
    • For sequential branches, look for specs/<prefix>-* where prefix matches the numeric portion
    • For timestamp branches, look for specs/<prefix>-* where prefix matches the YYYYMMDD-HHMMSS portion
  • If spec directory exists: ✓ Spec directory found: <path>
  • If spec directory missing: ⚠ No spec directory found for prefix <prefix>

If NOT on a feature branch:

  • Output: ✗ Not on a feature branch. Current branch: <branch-name>
  • Output: Feature branches should be named like: 001-feature-name or 20260319-143022-feature-name

Graceful Degradation

If Git is not installed or the directory is not a Git repository:

  • Check the SPECIFY_FEATURE environment variable as a fallback
  • If set, validate that value against the naming patterns
  • If not set, skip validation with a warning

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

adapters

免费

Skill for the Adapters area of paddock. 108 symbols across 22 files.

中文简介正在准备中。当前显示原文说明。

racecraft-lab/paddock-prototype122026年6月26日 更新

chat

免费

Skill for the Chat area of paddock. 62 symbols across 10 files.

中文简介正在准备中。当前显示原文说明。

racecraft-lab/paddock-prototype122026年6月26日 更新

dashboard

免费

Skill for the Dashboard area of paddock. 80 symbols across 16 files.

中文简介正在准备中。当前显示原文说明。

racecraft-lab/paddock-prototype122026年6月26日 更新

github

免费

Skill for the Github area of paddock. 23 symbols across 5 files.

中文简介正在准备中。当前显示原文说明。

racecraft-lab/paddock-prototype122026年6月26日 更新

Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos. Examples: "Index this repo", "Reanalyze the codebase", "Generate a wiki"

中文简介正在准备中。当前显示原文说明。

racecraft-lab/paddock-prototype122026年6月26日 更新

Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: "Why is X failing?", "Where does this error come from?", "Trace this bug"

中文简介正在准备中。当前显示原文说明。

racecraft-lab/paddock-prototype122026年6月26日 更新

查看 racecraft-lab 的全部技能

报告此技能的问题