← 返回 Skills 目录
我的 Skill

serena-code-analysis

使用 Serena 符号工具分析定义、引用与实现,并在确认后进行精确编辑。

分类
代码分析
维护者
seven
来源
个人私有仓库
许可证
私有
固定版本
e3226376a3ad
最近检查
2026-07-24
适用场景
  • 查找符号定义和引用
  • 检查实现与诊断
  • 确认后执行符号级修改
Serena符号分析精确编辑
安装

把它带到你的 Codex。

执行前需在本机配置 gitlab-personal SSH 身份,并拥有私有仓库访问权限。

来源:个人私有仓库
显示安装命令
set -euo pipefail
skill_name='serena-code-analysis'
source_url='git@gitlab-personal:seven-grove/tools/personal-codex-skills.git'
source_ref='e3226376a3ad09de705f80bd3665c416acb0f676'
source_subdirectory='skills/serena-code-analysis'
temp_root=$(mktemp -d)
backup_root="${CODEX_HOME:-$HOME/.codex}/skills-backups"
target_root="${CODEX_HOME:-$HOME/.codex}/skills"
backup_path=""
install_complete="0"
restore_previous() {
  if [ "$install_complete" != "1" ]; then
    rm -rf "$target_root/$skill_name"
    if [ -n "$backup_path" ] && [ -d "$backup_path" ]; then
      mv "$backup_path" "$target_root/$skill_name"
    fi
  fi
}
cleanup() { rm -rf "$temp_root"; }
trap 'restore_previous; cleanup' EXIT
git clone --filter=blob:none --no-checkout "$source_url" "$temp_root/repo"
git -C "$temp_root/repo" checkout "$source_ref" -- "$source_subdirectory"
test -f "$temp_root/repo/$source_subdirectory/SKILL.md"
mkdir -p "$target_root" "$backup_root"
if [ -e "$target_root/$skill_name" ]; then
  backup_path="$backup_root/$skill_name-$(date +%Y%m%d-%H%M%S)"
  mv "$target_root/$skill_name" "$backup_path"
fi
cp -R "$temp_root/repo/$source_subdirectory" "$target_root/$skill_name"
test -f "$target_root/$skill_name/SKILL.md"
install_complete="1"
printf 'Installed %s\n' "$target_root/$skill_name"
if [ -n "$backup_path" ]; then printf 'Backup %s\n' "$backup_path"; fi