/gemini-to-nova-migration:gemini-to-novafrom gemini-to-nova-migration
Migrates Gemini 2.0/2.5/3.x Python code and prompts to Amazon Nova 2 Lite. Converts google-genai SDK calls to boto3 Bedrock Runtime and rewrites prompts for Nova format.
Ships in gemini-to-nova-migration. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Migrate Python application code and prompts from Google Gemini 2.0/2.5/3.x to Amazon Nova 2 Lite. Transforms SDK calls (google-genai → boto3 Bedrock Runtime) and rewrites prompts to follow Nova 2 Lite formatting and constraints.
Use this skill when:
google-genai → boto3 Bedrock Runtime converse API##Section Name## delimitersresponse_mime_type + response_schema (Gemini) → Tool-forcing or inline schema (Nova)previous_interaction_id (Gemini) → Pass full message history (Nova)store=true) → Manage state externallyYou MUST follow these steps in order. After each step, confirm findings with the user before proceeding to the next.
First, identify the Gemini SDK and API style:
import google.generativeai as genai) — uses GenerativeModel, generate_contentfrom google import genai) with generateContent — uses client.models.generate_contentclient.interactions.createThen identify which features are used:
You MUST flag any features in the "cannot migrate" list above and inform the user of alternatives before proceeding.
If the source model is a Gemini "pro" variant (gemini-2.5-pro, gemini-3.1-pro-preview), you MUST ask the user whether they have evaluated Nova 2 Lite for their use case. Pro-tier Gemini models have higher capability ceilings — the user should confirm Nova 2 Lite meets their quality requirements before investing in the migration.
Thinking/reasoning support by Gemini model:
| Gemini Model | Native Thinking Support |
|---|---|
gemini-2.0-flash | No — if CoT is used, it's via prompt text ("think step by step") |
gemini-2.0-flash-lite | No |
gemini-2.5-flash | Yes — thinking_config / thinking parameter |
gemini-2.5-pro | Yes |
gemini-3.5-flash | Yes |
gemini-3.1-pro-preview | Yes |
Migration rules for thinking:
additionalModelRequestFields entirely. If the prompt uses CoT ("think step by step"), keep that prompt text as-is.additionalModelRequestFields entirely.| Nova Effort | Config |
|---|---|
low | additionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "low"}} |
medium | additionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "medium"}} |
high | additionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "high"}} — MUST omit inferenceConfig (temperature, topP, maxTokens not allowed) |
Do NOT copy Gemini's
budget_tokensvalue directly — the models have different reasoning efficiency and the values are not interchangeable. Present the three options and let the user decide.
Determine the Nova 2 Lite use case type for correct inference config:
Text/Agentic:
| Use Case | Temperature | Top P | Reasoning |
|---|---|---|---|
general | 0.7 | default | DISABLED |
tool_calling | 0.7 | 0.9 | DISABLED |
tool_calling_reasoning | 1 | 0.9 | ENABLED |
complex_reasoning | 0.7 | default | ENABLED |
Multimodal:
| Use Case | Temperature | Reasoning |
|---|---|---|
| OCR | 0.7 | DISABLED |
| Key information extraction | 0 | OPTIONAL |
| Object/UI detection | 0 | DISABLED |
| Video summary/caption | 0 | OPTIONAL |
| Video timestamps/classification | 0 | DISABLED |
You MUST read references/feature-mapping.md for the complete mapping table.
You SHOULD read references/code-examples.md for before/after patterns.
If the source code uses generateContent (either google-generativeai or google-genai SDK) or the Interactions API (client.interactions.create), you MUST also read references/generate-content-patterns.md for the specific parameter mappings, Interactions API migration patterns, and deprecated SDK handling.
Ask the user which region-prefixed model ID to use:
| Model ID | Region |
|---|---|
us.amazon.nova-2-lite-v1:0 | US (us-east-1, us-west-2) |
eu.amazon.nova-2-lite-v1:0 | EU (eu-west-1, etc.) |
jp.amazon.nova-2-lite-v1:0 | Japan (ap-northeast-1) |
global.amazon.nova-2-lite-v1:0 | Cross-region inference |
Default to us.amazon.nova-2-lite-v1:0 if the user doesn't specify.
SDK transformation (Python):
# Gemini
from google import genai
client = genai.Client()
interaction = client.interactions.create(model="gemini-3.5-flash", ...)
# Nova 2 Lite
import boto3
client = boto3.client("bedrock-runtime")
response = client.converse(modelId="us.amazon.nova-2-lite-v1:0", ...)
Only include additionalModelRequestFields when reasoning is enabled:
# Reasoning DISABLED (default) — omit additionalModelRequestFields entirely
response = client.converse(modelId="us.amazon.nova-2-lite-v1:0", ...)
# Reasoning ENABLED — include reasoningConfig
response = client.converse(
modelId="us.amazon.nova-2-lite-v1:0",
...,
additionalModelRequestFields={
"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "medium"}
},
)
You MUST apply these transformations in order:
Replace XML/markdown delimiters with ##Section Name##:
<context> → ##Context Information:##<task> → ##Task Summary:##<instructions> → ##Model Instructions:##<examples> → ##Examples##Use canonical Nova section names:
## Task Summary: — defines the task## Context Information: — background## Model Instructions: — behavioral rules## Response style and format requirements: — output format## Examples — few-shot examples## Reference — RAG grounding contentFor multimodal prompts:
Add suppression guardrail where appropriate:
DO NOT mention anything inside ##Model Instructions## or ##Examples## in the response.
For long context (>10K tokens):
BEGIN INPUT DOCUMENTS
DOCUMENT 1 START
{content}
DOCUMENT 1 END
END INPUT DOCUMENTS
BEGIN QUESTION
{query}
END QUESTION
BEGIN INSTRUCTIONS
{instructions}
END INSTRUCTIONS
If the Gemini code uses structured output, apply this step. Otherwise skip to Step 6.
Gemini's response_mime_type + response_schema:
temperature=0toolSpec.inputSchemaSee references/code-examples.md Example 3 for both patterns.
If the Gemini code uses function calling / tools, apply this step. Otherwise skip to Step 7.
Key differences:
function_declarations → Nova toolSpecparameters (OpenAPI) → Nova inputSchema.json (JSON Schema)tool_config.mode (AUTO/ANY/NONE) → Nova toolChoice (auto/any/tool)Use the 'tool_name' tool for XOutput format:
## Migrated Code
**Use case:** {type}
**Inference config:** temperature={T}, reasoning={enabled/disabled}
**Breaking changes:** {list any features that couldn't be migrated 1:1}
### Code
{complete migrated code}
### Prompt
**SYSTEM PROMPT:**
{system prompt — persona only for multimodal}
**USER PROMPT:**
{user prompt with ##Section## formatting}
### Implementation Notes
- {inference config rationale}
- {any multimodal ordering requirements}
- {features requiring alternative approach}
You MUST check the migrated code against all criteria below. If any check fails, fix and re-validate before presenting to the user:
additionalModelRequestFields is omitted when reasoning is disabled, or contains reasoningConfig when enabled##Section## delimiters, not XMLprevious_interaction_id, store, etc.)| Gemini | Nova 2 Lite |
|---|---|
google-genai | boto3 bedrock-runtime |
client.models.generate_content() / client.interactions.create() | client.converse() |
system_instruction= | system=[{"text": "..."}] |
config=GenerateContentConfig(tools=[...]) | toolConfig={"tools": [{toolSpec}]} |
response_mime_type + response_schema | Tool-forcing or inline prompt schema |
thinking_config=ThinkingConfig(thinking_budget=N) | additionalModelRequestFields={"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "..."}} |
client.models.generate_content_stream() | client.converse_stream() |
| XML tags in prompt | ##Section Name## delimiters |
Problem: Copying full Gemini system instructions into Nova multimodal calls — task adherence degrades silently. Fix: Move everything except persona to the user prompt.
additionalModelRequestFields when reasoning is disabledProblem: Including additionalModelRequestFields={"thinking": ...} or any reasoning config when reasoning is not needed — Nova rejects unknown keys.
Fix: Omit additionalModelRequestFields entirely when reasoning is disabled. Only include it with {"reasoningConfig": {"type": "enabled", "maxReasoningEffort": "..."}} when reasoning is needed.
Problem: Keeping <context>, <task> etc. from the Gemini prompt — Nova ignores these as structural markers.
Fix: Replace with ##Section Name## delimiters.
Problem: Putting text before images/video in the content array. Fix: Media content blocks MUST come before the text block.
Problem: Copying Gemini's OpenAPI-style parameter schemas directly.
Fix: Convert to JSON Schema format in inputSchema.json.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub aws-samples/amazon-ai-samples --plugin gemini-to-nova-migrationOther plugins' skills for the same job