geo-update

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GEO-SEO Update Skill

GEO-SEO 更新技能

Purpose

目的

Updates the locally installed GEO-SEO skills, agents, scripts, and schema templates to the latest version from the upstream repository. Shows a summary of what changed before and after the update.

将本地安装的GEO-SEO技能、Agent、脚本和Schema模板更新为上游仓库的最新版本。展示更新前后的变更摘要。

Update Workflow

更新流程

Step 1: Determine Installed Location

步骤1:确定安装位置

The GEO-SEO toolkit installs to these locations under
~/.claude/
:
ComponentInstall Path
Main skill
~/.claude/skills/geo/
Sub-skills
~/.claude/skills/geo-*/
Agents
~/.claude/agents/geo-*.md
Scripts
~/.claude/skills/geo/scripts/
Schema templates
~/.claude/skills/geo/schema/
Hooks
~/.claude/skills/geo/hooks/
Verify the installation exists by checking for
~/.claude/skills/geo/SKILL.md
. If it does not exist, inform the user that GEO-SEO is not installed and suggest running the installer instead.
GEO-SEO工具包会安装在
~/.claude/
下的以下位置:
组件安装路径
主技能
~/.claude/skills/geo/
子技能
~/.claude/skills/geo-*/
Agent
~/.claude/agents/geo-*.md
脚本
~/.claude/skills/geo/scripts/
Schema模板
~/.claude/skills/geo/schema/
Hooks
~/.claude/skills/geo/hooks/
通过检查
~/.claude/skills/geo/SKILL.md
是否存在来验证安装情况。如果不存在,告知用户GEO-SEO未安装,并建议运行安装程序。

Step 2: Clone Latest from Upstream

步骤2:从上游克隆最新版本

bash
TEMP_DIR=$(mktemp -d)
git clone --depth 1 https://github.com/zubair-trabzada/geo-seo-claude.git "$TEMP_DIR/repo"
If the clone fails, report the error and stop. Do not modify any installed files.
bash
TEMP_DIR=$(mktemp -d)
git clone --depth 1 https://github.com/zubair-trabzada/geo-seo-claude.git "$TEMP_DIR/repo"
如果克隆失败,报告错误并停止操作。不要修改任何已安装文件。

Step 3: Compare Installed vs Latest

步骤3:对比已安装版本与最新版本

Before copying files, generate a diff summary so the user knows what will change:
  1. For each component directory, compare the installed files against the cloned files using
    diff --recursive --brief
    .
  2. Categorise changes as:
    • New files — exist in upstream but not locally
    • Modified files — exist in both but differ
    • Removed files — exist locally but not in upstream (these are NOT deleted automatically)
  3. Present the summary to the user.
在复制文件前,生成差异摘要让用户了解将会发生的变更:
  1. 对每个组件目录,使用
    diff --recursive --brief
    对比已安装文件与克隆文件。
  2. 将变更分为以下类别:
    • 新增文件 — 存在于上游但本地没有
    • 修改文件 — 两边都存在但内容不同
    • 移除文件 — 本地存在但上游已删除(这些文件不会被自动删除)
  3. 向用户展示摘要。

Step 4: Apply Updates

步骤4:应用更新

Copy files from the cloned repo over the installed locations:
bash
CLAUDE_DIR="${HOME}/.claude"
SOURCE_DIR="$TEMP_DIR/repo"
将克隆仓库中的文件复制到已安装位置:
bash
CLAUDE_DIR="${HOME}/.claude"
SOURCE_DIR="$TEMP_DIR/repo"

Main skill

Main skill

cp -r "$SOURCE_DIR/geo/"* "$CLAUDE_DIR/skills/geo/"
cp -r "$SOURCE_DIR/geo/"* "$CLAUDE_DIR/skills/geo/"

Sub-skills

Sub-skills

for skill_dir in "$SOURCE_DIR/skills"//; do skill_name=$(basename "$skill_dir") mkdir -p "$CLAUDE_DIR/skills/${skill_name}" cp -r "$skill_dir" "$CLAUDE_DIR/skills/${skill_name}/" done
for skill_dir in "$SOURCE_DIR/skills"//; do skill_name=$(basename "$skill_dir") mkdir -p "$CLAUDE_DIR/skills/${skill_name}" cp -r "$skill_dir" "$CLAUDE_DIR/skills/${skill_name}/" done

Agents

Agents

for agent_file in "$SOURCE_DIR/agents/"*.md; do cp "$agent_file" "$CLAUDE_DIR/agents/" done
for agent_file in "$SOURCE_DIR/agents/"*.md; do cp "$agent_file" "$CLAUDE_DIR/agents/" done

Scripts

Scripts

if [ -d "$SOURCE_DIR/scripts" ]; then cp -r "$SOURCE_DIR/scripts/"* "$CLAUDE_DIR/skills/geo/scripts/" chmod +x "$CLAUDE_DIR/skills/geo/scripts/"*.py 2>/dev/null || true fi
if [ -d "$SOURCE_DIR/scripts" ]; then cp -r "$SOURCE_DIR/scripts/"* "$CLAUDE_DIR/skills/geo/scripts/" chmod +x "$CLAUDE_DIR/skills/geo/scripts/"*.py 2>/dev/null || true fi

Schema templates

Schema templates

if [ -d "$SOURCE_DIR/schema" ]; then cp -r "$SOURCE_DIR/schema/"* "$CLAUDE_DIR/skills/geo/schema/" fi
if [ -d "$SOURCE_DIR/schema" ]; then cp -r "$SOURCE_DIR/schema/"* "$CLAUDE_DIR/skills/geo/schema/" fi

Hooks

Hooks

if [ -d "$SOURCE_DIR/hooks" ] && [ "$(ls -A "$SOURCE_DIR/hooks" 2>/dev/null)" ]; then mkdir -p "$CLAUDE_DIR/skills/geo/hooks" cp -r "$SOURCE_DIR/hooks/"* "$CLAUDE_DIR/skills/geo/hooks/" chmod +x "$CLAUDE_DIR/skills/geo/hooks/"* 2>/dev/null || true fi
undefined
if [ -d "$SOURCE_DIR/hooks" ] && [ "$(ls -A "$SOURCE_DIR/hooks" 2>/dev/null)" ]; then mkdir -p "$CLAUDE_DIR/skills/geo/hooks" cp -r "$SOURCE_DIR/hooks/"* "$CLAUDE_DIR/skills/geo/hooks/" chmod +x "$CLAUDE_DIR/skills/geo/hooks/"* 2>/dev/null || true fi
undefined

Step 5: Update Python Dependencies

步骤5:更新Python依赖

If
requirements.txt
exists in the upstream repo and differs from the installed version:
bash
python3 -m pip install -r "$SOURCE_DIR/requirements.txt" --quiet
Report any failures but do not treat them as fatal.
如果上游仓库中存在
requirements.txt
且与已安装版本不同:
bash
python3 -m pip install -r "$SOURCE_DIR/requirements.txt" --quiet
报告任何失败,但不将其视为致命错误。

Step 6: Clean Up

步骤6:清理

bash
rm -rf "$TEMP_DIR"
bash
rm -rf "$TEMP_DIR"

Step 7: Report Results

步骤7:报告结果

Present a summary:
GEO-SEO Update Complete
=======================
New files:      [count]
Modified files: [count]
Unchanged:      [count]
Removed upstream (kept locally): [count]

Dependencies: [updated / unchanged / failed]
If there were removed files upstream, list them and suggest the user review whether to delete them manually.

展示摘要:
GEO-SEO 更新完成
=======================
新增文件:      [数量]
修改文件: [数量]
未变更:      [数量]
上游已移除(本地保留): [数量]

依赖项: [已更新 / 未变更 / 更新失败]
如果存在上游已移除的文件,列出这些文件并建议用户手动检查是否需要删除。

Important Notes

重要说明

  • Never delete locally installed files that no longer exist upstream. The user may have customised them. List them and let the user decide.
  • Never modify
    ~/.claude/settings.json
    or
    ~/.claude/settings.local.json
    — these are user configuration files, not part of the GEO-SEO toolkit.
  • If already up to date (no diff), report that and skip the copy step.
  • Restart notice: Remind the user that skill changes take effect in new Claude Code sessions. They should restart their session to use the updated skills.
  • 切勿删除本地已安装但上游不再存在的文件:用户可能已自定义这些文件。列出它们并让用户决定是否删除。
  • 切勿修改
    ~/.claude/settings.json
    ~/.claude/settings.local.json
    — 这些是用户配置文件,不属于GEO-SEO工具包。
  • 如果已是最新版本(无差异),告知用户并跳过复制步骤。
  • 重启提示:提醒用户技能变更需要在新的Claude Code会话中生效。他们应重启会话以使用更新后的技能。