Token导航 LogoToken导航TokenDH.com
AI 工具执行命令github未标认证来源可访问clear审计异常

gemini-memory-syncGemini 记忆 sync

Agent Skill

gemini-memory-sync 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

326

周安装

14

GitHub Stars

61

下载量

114
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gemini-memory-sync(Gemini 记忆 sync)
来源仓库:https://github.com/melodic-software/claude-code-plugins
仓库路径:skills/gemini-memory-sync
安装命令:
npx skills add https://github.com/melodic-software/claude-code-plugins --skill gemini-memory-sync
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/melodic-software/claude-code-plugins --skill gemini-memory-sync

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。

  • 适合围绕代码变更、仓库状态进行整理和协作管理。
  • 通过 GitHub 安装,建议确认权限范围和命令执行边界。
  • 可能触发联网、文件读写等操作,需评估安全风险。
  • 适用于 Codex、Claude、Cursor 和 Gemini CLI 开发场景。

SKILL.md

Gemini Memory Sync

Documentation Delegation

Documentation Source: For authoritative memory/import syntax and current features, query gemini-cli-docs skill. This skill provides sync patterns; gemini-cli-docs provides official Gemini CLI documentation.

Overview

This skill provides patterns for keeping Claude Code (CLAUDE.md) and Gemini CLI (GEMINI.md) memory files synchronized. The core principle is CLAUDE.md as source of truth with GEMINI.md importing and adding overrides.

When to Use This Skill

Keywords: sync memory, sync context, claude.md gemini.md, memory import, context drift, @import, memport

Use this skill when:

  • Setting up GEMINI.md for a new project
  • Detecting drift between memory files
  • Understanding the import syntax
  • Troubleshooting sync issues

Core Principle: Single Source of Truth

CLAUDE.md (Source of Truth)
    │
    │ @import
    ▼
GEMINI.md (Imports + Overrides)

Why CLAUDE.md is the source:

  • Claude Code is the primary development environment
  • CLAUDE.md is already established in most projects
  • Single point of update reduces maintenance burden
  • Git history shows context evolution in one place

GEMINI.md Structure

Recommended Template

# GEMINI.md

@CLAUDE.md

## Gemini-Specific Overrides

You are Gemini CLI. Your unique capabilities:
- Large context window (Flash) / Very large (Pro)
- Interactive PTY shell (vim, git rebase -i, htop)
- Checkpointing with instant rollback
- Policy engine for tool control
- Native Google Cloud authentication

### When to Use Your Strengths

- **Bulk analysis**: Use your large context for codebase-wide exploration
- **Interactive tools**: Handle vim, git interactive commands
- **Risky operations**: Use sandbox and checkpointing
- **Second opinions**: Provide independent validation

### Model Selection

- Use **Flash** for bulk analysis and simple tasks
- Use **Pro** for complex reasoning and very large contexts

Import Syntax

Gemini CLI uses @ prefix for imports (memport):

# Import entire file
@CLAUDE.md

# Import relative path
@./docs/conventions.md

# Import from parent
@../shared/COMMON.md

Note: Unlike CLAUDE.md's flexible import, GEMINI.md's memport has:

  • Maximum import depth: 5 levels
  • Circular import detection
  • File access validation

Drift Detection

Manual Detection

# Quick diff (ignoring Gemini-specific sections)
diff <(grep -v "^## Gemini-Specific" CLAUDE.md) <(grep -v "^## Gemini-Specific\|^@" GEMINI.md)

Hash-Based Detection

# Store hash of CLAUDE.md
claude_hash=$(md5sum CLAUDE.md | cut -d' ' -f1)

# Store in sync state
echo "{\"claude_hash\": \"$claude_hash\", \"last_sync\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" > .claude/temp/sync-state.json

Check for Drift

# Compare current hash to stored
current_hash=$(md5sum CLAUDE.md | cut -d' ' -f1)
stored_hash=$(cat .claude/temp/sync-state.json 2>/dev/null | jq -r '.claude_hash // ""')

if [ "$current_hash" != "$stored_hash" ]; then
  echo "CLAUDE.md has changed since last sync"
fi

Sync Patterns

Pattern 1: Import-Based (Recommended)

GEMINI.md simply imports CLAUDE.md - no sync needed:

# GEMINI.md
@CLAUDE.md

## Gemini-Specific
{overrides here}

Pros:

  • No sync maintenance
  • Always up-to-date
  • Single source of truth enforced

Cons:

  • GEMINI.md must start with @import
  • Can't selectively import sections

Pattern 2: Section-Based Sync

Copy specific sections from CLAUDE.md:

# Extract specific sections
conventions=$(sed -n '/^## Conventions/,/^## /p' CLAUDE.md | head -n -1)
build_commands=$(sed -n '/^## Build/,/^## /p' CLAUDE.md | head -n -1)

# Rebuild GEMINI.md
cat > GEMINI.md << EOF
# GEMINI.md

## Conventions (synced from CLAUDE.md)
$conventions

## Build Commands (synced from CLAUDE.md)
$build_commands

## Gemini-Specific Overrides
{your overrides}
EOF

Pros:

  • Selective control
  • Can transform content

Cons:

  • Requires manual sync
  • Can drift easily

Pattern 3: Template Generation

Generate GEMINI.md from CLAUDE.md with transformations:

# Transform CLAUDE.md to GEMINI.md
cat CLAUDE.md | \
  sed 's/Claude Code/Gemini CLI/g' | \
  sed 's/claude/gemini/g' > GEMINI.md

# Append Gemini-specific section
cat >> GEMINI.md << 'EOF'

## Gemini-Specific Overrides
{overrides}
EOF

Common Issues

Issue: Import Not Working

Symptom: Gemini doesn't see CLAUDE.md content

Fix: Ensure correct path syntax

# Correct
@CLAUDE.md
@./CLAUDE.md

# Incorrect
@/CLAUDE.md  (absolute paths may fail)

Issue: Circular Import

Symptom: Error about circular references

Fix: Don't have CLAUDE.md import GEMINI.md

Issue: Import Depth Exceeded

Symptom: Nested imports not loading

Fix: Memport has max depth of 5. Flatten import chain.

Issue: Context Drift

Symptom: Gemini behaves differently than Claude

Fix:

  1. Use /sync-context command
  2. Or rebuild GEMINI.md with @import pattern

Best Practices

1. Use @Import Pattern

Always prefer import over copy:

# GEMINI.md - Good
@CLAUDE.md

## Gemini-Specific
...

2. Keep Overrides Minimal

Only override what's truly Gemini-specific:

  • Model selection guidance
  • Interactive shell instructions
  • Sandbox usage patterns

3. Document What's Synced

If using section-based sync, note the source:

## Conventions (synced from CLAUDE.md on 2025-11-30)

4. Validate After Sync

Test that Gemini understands the context:

gemini "What are the project conventions?" --output-format json

5. Regular Drift Checks

Include in CI or pre-commit:

# In CI
./scripts/check-memory-drift.sh

Sync Workflow

Initial Setup

# 1. Ensure CLAUDE.md exists
if [ ! -f "CLAUDE.md" ]; then
  echo "CLAUDE.md not found. Create it first."
  exit 1
fi

# 2. Create GEMINI.md with import
cat > GEMINI.md << 'EOF'
# GEMINI.md

@CLAUDE.md

## Gemini-Specific Overrides

You are Gemini CLI with unique capabilities:
- Large context window (exceeds typical LLM limits)
- Interactive PTY shell
- Checkpointing with rollback
- Policy engine

Prioritize tasks that leverage these strengths.
EOF

# 3. Initialize sync state
mkdir -p .claude/temp
echo "{\"claude_hash\": \"$(md5sum CLAUDE.md | cut -d' ' -f1)\", \"last_sync\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" > .claude/temp/sync-state.json

echo "GEMINI.md created with @import to CLAUDE.md"

Manual Sync

# Check if sync needed
if [ "$(md5sum CLAUDE.md | cut -d' ' -f1)" != "$(cat .claude/temp/sync-state.json | jq -r '.claude_hash')" ]; then
  echo "CLAUDE.md has changed. If using @import, no action needed."
  echo "If using section-based sync, rebuild GEMINI.md sections."

  # Update sync state
  echo "{\"claude_hash\": \"$(md5sum CLAUDE.md | cut -d' ' -f1)\", \"last_sync\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"}" > .claude/temp/sync-state.json
fi

Related Skills

  • gemini-workspace-bridge - Overall workspace architecture
  • gemini-context-bridge - Legacy context sharing

Related Commands

  • /sync-context - Trigger manual sync check

Test Scenarios

Scenario 1: Initial Setup

Query: "How do I set up GEMINI.md to use CLAUDE.md?" Expected Behavior:

  • Skill activates on "sync memory" or "claude.md gemini.md"
  • Provides @import syntax and template Success Criteria: User receives working GEMINI.md template with @CLAUDE.md import

Scenario 2: Drift Detection

Query: "How do I check if my memory files are out of sync?" Expected Behavior:

  • Skill activates on "context drift" or "sync"
  • Provides hash-based detection method Success Criteria: User receives drift detection script

Scenario 3: Import Issues

Query: "My GEMINI.md @import isn't working" Expected Behavior:

  • Skill activates on "import" troubleshooting
  • Provides common issues and fixes Success Criteria: User receives troubleshooting steps for path syntax

Version History

  • v1.1.0 (2025-12-01): Added MANDATORY section, Test Scenarios, Version History
  • v1.0.0 (2025-11-25): Initial release

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

trae

26.84%
按下载量换算31

Antigravity

25.76%
按下载量换算29

windsurf

18.52%
按下载量换算21

Claude Code

14.11%
按下载量换算16

Codex

7.15%
按下载量换算8

Gemini CLI

3.43%
按下载量换算4

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/melodic-software/claude-code-plugins --skill gemini-memory-sync;npx skills add melodic-software/claude-code-plugins --skill "gemini-memory-sync" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills