npx claudepluginhub taptap/claude-plugins-marketplaceThis skill uses the workspace's default tool permissions.
- 当前 git 状态:!`git status`
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Automates semantic versioning and release workflow for Claude Code plugins: bumps versions in package.json, marketplace.json, plugin.json; verifies builds; creates git tags, GitHub releases, changelogs.
git statusgit branch --show-currentgit diff HEAD --statgit log --oneline -5printenv GIT_ALLOW_NO_TICKET || echo true概要: 检测默认分支并在必要时创建新分支
检测默认分支:使用三级检测方法(详见 默认分支检测)
git symbolic-ref refs/remotes/origin/HEAD判断是否需要创建分支:如果当前在默认分支,需要创建新的功能分支
三级优先级策略(详见 任务ID提取):
git branch --show-current | grep -oE 'TAP-[0-9]+'关键: 纯数字 ID 必须转换为 TAP-xxx 格式。禁止 AI 自动推断使用 no-ticket。
执行流程:
检查用户输入是否包含 --skip-code-review 参数。
如果包含:输出 ⏭️ 已跳过代码审查 后直接进入第五步
如果不包含(默认):
先输出:💡 提示:如需跳过代码审查,可使用 --skip-code-review 参数
然后调用:
Skill(skill: "git:code-reviewing", args: "review committed changes on current branch before push")
审查结果处理:
git push
如果失败提示 "no upstream branch":
git push -u origin $(git branch --show-current)
✅ 提交并推送成功
分支:feat-TAP-85404-user-profile
Commit:feat(api): 新增用户资料接口 #TAP-85404
远程:origin/feat-TAP-85404-user-profile
下一步:
- 使用 /git:commit-push-pr 命令创建 Merge Request
- 或手动在 GitLab 中创建 MR
推送成功后,检查当前分支是否已有关联的 MR。
which glab && glab auth status
glab 不可用 → 跳过。可用则:
REMOTE_URL=$(git remote get-url origin)
BRANCH=$(git branch --show-current)
# 从 remote URL 提取 project_path 和 host
PROJECT_ID=$(glab api projects/$(python3 -c "import urllib.parse; print(urllib.parse.quote('${project_path}', safe=''))") --hostname {host} | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
MR_RESULT=$(glab api "projects/${PROJECT_ID}/merge_requests?source_branch=${BRANCH}&state=opened&per_page=1" --hostname {host})
MR_IID=$(echo "$MR_RESULT" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d[0]['iid'] if d else '')" 2>/dev/null)
MR_IID 为空 → ℹ️ 当前分支无关联 MR,跳过 Pipeline 监控MR_IID 有值 → 进入轮询使用后台 Bash 命令(run_in_background=true)轮询。参数:首次等待 15s,间隔 30s,最多 60 次(约 30 分钟)。
使用 MR pipelines API:glab api "projects/${PROJECT_ID}/merge_requests/${MR_IID}/pipelines?per_page=1"
--force / -f 推送glab mr approve / glab mr merge