当用户用自然语言请求提交代码时触发(如「帮我提交」「commit 一下」「提交代码」)。自动应用 Git 提交规范,从分支名提取任务 ID,生成符合规范的提交信息。
Generates conventional Git commit messages from natural language requests and optionally creates merge requests.
npx claudepluginhub taptap/claude-plugins-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference.mdsnippets/01-detect-default-branch.mdsnippets/02-extract-task-id.mdsnippets/03-commit-format.mdsnippets/04-branch-creation-smart.mdsnippets/04-branch-creation.mdsnippets/05-commit-execution.md当用户用自然语言请求提交代码时,自动应用此 skill。
用户消息包含以下关键词时触发:
检查环境变量 GIT_ALLOW_NO_TICKET(通过 .claude/settings.json 的 env 配置):
false:后续步骤禁用 no-ticket 选项true 或未设置:允许 no-ticket(但仍需用户主动选择)检测仓库默认分支(三级检测 + 用户确认):
详细步骤参见:reference.md
简要说明:
git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'AskUserQuestion 询问用户选择基准分支获取当前分支:
git branch --show-current
如果当前在默认分支(main/master/develop 等):
# 获取远程最新代码
git fetch origin
# 基于远程默认分支创建新分支
new_branch="feat/TAP-xxxxx-description"
if ! git checkout -b "$new_branch" "origin/$default_branch"; then
echo "❌ 创建分支失败"
echo "💡 请先处理本地修改:git stash 或 git commit"
exit 1
fi
git status
git diff HEAD --stat
git diff --cached
详细步骤参见:reference.md
概要: 按优先级从分支名、用户输入、用户询问中获取任务 ID
no-ticket 仅在用户主动选择时可用,AI 不得自动推断使用。 若 GIT_ALLOW_NO_TICKET 为 false 则不提供该选项。
详细规范参见:reference.md
格式: type(scope): 中文描述 #TASK-ID
Type 和 Description 规范: 详细参见 reference.md
git add <files> # 排除 .env、credentials 等敏感文件
git commit -m "type(scope): 中文描述 #TASK-ID"
如果用户请求推送或创建 MR:
策略(与 /git:commit-push-pr 保持一致):glab 优先,失败则 fallback 到 push options
which glab && glab auth status
安全限制(严格禁止):
glab mr approve - 禁止自动审批glab mr merge - 禁止自动合并git log -1 --pretty=%s).gitlab/merge_request_templates/default.md.gitlab/merge_request_templates/Default.md## Description 与下一个 ## 标题之间的内容;若模板没有 ## Description,则在顶部插入如果 glab 可用:
# 推送分支
git push -u origin $(git branch --show-current)
# 生成 MR_DESC(模板优先;无模板则直接用汇总正文),然后创建 MR
TEMPLATE_FILE=""
if [ -f ".gitlab/merge_request_templates/default.md" ]; then
TEMPLATE_FILE=".gitlab/merge_request_templates/default.md"
elif [ -f ".gitlab/merge_request_templates/Default.md" ]; then
TEMPLATE_FILE=".gitlab/merge_request_templates/Default.md"
fi
COMMIT_SUMMARY="$(cat <<'EOF'
## 改动内容
- [汇总所有 commit 的改动点]
## 影响面
- [汇总所有 commit 的影响面]
EOF
)"
if [ -n "$TEMPLATE_FILE" ]; then
MR_DESC="$(TEMPLATE_FILE="$TEMPLATE_FILE" COMMIT_SUMMARY="$COMMIT_SUMMARY" python3 - <<'PY'
import os
import re
template_path = os.environ["TEMPLATE_FILE"]
summary = os.environ["COMMIT_SUMMARY"].rstrip("\n")
with open(template_path, "r", encoding="utf-8") as f:
template = f.read()
header_re = re.compile(r"(?m)^## Description\\s*$")
m = header_re.search(template)
block = f"\\n\\n{summary}\\n\\n"
if not m:
out = f"## Description{block}" + template.lstrip(\"\\n\")
else:
start = m.end()
rest = template[start:]
m2 = re.search(r"(?m)^##\\s+.+$", rest)
end = start + (m2.start() if m2 else len(rest))
out = template[:start] + block + template[end:]
print(out, end=\"\")
PY
)"
else
MR_DESC="$COMMIT_SUMMARY"
fi
glab mr create \
--title "$(git log -1 --pretty=%s)" \
--description "$MR_DESC" \
--yes --remove-source-branch
如果 glab 不可用(fallback):
default_branchgit push -u origin $(git branch --show-current) -o merge_request.create -o merge_request.target=$default_branch
/git:commit:用户显式调用命令(仅提交)/git:commit-push:用户显式调用命令(提交并推送)/git:commit-push-pr:用户显式调用命令(提交、推送并创建 MR)详细规范参见:reference.md
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.