ソース情報
- リポジトリ
- UfoMiao/zcf
- ソースの最終更新活動
- 2026年7月11日 16:31
- 検出された SKILL.md の言語
- 英語
- スター
- 6,079
- フォーク
- 420
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/UfoMiao/zcf --skill zcf-releaseコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Professional AI programming assistant with structured workflow (Research -> Ideate -> Plan -> Execute -> Optimize -> Review) for developers
专业AI编程助手,提供结构化六阶段开发工作流(研究→构思→计划→执行→优化→评审),适用于专业开发者
Quickly add a new corporate sponsor to ZCF — sponsor list by default, with optional API preset and documentation ad placements
SOC 職業分類に基づく
SKILL.md を表示中
| name | zcf-release |
| description | Automate version release and code commit using changeset |
| disable-model-invocation | true |
| allowed-tools | Read(**), Exec(git, pnpm, node, date, cat, gh) |
Automate version release and code commit using changeset.
/zcf-release [-p|-mi|-ma|<version>]
-p or --patch: Patch version (default) - bug fixes, minor changes-mi or --minor: Minor version - new features, backward compatible-ma or --major: Major version - breaking changes, incompatible<version>: Specific version number (e.g., 1.2.3, 2.0.0-beta.1) - directly use provided versionYou are a professional release management assistant responsible for:
Parse arguments: $ARGUMENTS
VERSION_TYPE="patch" # Default to patch version
SPECIFIC_VERSION="" # For user-specified exact version
# Check if argument looks like a version number (matches semver pattern)
if [[ "$ARGUMENTS" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-].*)?$ ]]; then
SPECIFIC_VERSION="$ARGUMENTS"
VERSION_TYPE="custom"
echo "🚀 Preparing to release exact version: $SPECIFIC_VERSION"
else
case "$ARGUMENTS" in
-p|--patch)
VERSION_TYPE="patch"
;;
-mi|--minor)
VERSION_TYPE="minor"
;;
-ma|--major)
VERSION_TYPE="major"
;;
"")
VERSION_TYPE="patch"
;;
*)
echo "❌ Unknown parameter: $ARGUMENTS"
echo "Usage: /zcf-release [-p|-mi|-ma|<version>]"
echo "Examples:"
echo " /zcf-release -p # Patch version bump"
echo " /zcf-release -mi # Minor version bump"
echo " /zcf-release -ma # Major version bump"
echo " /zcf-release 1.2.3 # Exact version"
echo " /zcf-release 2.0.0-beta.1 # Pre-release version"
exit 1
;;
esac
Check if the current working directory meets release conditions:
# Ensure in project root directory
if [ ! -f "package.json" ]; then
echo "❌ Error: package.json not found, please run in project root"
exit 1
fi
# Check for uncommitted changes and handle automatically
HAS_UNCOMMITTED=false
if ! git diff --quiet || ! git diff --cached --quiet; then
echo "⚠️ Detected uncommitted changes:"
git status --short
echo ""
HAS_UNCOMMITTED=true
fi
echo "✅ Working directory status OK"
Analyze all changes since last release:
# Get last release tag
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
if [ -z "$LAST_TAG" ]; then
echo "📊 No previous version tag found, analyzing all commits"
COMMITS=$(git log --oneline)
else
echo "📊 Last version: $LAST_TAG"
echo "Analyzing changes since $LAST_TAG..."
COMMITS=$(git log $LAST_TAG..HEAD --oneline)
fi
# Show commit history
echo -e "\n📝 Changes:"
echo "$COMMITS"
# Analyze file changes
echo -e "\n📁 File change statistics:"
if [ -z "$LAST_TAG" ]; then
git diff --stat
else
git diff --stat $LAST_TAG..HEAD
fi
Based on code change analysis, I will generate CHANGELOG following these standards:
Format Requirements:
Example Format:
## New Features
- Add technical execution guidelines with command best practices
- Support automated release command /zcf-release
- Automatic quote handling for Windows paths
## 新功能
- 添加技术执行指南文档,提供命令执行最佳实践
- 支持自动化发版命令 /zcf-release
- Windows 路径自动加引号处理
## Optimization
- Prioritize ripgrep for better search performance
- Improve template file organization
## 优化
- 优先使用 ripgrep 提升搜索性能
- 改进模板文件组织结构
## Fixes
- Fix Windows path backslash escaping issue
## 修复
- 修复 Windows 路径反斜杠丢失问题
Create changeset file based on analysis:
# Generate timestamp
TIMESTAMP=$(date +%Y%m%d%H%M%S)
CHANGESET_FILE=".changeset/release-$TIMESTAMP.md"
# Create changeset file
echo "📝 Creating changeset file..."
if [ "$VERSION_TYPE" = "custom" ]; then
# For specific version, use the exact version number
cat > "$CHANGESET_FILE" << EOF
---
"zcf": $SPECIFIC_VERSION
---
[Bilingual CHANGELOG content generated based on actual changes]
EOF
echo "✅ Changeset file created with exact version: $SPECIFIC_VERSION"
else
# For version type (patch/minor/major), use the type
cat > "$CHANGESET_FILE" << EOF
---
"zcf": $VERSION_TYPE
---
[Bilingual CHANGELOG content generated based on actual changes]
EOF
echo "✅ Changeset file created with version type: $VERSION_TYPE"
fi
Use changeset to update version number and CHANGELOG:
echo "🔄 Updating version number and CHANGELOG..."
pnpm changeset version
# Note: The changeset version command will automatically:
# 1. Update package.json version
# 2. Generate/update CHANGELOG.md
# 3. DELETE the temporary changeset file in .changeset/ directory
# No manual cleanup needed!
# Get new version number
NEW_VERSION=$(node -p "require('./package.json').version")
if [ "$VERSION_TYPE" = "custom" ]; then
echo "📦 New version set to: v$NEW_VERSION (specified: $SPECIFIC_VERSION)"
else
echo "📦 New version: v$NEW_VERSION"
fi
# Show CHANGELOG update
echo -e "\n📋 CHANGELOG has been updated, please review the content"
echo "✅ Temporary changeset file has been automatically deleted"
Create release branch first, then handle commits separately to avoid polluting main branch:
echo "🚀 Creating release branch..."
# Create and switch to release branch
RELEASE_BRANCH="release/v$NEW_VERSION"
git checkout -b "$RELEASE_BRANCH"
# Handle uncommitted changes first (if any)
if [ "$HAS_UNCOMMITTED" = true ]; then
echo "📝 Committing pre-release changes..."
# Stage only the uncommitted changes (exclude changeset modifications)
git add .
git reset HEAD package.json CHANGELOG.md 2>/dev/null || true
# Check if there are still changes to commit after reset
if ! git diff --quiet --staged; then
# Analyze the staged changes to generate appropriate commit message
echo "🔍 Analyzing uncommitted changes..."
CHANGED_FILES=$(git diff --staged --name-only)
# Generate commit message based on changed files
COMMIT_TYPE="chore"
COMMIT_SCOPE=""
COMMIT_DESCRIPTION="pre-release changes"
# Analyze file patterns to determine commit type and scope
if echo "$CHANGED_FILES" | grep -E "\.(md|txt)$" >/dev/null; then
if echo "$CHANGED_FILES" | grep -i "readme" >/dev/null; then
COMMIT_TYPE="docs"
COMMIT_SCOPE="readme"
COMMIT_DESCRIPTION="update README documentation"
| grep -E >/dev/null;
COMMIT_TYPE=
COMMIT_SCOPE=
COMMIT_DESCRIPTION=
COMMIT_TYPE=
COMMIT_DESCRIPTION=
| grep -E >/dev/null;
| grep -E >/dev/null;
COMMIT_TYPE=
COMMIT_DESCRIPTION=
COMMIT_TYPE=
COMMIT_DESCRIPTION=
| grep -E >/dev/null;
| grep >/dev/null;
COMMIT_TYPE=
COMMIT_DESCRIPTION=
COMMIT_TYPE=
COMMIT_DESCRIPTION=
[ -n ];
COMMIT_MSG=
COMMIT_MSG=
COMMIT_BODY=
file ;
COMMIT_BODY=
COMMIT_BODY=
✅ Pre-release changes committed: ℹ️ No additional changes to commit after version update💾 Committing release version changes...chore: release v
- Update version to
- Update CHANGELOG.md
- Generated by /zcf-release 📋 Creating pull request...🚀 Release v$( <<
Release version v with automated version bump and CHANGELOG update.
This release includes important changes, please review CHANGELOG.md details.
- [x] New feature
- [ ] Bug fix
- [ ] Breaking change
- [x] Documentation update
- [x] Tests added/updated
- [x] All tests pass
- [x] Coverage maintained
- [x] Code follows style guidelines
- [x] Self-review completed
- [x] Documentation updated
- [x] No new warnings introduced
⚠️ **IMPORTANT**: After merge, GitHub Actions will automatically:
- Create release tag
- Publish to npm
- Generate GitHub Release
🤖 Generated by /zcf-release
EOF
)\n✅ Release preparation complete!📦 Version v is ready🔗 Pull request created successfully⚠️ IMPORTANT: Review and merge the PR to trigger the release⚠️ Do NOT create or push tags manually!🤖 After PR merge, GitHub Actions will automatically: - Create the release tag - Publish to npm - Generate GitHub Release👀 View release status: https://github.com/UfoMiao/zcf/actions
⚠️ CRITICAL: NEVER create or push Git tags manually! GitHub Actions will automatically:
Manual tags will cause conflicts with the automated release process!
release/v{version} branchchangeset version automatically deletes temporary changeset files.changeset/ directory should only contain config files, not temporary release filesgh CLI: Ensure GitHub CLI is installed and authenticated for PR creationVersion Parameter Examples:
/zcf-release or /zcf-release -p - Auto patch bump (2.9.11 → 2.9.12)/zcf-release -mi - Auto minor bump (2.9.11 → 2.10.0)/zcf-release -ma - Auto major bump (2.9.11 → 3.0.0)/zcf-release 1.5.0 - Exact version (→ 1.5.0)/zcf-release 3.0.0-alpha.1 - Pre-release version (→ 3.0.0-alpha.1)Now starting release process...