用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Morrison-Lab/ai-config --skill slide-tag命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | slide-tag |
| description | Move floating Git tag to main. |
| user-invocable | true |
| allowed-tools | ["Bash","Read"] |
Force-move a floating Git tag to a new target commit. Used for repos where
consumers pin to a major-version tag (e.g., v2) that advances with each
release.
v2)origin/main unless user specifies otherwisegit fetch origin main --tags # FETCH
Confirm the tag exists:
git tag -l '<tag>' # should output the tag name
If the tag doesn't exist yet, create it fresh (skip the delete steps):
git tag <tag> <target>
git push origin <tag> # PUSH
Display the before/after so the user can sanity-check:
echo "Current: $(git log --oneline -1 <tag>)"
echo "Target: $(git log --oneline -1 <target>)"
echo "Commits being added:"
git log --oneline <tag>..<target> | head -20
git tag -d <tag>
git tag <tag> <target>
git push origin :refs/tags/<tag> # DELETE_REF
git push origin <tag> # PUSH
Why delete+recreate instead of git push --force? Some GitLab/GitHub
instances have protected-tag rules that block force-push but allow
delete+create. The delete+recreate pattern works universally.
git log --oneline -1 <tag>
Report the new tag position to the user.
User: "slide v2"
→ moves v2 to origin/main
User: "slide v2 to abc123"
→ moves v2 to commit abc123
User: "slide v3 to the release branch"
→ moves v3 to origin/release (or whatever the release branch is)
git push --force origin <tag> without trying delete first"Slide the <x> submodule" is a different operation from this skill —
this skill moves a floating tag (e.g. v2) to a new commit; a submodule
pin is a gitlink entry in the parent repo pointing at a specific commit of a
different repo. Bumping a submodule pin means: fetch the submodule's
upstream, check out its new commit, git add <submodule-path> in the parent
repo, and commit — no tag involved. check-dependency-updates (cdu)'s
"Git submodules" step covers this; use-math-macros covers it specifically
for the d-morrison/macros submodule as part of a broader macro-conversion
pass. Don't reach for slide-tag on a "slide the submodule" request — the
name similarity is coincidental. (Confirmed on ai-config's own session
history: sliding the macros submodule pin in d-morrison/rme#983 and
ucdavis/epi204#361 was done by hand, slide-tag doesn't apply.)