From htmlgraph
> **DEPRECATED:** This skill is replaced by the `gemini-operator` agent.
npx claudepluginhub shakestzd/htmlgraphThis skill uses the workspace's default tool permissions.
> **DEPRECATED:** This skill is replaced by the `gemini-operator` agent.
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
DEPRECATED: This skill is replaced by the
gemini-operatoragent. UseAgent(subagent_type="htmlgraph:gemini-operator", prompt="...")instead. The gemini-operator agent tries Gemini CLI first with 2M context and JSON output. Free tier.
name: gemini description: GeminiSpawner with full event tracking for exploration and large-context research when_to_use:
โ ๏ธ IMPORTANT: This skill teaches TWO EXECUTION PATTERNS
Choose based on your needs. See "EXECUTION PATTERNS" below.
| Pattern | Use Case | When to Use |
|---|---|---|
| Task(Explore) | General exploration via Claude Explore agent | When you want simplicity and Claude handles everything |
| GeminiSpawner | Direct Gemini CLI invocation with full subprocess tracking | When you need precise Gemini control + full parent event context |
CRITICAL: GeminiSpawner is invoked DIRECTLY via Python SDK, NOT via Task().
GeminiSpawner is the HtmlGraph-integrated way to invoke Google Gemini CLI directly with full parent event context and subprocess tracking.
Key distinction: GeminiSpawner is invoked directly via Python SDK - NOT wrapped in Task(). Task() is only for Claude subagents (Haiku, Sonnet, Opus).
GeminiSpawner:
Use Task(Explore):
# Simple Claude exploration via subagent
Task(subagent_type="Explore",
prompt="Analyze this codebase for patterns")
# Task() delegates to Claude Explore agent - no external CLI needed
Use GeminiSpawner (direct Python invocation):
# Direct Gemini CLI invocation with full tracking
spawner = GeminiSpawner()
result = spawner.spawn(
prompt="Analyze codebase",
track_in_htmlgraph=True,
tracker=tracker,
parent_event_id=parent_event_id
)
# NOT Task(GeminiSpawner) - invoke directly!
Use the htmlgraph:gemini-operator agent โ it tries Gemini CLI first, then falls back to direct exploration:
# PRIMARY: Delegate to gemini-operator agent (handles CLI check + fallback)
Task(
subagent_type="htmlgraph:gemini-operator",
prompt="Analyze the refactored spawner architecture for quality",
)
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | str | โ | Research/analysis task for Gemini |
model | str | None | โ | Model selection (default: None = RECOMMENDED, uses latest models including Gemini 3 preview) |
output_format | str | โ | "json" or "stream-json" (default: "stream-json") |
track_in_htmlgraph | bool | โ | Enable SDK activity tracking (default: True) |
tracker | SpawnerEventTracker | โ | Tracker instance for subprocess events |
parent_event_id | str | โ | Parent event ID for event hierarchy |
timeout | int | โ | Max seconds to wait (default: 120) |
Model Selection Note:
model=None (default): RECOMMENDED - CLI chooses best available model (gemini-2.5-flash-lite, gemini-3-flash-preview)gemini-2.0-flash, gemini-1.5-flash (may cause "thinking mode" errors)Task(
subagent_type="htmlgraph:gemini-operator",
prompt="""Analyze the quality of this refactored spawner architecture:
src/python/htmlgraph/orchestration/spawners/
โโโ base.py (BaseSpawner - 195 lines)
โโโ gemini.py (GeminiSpawner - 430 lines)
โโโ codex.py (CodexSpawner - 443 lines)
โโโ copilot.py (CopilotSpawner - 300 lines)
โโโ claude.py (ClaudeSpawner - 171 lines)
Evaluate: separation of concerns, code reusability, error handling patterns, event tracking integration."""
)
The htmlgraph:gemini-operator agent handles the fallback automatically:
No manual fallback code needed โ just delegate to the agent.
Why fallback to Task()?
Pattern Summary:
Use Google Gemini (latest models including Gemini 3 preview) for exploration and research tasks via the GeminiSpawner SDK.
CRITICAL DISTINCTION:
| What | Description |
|---|---|
| This Skill | Documentation + embedded coordination logic |
| Embedded Python | Internal check for gemini CLI โ spawns if available |
| Task() Tool | PRIMARY execution path for exploration work |
| Bash Tool | ALTERNATIVE for direct CLI invocation (if you have gemini CLI) |
Workflow:
โ ๏ธ To actually perform exploration, use these approaches:
# Use Claude's Explore agent (automatically uses appropriate model)
Task(
subagent_type="Explore",
prompt="Analyze all authentication patterns in the codebase and document findings"
)
# For large-context research
Task(
subagent_type="Explore",
prompt="Review entire API documentation and extract deprecated endpoints"
)
# If you have gemini CLI installed on your system
gemini analyze "Find all authentication patterns"
PRIMARY: Use Skill() to invoke (tries external CLI first):
# Recommended approach - uses external gemini CLI via agent spawner
Skill(skill=".claude-plugin:gemini", args="Analyze authentication patterns in the codebase")
What happens internally:
gemini CLI is installed on your systemgemini analyze "auth patterns"Task(subagent_type="Explore", prompt="Analyze auth patterns")FALLBACK: Direct Task() invocation (when Skill unavailable):
# Manual fallback - uses Claude's built-in Explore agent
Task(
subagent_type="Explore",
prompt="Analyze authentication patterns in the codebase",
model="haiku" # Optional: specify model
)
The Explore agent automatically uses Gemini for large-context work.
Task(
subagent_type="Explore",
prompt="""
Search codebase for all authentication patterns:
1. Where auth is implemented
2. What auth methods are used
3. Where auth is validated
4. Recommendations for adding OAuth 2.0
"""
)
# Analyze multiple files for security issues
Task(
subagent_type="Explore",
prompt="Review all API endpoints in src/ for security vulnerabilities"
)
# Extract information from diagrams or images
Task(
subagent_type="Explore",
prompt="Extract all text and tables from architecture diagrams in docs/"
)
# Process extensive documentation
Task(
subagent_type="Explore",
prompt="Summarize all API documentation and find deprecated endpoints"
)
Use Gemini for:
Use Claude for:
The skill implements a multi-level fallback strategy:
Skill(skill=".claude-plugin:gemini", args="Your exploration task")
# Attempts to use external gemini CLI via agent spawner SDK
# If gemini CLI not found, automatically falls back to:
Task(subagent_type="Explore", prompt="Your exploration task")
# Uses Claude's built-in Explore agent
# If alternative unavailable, uses Claude models for exploration
# Maintains full functionality with different inference model
Error Handling:
Track exploration work in spikes:
# Create spike for research findings
htmlgraph spike create "Auth Pattern Analysis via Gemini"
# Then record findings via: htmlgraph spike edit <id>
Avoid Gemini for:
/codex - For code implementation after exploration/copilot - For GitHub integration and git operations/debugging-workflow - Research-first debugging methodology