agent-browser-automati…
Automate browser interactions for development testing using Puppeteer MCP
Convert code between programming languages with 8x faster performance using parallel translation agents
How it fires
How this command gets triggered: by you, by Claude, or both.
/translateContext preview
What this command does when you run it.
Convert code between programming languages with 8x faster performance using parallel translation agents
allowed-tools: Read, Write, Bash(fd:*), Bash(rg:*), Bash(jq:*), Bash(gdate:*), Bash(cargo:*), Bash(go:*), Bash(deno:*), Bash(mvn:*), Bash(gradle:*), Task name: "Translate" description: "Convert code between programming languages with 8x faster performance using parallel translation agents" author: "wcygan" tags: ["meta","util"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
STEP 1: Initialize translation session and comprehensive source analysis
**Translation Session Initialization:**
echo "🔄 Initializing translation session..."
session_file="/tmp/translate-session-$SESSION_ID.json"
# Create session state with project analysis
jq -n --arg session_id "$SESSION_ID" \
--arg target "$ARGUMENTS" \
--arg timestamp "$(gdate -Iseconds)" \
--arg source_dir "$(pwd)" \
'{
sessionId: $session_id,
target: $target,
timestamp: $timestamp,
sourceDir: $source_dir,
phase: "initialization",
sourceLanguage: "auto-detect",
targetLanguage: null,
scope: "auto-detect",
complexity: "unknown",
translationMappings: {},
progress: {
analyzed: false,
translated: false,
validated: false,
documented: false
}
}' > "$session_file"
echo "✅ Session initialized: $session_file"STEP 2: Intelligent source language and framework detection
TRY:
**Source Language Detection:**
echo "🔍 Detecting source language and framework..." # Detect primary language if [ -f "package.json" ]; then source_lang="javascript/typescript" framework=$(jq -r '.dependencies | keys[]' package.json 2>/dev/null | rg "express|fastify|next|react|vue" | head -1 || echo "vanilla") elif [ -f "Cargo.toml" ]; then source_lang="rust" framework=$(rg "axum|warp|rocket|actix" Cargo.toml | head -1 | cut -d'=' -f1 | tr -d ' "' || echo "vanilla") elif [ -f "go.mod" ]; then source_lang="go" framework=$(rg "gin|echo|fiber|gorilla" go.mod | head -1 | cut -d' ' -f1 | sed 's|.*/||' || echo "vanilla") elif [ -f "pom.xml" ] || [ -f "build.gradle" ]; then source_lang="java" framework=$(rg "spring-boot|quarkus|micronaut" pom.xml build.gradle 2>/dev/null | head -1 | cut -d':' -f2 | tr -d ' "' || echo "vanilla") else source_lang="unknown" framework="unknown" fi echo "Source: $source_lang ($framework)"
STEP 3: Parse target specification and create translation strategy
CASE target_language: WHEN contains "rust" OR "axum":
WHEN contains "go" OR "golang":
WHEN contains "java" OR "spring" OR "quarkus":
WHEN contains "typescript" OR "deno":
STEP 4: Execute translation with intelligent sub-agent delegation
**CRITICAL: Always maximize parallel execution through sub-agents. Translation tasks are perfectly suited for parallel processing, achieving 5-8x performance gains.**
IF project has > 5 source files OR complexity is non-trivial:
**High-Performance Parallel Translation - Deploy 8 Sub-Agents Immediately:**
echo "🚀 Launching 8 parallel translation agents for 8x faster translation..." echo "⚡ Expected completion: 8-10x faster than sequential processing"
**IMMEDIATELY DEPLOY ALL 8 AGENTS IN PARALLEL:**
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Automate browser interactions for development testing using Puppeteer MCP
Prepare branches for merging across multiple worktrees and coordinate integration
Transform into accessibility expert for WCAG compliance and inclusive design
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Transform into backend specialist for scalable API and system design
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies