前端测试
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 效率工具
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 读取环境变量
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: promote
description: Runs the full release workflow for the current project. Commits any uncommitted changes, pushes…
category: 效率工具
runtime: Node.js
---
# promote 输出预览
## PART A: 任务判断
- 适用问题:日常重复事务、资料整理、邮件或工作流提效。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Step 0: Pre-flight checks / Step 1: Commit any uncommitted changes / Step 2: Push”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于日常重复事务、资料整理、邮件或工作流提效,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Step 0: Pre-flight checks / Step 1: Commit any uncommitted changes / Step 2: Push”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、读取环境变量、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、读取环境变量。
先用一个小任务确认它会围绕“Step 0: Pre-flight checks / Step 1: Commit any uncommitted changes / Step 2: Push”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: promote
description: Runs the full release workflow for the current project. Commits any uncommitted changes, pushes…
category: 效率工具
source: tomevault-io/skills-registry
---
# promote
## 什么时候使用
- 把日常协作方向的常用动作沉淀成 Agent 可调用的技能 适合处理重复事务、信息整理、邮件和日常工作流提效,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤…
- 面向日常重复事务、资料整理、邮件或工作流提效,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Step 0: Pre-flight checks / Step 1: Commit any uncommitted changes / Step 2: Push」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、读取环境变量;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "promote" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Step 0: Pre-flight checks / Step 1: Commit any uncommitted changes / Step 2: Push
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Node.js | 读取文件、写入/修改文件、读取环境变量 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Promote Changes
Runs the full release workflow from current working state to a tagged GitHub release on main.
Current branch: !git branch --show-current 2>/dev/null || echo "unknown"
Git status: !git status --short 2>/dev/null || echo "not a git repo"
Last tag: !git describe --tags --abbrev=0 2>/dev/null || echo "none"
Recent commits since last tag:
!`git log $(git describe --tags --abbrev=0 2>/dev/null || echo "")..HEAD --oneline -10 2>/dev/null || git log --oneline -10`
Next version (calculated from commits above):
!`(last=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0"); IFS='.' read -r ma mi pa <<< "${last#v}"; log=$(git log "${last}..HEAD" --format="%s" 2>/dev/null); if echo "$log" | grep -qE "^[a-z]+(\([^)]+\))?!:"; then echo "v$((ma+1)).0.0"; elif echo "$log" | grep -qE "^feat"; then echo "v${ma}.$((mi+1)).0"; else echo "v${ma}.${mi}.$((pa+1))"; fi)`
Step 0: Pre-flight checks
gh auth status 2>&1 || { echo "ERROR: gh is not authenticated. Run: gh auth login"; exit 1; }
Check for untracked .env files that could be accidentally staged:
git status --short | grep -E '^\?\? .*\.env' && echo "WARNING: untracked .env files detected — review before staging"
cat .gitignore 2>/dev/null | grep -q '\.env' || echo "WARNING: .gitignore does not exclude .env files"
If any .env files would be staged:
if [ -t 0 ]; then
# Interactive — ask for confirmation before continuing
read -p "WARNING: .env files detected. Continue? (y/N) " confirm
[[ "$confirm" =~ ^[Yy]$ ]] || { echo "Aborted."; exit 1; }
else
# Non-interactive — hard stop; too risky to proceed without human review
echo "ERROR: untracked .env files detected in non-interactive mode. Aborting."
exit 1
fi
Step 1: Commit any uncommitted changes
If the git status above shows uncommitted or untracked changes:
- Review the diff:
git diffandgit diff --cached - Stage changes selectively — prefer tracked files:
git add -u, then review and add any intentional new files individually. Avoidgit add -Aunless the user explicitly confirms. - Draft a conventional commit message from the changes — lead with a type prefix
(
feat:,fix:,docs:,chore:, etc.) and a concise summary - Commit using a heredoc so multi-line messages format correctly
If there is nothing uncommitted, skip to Step 2.
Step 2: Push
Push the current branch to remote:
git push -u origin HEAD
Step 3: Merge to main (feature branch only)
Skip this step if already on main (or the repo's default branch).
If on a feature branch:
Scan commits since the last tag for issue references:
git log $(git describe --tags --abbrev=0 2>/dev/null || echo "")..HEAD --format="%B"Look for
Closes #N,Fixes #N,Resolves #N(case-insensitive). Collect all issue numbers found. If none are found:if [ -t 0 ]; then # Interactive — ask the user read -p "Any GitHub issues this resolves? (e.g. 12 15 — or enter to skip) " issues else # Non-interactive — skip silently issues="" fiCreate a PR targeting main, including closing keywords in the body so GitHub closes the issues automatically on merge:
gh pr create --title "<type>: <summary>" --body "$(cat <<'EOF' ## Summary <bullet points from commits> Closes #N, Closes #N 🤖 Generated with [claude-workflow-skills:promote](https://github.com/ali5ter/claude-workflow-skills) on behalf of [Alister](https://github.com/ali5ter) EOF )"Omit the
Closeslines if no issues were identified.Enable auto-merge (squash preferred):
gh pr merge --auto --squashPoll until merged:
gh pr view --json state --jq '.state'Switch to main and pull:
git checkout main && git pull
Step 4: Confirm next version
The next version is pre-calculated in the context block above using these semver rules:
- Commit subject with
!:(e.g.feat!:,fix!:) → major bump - Commit subject beginning with
feat→ minor bump - All other commits → patch bump
Confirm the calculated version is correct given the commit list. If no previous tag exists, use
v1.0.0. Override only if the calculated version is clearly wrong (e.g. the injection returned
an error or empty output).
Step 5: Sync plugin manifest (if present)
If .claude-plugin/plugin.json exists, update its version field to <next-version> (no v
prefix — plugin manifests use bare semver like 1.2.3):
node -e "
const fs = require('fs');
const f = '.claude-plugin/plugin.json';
const d = JSON.parse(fs.readFileSync(f, 'utf8'));
d.version = '<next-version>';
fs.writeFileSync(f, JSON.stringify(d, null, 2) + '\n');
"
Then commit and push:
git add .claude-plugin/plugin.json
git commit -m "chore: sync plugin.json version to v<next-version>"
git push
Skip this step entirely if .claude-plugin/plugin.json does not exist.
Step 6: Tag and release
git tag -a v<next-version> -m "Release v<next-version>"
git push origin v<next-version>
gh release create v<next-version> \
--generate-notes \
--title "v<next-version>"
Step 7: Close resolved issues (main branch only)
Skip this step if a PR was created in Step 3 — GitHub will close the issues automatically when
the PR merges via the Closes #N keywords in the PR body.
If the promotion was directly on main (no PR), close any identified issues now:
gh issue close <N> --comment "Resolved in $(gh release view v<next-version> --json url --jq '.url')"
Step 8: Clean up merged feature branch
If a feature branch was merged in Step 3, delete it locally and remotely:
git branch -d <feature-branch>
git push origin --delete <feature-branch>
Step 9: Confirm clean state
git status
git log --oneline -5
Report the GitHub release URL from gh release view v<next-version> --json url --jq '.url'.
Source: ali5ter/claude-workflow-skills — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核