Central authority for Claude-Gemini shared workspace architecture. Defines directory structure, artifact exchange, and file naming conventions. Use when setting up dual-CLI workflows, deciding where to store AI artifacts, or managing cross-CLI file exchange.
Limited to specific tools
Additional assets for this skill
This skill is limited to using the following tools:
STOP - Before providing ANY response about Gemini workspace structure:
- INVOKE
gemini-cli-docsskill- QUERY for the specific workspace/artifact topic
- BASE all responses EXCLUSIVELY on official documentation loaded
This skill defines the hybrid workspace architecture for Claude Code and Gemini CLI collaboration. It establishes conventions for file storage, artifact exchange, and cross-CLI communication.
Keywords: workspace structure, artifact storage, cross-cli, shared files, gemini artifacts, claude artifacts, file locations, where to store
Use this skill when:
The workspace uses a hybrid strategy:
project-root/
āāā CLAUDE.md # Source of truth (tracked)
āāā GEMINI.md # Points to CLAUDE.md + overrides (tracked)
ā
āāā .claude/
ā āāā settings.json # Claude Code configuration
ā āāā temp/ # (gitignored) Session artifacts
ā āāā gemini-results/ # Parsed Gemini outputs
ā
āāā .gemini/
ā āāā settings.json # Gemini CLI configuration
ā āāā temp/ # (gitignored) Gemini session state
ā
āāā docs/ # (tracked) Persistent AI artifacts
āāā ai-artifacts/ # Version-controlled reports
āāā explorations/ # Codebase exploration reports
āāā plans/ # Implementation plans
Is this artifact valuable long-term?
āāā YES: Should others see it in git history?
ā āāā YES ā docs/ai-artifacts/
ā āāā NO ā .claude/temp/ or .gemini/temp/
āāā NO: Is it session-specific?
āāā YES ā .claude/temp/ or .gemini/temp/
āāā NO ā Consider not storing it
| Artifact Type | Location | Tracked? | Rationale |
|---|---|---|---|
| Memory/context | CLAUDE.md, GEMINI.md | Yes | Core project knowledge |
| Implementation plans | docs/ai-artifacts/plans/ | Yes | Want to see evolution |
| Exploration reports | docs/ai-artifacts/explorations/ | Yes | Reference material |
| Session results | .claude/temp/gemini-results/ | No | Transient |
| Second opinions | .claude/temp/gemini-results/ | No | Transient |
| Checkpoints | ~/.gemini/history/<hash>/ | No | System-managed |
| Sync state | .claude/temp/sync-state.json | No | Internal tracking |
Add to project .gitignore:
# AI session artifacts (transient)
.claude/temp/
.gemini/temp/
# System-managed
.gemini/history/
# Keep these tracked:
# CLAUDE.md
# GEMINI.md
# docs/ai-artifacts/
Format: {type}-{scope}-{timestamp}.md
# Exploration reports
exploration-architecture-2025-11-30T12-00-00Z.md
exploration-dependencies-2025-11-30T14-30-00Z.md
# Implementation plans
plan-add-auth-2025-11-30T12-00-00Z.md
plan-refactor-db-2025-11-30T14-30-00Z.md
Format: {operation}-{timestamp}.{json|md}
# Raw Gemini results
query-2025-11-30T12-00-00Z.json
analysis-2025-11-30T12-00-00Z.json
# Processed results
analysis-summary-2025-11-30T12-00-00Z.md
# Create directory structure
mkdir -p .claude/temp/gemini-results
mkdir -p .gemini/temp
mkdir -p docs/ai-artifacts/explorations
mkdir -p docs/ai-artifacts/plans
# Create GEMINI.md if not exists
if [ ! -f "GEMINI.md" ]; then
cat > GEMINI.md << 'EOF'
# GEMINI.md
@CLAUDE.md
## Gemini-Specific Overrides
You are Gemini CLI. You have access to:
- Large context window (exceeds typical LLM limits)
- Interactive PTY shell (vim, git rebase -i)
- Checkpointing with instant rollback
- Policy engine for tool control
When working with this codebase, prioritize bulk analysis
and exploration tasks that benefit from your large context.
EOF
fi
# Update .gitignore
grep -q ".claude/temp/" .gitignore 2>/dev/null || echo ".claude/temp/" >> .gitignore
grep -q ".gemini/temp/" .gitignore 2>/dev/null || echo ".gemini/temp/" >> .gitignore
# Claude prepares context
cat CLAUDE.md relevant-files/* > .claude/temp/context-bundle.txt
# Gemini consumes
cat .claude/temp/context-bundle.txt | gemini "Analyze this context"
# Gemini produces result
gemini "Explore architecture" --output-format json > .claude/temp/gemini-results/exploration.json
# Claude parses result
cat .claude/temp/gemini-results/exploration.json | jq -r '.response'
# For valuable artifacts that should be tracked
result=$(gemini "Create implementation plan" --output-format json)
echo "$result" | jq -r '.response' > docs/ai-artifacts/plans/plan-feature-$(date -u +%Y-%m-%dT%H-%M-%SZ).md
# Clean artifacts older than 7 days
find .claude/temp/gemini-results -type f -mtime +7 -delete
find .gemini/temp -type f -mtime +7 -delete
# Clear all session artifacts
rm -rf .claude/temp/*
rm -rf .gemini/temp/*
# Keep recent, delete old
find .claude/temp/gemini-results -name "*.json" -mtime +3 -delete
CLAUDE.md is the authoritative memory fileGEMINI.md imports from CLAUDE.md and adds overridesdocs/ai-artifacts/docs/ai-artifacts/ should be trackedgemini-memory-sync - CLAUDE.md ā GEMINI.md synchronizationgemini-exploration-patterns - Exploration output standardsgemini-context-bridge - Legacy context sharing patterns/sync-context - Synchronize memory files/gemini-explore - Generates exploration reports/gemini-plan - Generates implementation plansQuery: "How do I set up a project for Claude and Gemini collaboration?" Expected Behavior:
Query: "Where should I store Gemini exploration results?" Expected Behavior:
Query: "How do I pass context from Claude to Gemini?" Expected Behavior: