zcf-add-sponsor
Quickly add a new corporate sponsor to ZCF — sponsor list by default, with optional API preset and documentation ad placements
Automatically check code changes since last tag and update documentation in docs/ directory (en, zh-CN, ja-JP) and CLAUDE.md to ensure consistency with actual code implementation
$ npx -y skills add UfoMiao/zcf --skill zcf-update-docs --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/zcf-update-docsContext preview
The summary Claude sees to decide when to auto-load this skill.
Automatically check code changes since last tag and update documentation in docs/ directory (en, zh-CN, ja-JP) and CLAUDE.md to ensure consistency with actual code implementation
name: zcf-update-docs description: Automatically check code changes since last tag and update documentation in docs/ directory (en, zh-CN, ja-JP) and CLAUDE.md to ensure consistency with actual code implementation disable-model-invocation: true allowed-tools: Read(**), Exec(git, cat, grep, diff)
Automatically check code changes since last tag and update documentation in `docs/` directory (multilingual: en, zh-CN, ja-JP) and CLAUDE.md to ensure consistency with actual code implementation.
/zcf-update-docs [--check-only]
You are a professional documentation maintainer responsible for:
1. Analyzing code changes and their impact on documentation 2. Identifying documentation sections that need updates 3. Ensuring documentation accuracy and consistency 4. Maintaining multilingual synchronization
Parse arguments: $ARGUMENTS
CHECK_ONLY=false # Default to update mode
case "$ARGUMENTS" in
--check-only)
CHECK_ONLY=true
echo "📋 Running in check-only mode (no files will be modified)"
;;
"")
CHECK_ONLY=false
echo "✏️ Running in update mode"
;;
*)
echo "Unknown parameter: $ARGUMENTS"
echo "Usage: /zcf-update-docs [--check-only]"
exit 1
;;
esacAnalyze all changes since the 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 files" FILES_CHANGED=$(git ls-files) else echo "📊 Last version: $LAST_TAG" echo "Analyzing changes since $LAST_TAG..." FILES_CHANGED=$(git diff --name-only $LAST_TAG..HEAD) fi # Categorize changed files echo -e "\n📁 Analyzing changed files..."
Based on file changes, determine which documentation files in `docs/` need updates:
**Code Changes → Documentation Mapping:**
1. **CLI Commands** (`src/commands/*.ts`) → `docs/{lang}/cli/`
2. **Features** → `docs/{lang}/features/`
3. **Workflows** (`src/config/workflows.ts`, `templates/*/workflow/`) → `docs/{lang}/workflows/`
4. **Advanced Configuration** → `docs/{lang}/advanced/`
5. **Getting Started** → `docs/{lang}/getting-started/`
6. **Development** → `docs/{lang}/development/` and `CLAUDE.md`
Read and analyze current documentation structure:
# Check if documentation directories exist
DOCS_LANGS=("en" "zh-CN" "ja-JP")
DOCS_CATEGORIES=(
"getting-started"
"cli"
"features"
"workflows"
"advanced"
"best-practices"
"development"
)
echo "📁 Checking documentation structure..."
for LANG in "${DOCS_LANGS[@]}"; do
if [ ! -d "docs/$LANG" ]; then
echo "❌ Warning: docs/$LANG directory not found"
else
echo "✅ Found: docs/$LANG/"
for CATEGORY in "${DOCS_CATEGORIES[@]}"; do
if [ ! -d "docs/$LANG/$CATEGORY" ]; then
echo " ⚠️ Missing category: $CATEGORY"
else
echo " ✅ Category: $CATEGORY"
fi
done
fi
done
# Check CLAUDE.md
if [ ! -f "CLAUDE.md" ]; then
echo "❌ Warning: CLAUDE.md not found"
else
echo "✅ Found: CLAUDE.md"
fiCompare CLI commands implementation with documentation:
**Check Points:**
**Code Sources → Documentation Files:**
Repo: UfoMiao/zcf
Quickly add a new corporate sponsor to ZCF — sponsor list by default, with optional API preset and documentation ad placements
Create pull request based on current branch changes
Automate version release and code commit using changeset
Initialize or update BMad-Method (V6) in your project
Safely find and clean up merged or stale Git branches with dry-run mode and custom base/protected branches support