Skip to content
genai-text logo

GenAI Text Generation Skill

genai-text

Generate text using Google GenAI Gemini models via CLI. Use when the user asks to generate text, get AI responses, create content, write with AI, or use Gemini for text completion.

SKILL.md

Full skill instructions

GenAI Text Generation Skill

Generate text using the genai-cli text command with Gemini models.

Quick Start

# Basic text generation
uv run genai-cli text "What is the capital of France?"

# With custom model
uv run genai-cli text "Explain quantum computing" --model gemini-3-pro-preview

# Creative writing with temperature
uv run genai-cli text "Write a poem about the ocean" --temperature 0.9

# With system instruction
uv run genai-cli text "Explain this code" --system "You are a senior software engineer"

# Streaming output
uv run genai-cli text "Tell me a long story" --stream

# Save to file
uv run genai-cli text "Generate documentation" --output ./​docs.md

CLI Reference

uv run genai-cli text [OPTIONS] PROMPT

Options:
  --model, -m        Model: gemini-2.5-flash (default), gemini-2.5-flash-lite,
                     gemini-3-pro-preview, gemini-2.0-flash
  --temperature, -t  Randomness (0.0-2.0, default: 0.7)
  --max-tokens, -M   Maximum output tokens
  --system, -s       System instruction/​persona
  --top-p            Nucleus sampling threshold (0.0-1.0)
  --top-k            Top-k token sampling (1-100)
  --stop             Stop sequences (can be specified multiple times)
  --seed             Random seed for reproducibility
  --stream           Stream output in real-time
  --output, -o       Save response to file
  --json             Output as JSON

Available Models

ModelUse CaseNotes
gemini-2.5-flashGeneral text/​multimodalDefault - balanced speed/​quality
gemini-2.5-flash-liteLow latency, high volumeFaster, cheaper
gemini-3-pro-previewComplex reasoning/​codingMost capable
gemini-2.0-flashAlternative general useStable

Parameters

Temperature

Controls randomness. Lower = more deterministic, higher = more creative.

# Factual, deterministic response
uv run genai-cli text "What is 2+2?" --temperature 0.0

# Creative writing
uv run genai-cli text "Write a creative story" --temperature 1.5

System Instruction

Set a persona or context for the model:

# Technical expert
uv run genai-cli text "Review this code" --system "You are a senior security engineer"

# Creative writer
uv run genai-cli text "Write about sunset" --system "You are a poet who loves nature"

# Specific format
uv run genai-cli text "Explain REST APIs" --system "Explain like I'm 5 years old"

Token Control

Limit or control output length:

# Short response
uv run genai-cli text "Summarize this topic" --max-tokens 100

# Long form content
uv run genai-cli text "Write an essay" --max-tokens 2000

Sampling Parameters

Fine-tune generation with advanced sampling:

# Nucleus sampling (top-p)
uv run genai-cli text "Generate ideas" --top-p 0.9

# Top-k sampling
uv run genai-cli text "Complete this sentence" --top-k 40

# Combined for fine control
uv run genai-cli text "Creative brainstorm" --temperature 0.8 --top-p 0.95 --top-k 50

Stop Sequences

Stop generation at specific text:

# Stop at markers
uv run genai-cli text "Write a story" --stop "THE END" --stop "---"

Reproducibility

Use seed for consistent outputs:

# Same seed = same output
uv run genai-cli text "Generate a name" --seed 42
uv run genai-cli text "Generate a name" --seed 42  # Same result

Output Modes

Standard Output

uv run genai-cli text "Hello"
# Output: Hello! How can I assist you today?

Streaming

Real-time output as tokens are generated:

uv run genai-cli text "Tell me a story" --stream
# Output appears word by word

JSON Output

Structured output for automation:

uv run genai-cli text "Hello" --json
{
  "success": true,
  "command": "text",
  "data": {
    "response": "Hello! How can I assist you today?",
    "model": "gemini-2.5-flash"
  },
  "metadata": {
    "temperature": null,
    "max_tokens": null,
    "stream": false,
    "output_file": null
  }
}

File Output

Save directly to file:

uv run genai-cli text "Generate documentation" --output ./​docs.md

# With streaming
uv run genai-cli text "Write a report" --stream --output ./​report.txt

Use Cases

Code Generation

uv run genai-cli text "Write a Python function to calculate fibonacci" \
  --model gemini-3-pro-preview \
  --system "You are an expert Python developer"

Documentation

uv run genai-cli text "Document this API endpoint" \
  --system "You are a technical writer" \
  --output ./​api-docs.md

Creative Writing

uv run genai-cli text "Write a short story about space exploration" \
  --temperature 1.2 \
  --max-tokens 1000 \
  --stream

Data Analysis

uv run genai-cli text "Analyze this dataset and provide insights" \
  --model gemini-3-pro-preview \
  --system "You are a data scientist"

Translation

uv run genai-cli text "Translate to Spanish: Hello, how are you?" \
  --temperature 0.3

Prerequisites

API key must be configured:

uv run genai-cli auth set-key

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View