Skip to content
Development
Skill

/zcf-update-docs

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

From plugin
zcf
6.1k20 skills4 agents
Install
$ npx -y skills add UfoMiao/zcf --skill zcf-update-docs --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition โ†’
  • You can call itInvoke it directly when you want it.
  • Slash command/zcf-update-docs

Context 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

SKILL.md

zcf-update-docs.SKILL.md
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)

ZCF Update Docs - Documentation Synchronization

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.

Usage

/zcf-update-docs [--check-only]

Parameters

  • `--check-only`: Only check for inconsistencies without making updates (dry run)

Context

  • Analyze all code changes since the last Git tag
  • Check if documentation needs updates in docs/ directory structure
  • Ensure CLI commands, features, and workflows documentation match actual code
  • Maintain multilingual documentation consistency across en, zh-CN, ja-JP
  • Update CLAUDE.md for development-related changes

Your Role

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

Execution Flow

Parse arguments: $ARGUMENTS

1. Parameter Parsing

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
    ;;
esac

2. Get Changes Since Last Tag

Analyze 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..."

3. Identify Documentation Update Areas

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/`

  • `src/commands/init.ts` โ†’ `cli/init.md` - Installation and initialization
  • `src/commands/menu.ts` โ†’ `cli/menu.md` - Interactive menu system
  • `src/commands/update.ts` โ†’ `cli/update.md` - Update workflows
  • `src/commands/ccr.ts` โ†’ `cli/ccr.md` - CCR proxy management
  • `src/commands/ccu.ts` โ†’ `cli/ccu.md` - Usage analysis
  • `src/commands/uninstall.ts` โ†’ `cli/uninstall.md` - Uninstallation
  • `src/commands/config-switch.ts` โ†’ `cli/config-switch.md` - Config switching
  • `src/commands/check-updates.ts` โ†’ `cli/check-updates.md` - Version check

2. **Features** โ†’ `docs/{lang}/features/`

  • `src/utils/installer.ts`, `src/utils/claude-config.ts` โ†’ `features/claude-code.md`
  • `src/utils/code-tools/codex*` โ†’ `features/codex.md`
  • `src/config/workflows.ts` โ†’ `features/workflows.md`
  • `src/config/mcp-services.ts` โ†’ `features/mcp.md`
  • `src/utils/ccr/` โ†’ `features/ccr.md`
  • `src/utils/cometix/` โ†’ `features/cometix.md`
  • `src/utils/config.ts` โ†’ `features/multi-config.md`

3. **Workflows** (`src/config/workflows.ts`, `templates/*/workflow/`) โ†’ `docs/{lang}/workflows/`

  • Workflow definitions โ†’ `workflows/index.md`
  • Specific workflow templates โ†’ `workflows/{workflow-name}.md`

4. **Advanced Configuration** โ†’ `docs/{lang}/advanced/`

  • `src/types/config.ts`, `src/utils/config.ts` โ†’ `advanced/configuration.md`
  • `src/config/api-providers.ts` โ†’ `advanced/api-providers.md`
  • `templates/` โ†’ `advanced/templates.md`
  • `src/i18n/` โ†’ `advanced/i18n.md`

5. **Getting Started** โ†’ `docs/{lang}/getting-started/`

  • `src/commands/init.ts`, `src/utils/installer.ts` โ†’ `getting-started/installation.md`
  • General introduction โ†’ `getting-started/index.md`

6. **Development** โ†’ `docs/{lang}/development/` and `CLAUDE.md`

  • Architecture changes โ†’ `development/architecture.md` + `CLAUDE.md`
  • Testing changes โ†’ `development/testing.md` + `CLAUDE.md`
  • Contributing guidelines โ†’ `development/contributing.md`
  • Package.json scripts โ†’ `CLAUDE.md`

4. Check Current Documentation

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"
fi

5. Verify CLI Commands Consistency

Compare CLI commands implementation with documentation:

**Check Points:**

  • Command names, options, and parameters
  • Command descriptions and usage examples
  • Interactive menu options and flow
  • Keyboard shortcuts and navigation
  • Exit and back options
  • Multilingual prompt translations

**Code Sources โ†’ Documentation Files:**

  • `src/commands/menu.ts`, `src/i18n/locales/*/menu.json` โ†’ `docs/{lang}/cli/menu.md`
  • `src/commands/init.ts`, `src/i18n/locales/*/cli.json` โ†’ `docs/{lang}/cli/init.md`
  • `src/commands/update.ts` โ†’ `docs/{lang}/cli
Read more
Ships withzcf

Zero-Config Code Flow for Claude code & Codex

Get the whole plugin